jgm/gitit

Getting Mathjax 3.0.1 to work with Gitit

hshackle opened this issue · 2 comments

I'm unsure if this is an issue with gitit itself or just a problem with me not knowing how to properly use Mathjax, but I would greatly appreciate help regardless. Gitit by default uses Mathjax 2.7.0, and I would like to modify the configuration file to use Mathjax 3.0.1 (or 3.0.0 would also work). I've tried editing the configuration file to use

mathjax-script: https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/node-main.min.js

and

mathjax-script: https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.1/es5/startup.js

but neither of them works, and pages just display the raw text - I suspect I'm just providing the wrong script. Can someone point me in the right direction with getting this to work? Thanks.

I've tried getting to work the latest version of MathJax as well with no luck, seems like there were significant changes which break the way gitit uses MathJax.

You'll have to pin MathJax to version 2.7.0: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_CHTML-full

The link you want is https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js but you'll also need to change static/js/preview.js since MathJax 3.x does not use Queues as much as just ES6 promises.