Testing KaTex

This is a test to see if KaTex is working.

\begin{align*} f(x) = \pi r^2\\ \end{align*}

The answer is no, but mathjax does seem to work.

Getting it Working

Edit the conf.py file.

  1. Uncomment the second MATHJAX_CONFIG default (the one with actual content instead of an empty string).
  2. Set EXTRA_HEAD_DATA to the mathjax CDN.
EXTRA_HEAD_DATA = '''
<script type="text/javascript" async
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
'''

Note

The documentation says that you need to add the mathjax tag to the post, but the conf.py has HIDDEN_TAGS = ['mathjax'] which I think makes it work anyway. The documentation also makes no mention of the need for the CDN (or installing the javascript) but nikola doesn't seem to come with mathjax otherwise.