Skip to content

Conversation

@poke1024
Copy link
Contributor

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.

mathjax_config = Unicode("", config=True,
help="""The MathJax.js configuration file that is to be used."""
)
def _mathjax_config_default(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need a dynamic default here, it can be in the constructor:

mathjax_config = Unicode("TeX-AMS_HTML-full,Safe", config=True...

@minrk minrk added this to the 5.0 milestone May 3, 2016
@minrk minrk changed the title Mathjax Configurable MathJax config May 11, 2016
@minrk minrk merged commit 0f2193c into jupyter:master May 11, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants