I have a documentation set in Sphinx reST. I've included sphinx.ext.mathjax in conf.py, and included the line "mathjax_path = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js'". I believe that is all I need to do before adding markup to the rst files. But my equations aren't being rendered. For example,
:math:`a^2 + b^2 = c^2`
comes out of the browser as
\(a^2 + b^2 = c^2\)
No fancy font or anything. The HTML is
<span class="math">\(a^2 + b^2 = c^2\)</span>
You still need to declare the extention to sphinx-doc in the conf.py file.
On the top of the conf.py file, soon after import sys, os
under "general configuration" you will see the comments notes about including extentions. For mathjax you need to add it to the listed extension:
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig']
(I've just copy pasted my own, you may have other or no extentions listed there at the moment).
That in combination with the mathjax_path that you have already set should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With