Sphinx: Support mathjax 3.0

Created on 6 Apr 2020  路  9Comments  路  Source: sphinx-doc/sphinx

MathJax 3.0 was released mid last year, and has a number of improvements - most notably on the speed of loading (something like an 80% decrease in load time). It would be great to get this into the Sphinx MathJax extension.

The MathJax upgrading docs suggest that it will not be trivial to upgrade, but it may be worth it given the performance and modularity improvements. What do folks think?

enhancement extensions help wanted

Most helpful comment

For a while, I don't have time to work on this issue. So any pull requests are welcome!

All 9 comments

+1; Reasonable. But it seems some users need to change their configurations for MathJax. So some migration paths are needed.

Note: To keep compatibility, the default version of mathjax should be v2 during Sphinx-3.x. And I'm okay to change it to v3 on Sphinx-4.0.0.

Agreed - I think an early first step is to add a configuration option for the mathjax version and provide docs for the best way to configure if it is version >= 3.0. The option can default to 2.x, and in the future it can be switched to 3.x

I am also in favour of having the new MathJax v3 support added, eventually that is..
However, in the meanwhile it may be worth to add an extra "attention" in the documentation* stating that the mathjax_path should not be set to point to the v3 of MathJax.

*Somewhere appropriate in: https://github.com/sphinx-doc/sphinx/blob/713bbf5cafa3fc5e143ced59dafe56f4b802ef80/doc/usage/extensions/math.rst#modsphinxextmathjax----render-math-via-javascript

For a while, I don't have time to work on this issue. So any pull requests are welcome!

I've attempted to fix this in PR #7961.

This was fixed by #7961

Indeed!

amazing, well done everybody and thanks @hameerabbasi :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ubershmekel picture ubershmekel  路  3Comments

webknjaz picture webknjaz  路  3Comments

shimizukawa picture shimizukawa  路  3Comments

shimizukawa picture shimizukawa  路  3Comments

pgjones picture pgjones  路  3Comments