Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider switching from MathJax to MathML for math output #233

Open
jbms opened this issue Mar 3, 2023 · 3 comments · May be fixed by #251
Open

Consider switching from MathJax to MathML for math output #233

jbms opened this issue Mar 3, 2023 · 3 comments · May be fixed by #251

Comments

@jbms
Copy link
Owner

jbms commented Mar 3, 2023

For a long time Chrome has been the lone holdout in MathML support, making MathML basically unusable, but there is now support in Chrome 109, which is the current stable version:

https://caniuse.com/mathml

In a short time it should be even more widely deployed.

docutils already has support for generating mathml output, but I don't think Sphinx yet provides an easy way to take advantage of it. I think we may also need some CSS from docutils for it to work well.

MathML's advantage over MathJax is that we don't need an extra javascript dependency, and it would render instantly with the rest of the content. In contrast, with MathJax there is a lag during which you see the unrendered math markup and then the page reflows after it is rendered.

@2bndy5
Copy link
Collaborator

2bndy5 commented Mar 3, 2023

In contrast, with MathJax there is a lag during which you see the unrendered math markup and then the page reflows after it is rendered.

BTW, I noticed the same lag with mermaid.js

@2bndy5
Copy link
Collaborator

2bndy5 commented Apr 28, 2023

For reference to sphinx/docutils supporting MathML: sphinx-doc/sphinx#6092

jbms added a commit that referenced this issue Apr 28, 2023
@jbms jbms linked a pull request Apr 28, 2023 that will close this issue
jbms added a commit that referenced this issue Apr 28, 2023
@2bndy5
Copy link
Collaborator

2bndy5 commented Apr 29, 2023

jbms added a commit that referenced this issue May 7, 2023
jbms added a commit that referenced this issue May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants