Configurable MathJax config #1409
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MathJax supports different combined configuration modes, like TeX-MML-AM_HTMLorMML or TeX-MML-AM_SVG (http://docs.mathjax.org/en/latest/config-files.html). Currently, Jupyter hard codes "TeX-AMS_HTML-full" in its notebook.html template. This makes it difficult for experimental Jupyter kernels which need or are designed around other modes (like MML, i.e. MathML).
In the long run, it would be great if Jupyter had a kernel specific MathJax setting in this regard. This, however, is beyond my capabilities and I guess it would be a rather big change, since MathJax config need to be stored statically on the server side.
What I'm suggesting in this pull request therefore is to make the MathJax config mode configurable via the Jupyter config file, so developers can easily work with their experimental kernels in the needed MathJax mode without having to patch the Jupyter source code. They still need to provide their custom MathJax config files in notebook/static/components/MathJax/config, but this is easier, and so the change would still be of great utility.