spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
457 stars 130 forks source link

mathjax.js missing in html with pure display equations #550

Closed casperdcl closed 3 years ago

casperdcl commented 3 years ago

using only display equations in markdown cells:

\begin{equation}
y = mx + c
\end{equation}

mathjax isn't loaded. At least one instance of inline maths needs to be in the notebook ($y = mx + c$) in order to prompt nbsphinx to insert the following into the generated html:

<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({"TeX": {"equationNumbers": {"autoNumber": "AMS", "useLabelIds": true}}, "tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
mgeier commented 3 years ago

Thanks for the report!

Does #551 fix it for you?