KaTeX titles

There have been several requests here on Meta for the Math Plugin to support the typesetting of titles. Here is just one example. As Falco points out in his response, though:

We don’t support most formatting on titles, even simple ones like bold and italic.
For equations they can easily break the post height…

I fully understand and support Discourse’s preference here. As the maintainer of a small, purely mathematical forum, though, I too would like to be able to mathematically typeset titles. So I wrote this little theme component to do so:

Notes

As the name implies, this component uses KaTeX to typeset the titles. I was unable to get MathJax working properly, evidently due to a conflict with the version of MathJax in the Math Plugin. There’s an add-mathjax branch, if someone else would like to give that a go.

Since it’s a theme component, as opposed to a plugin, my impression is that admins of Discourse hosted sites should be able to use it as well.

3 Likes