MathJax does not work straight away with instant loading
See original GitHub issue- I’ve read the contribution guidelines and agree with them
I’ve found a bug and checked that …
- … the problem doesn’t occur with the default MkDocs template
- … the problem is not in any of my customizations (CSS, JS, template)
- … the documentation does not mention anything about my problem
- … there are no open or closed issues that are related to my problem
Description
As the title suggests.
Expected behavior
When instant loading is enabled, MathJax is expected to typeset the content on page changes.
Actual behavior
Formulas won’t be rendered unless MathJax.typesetPromise()
is manually called or the page is refreshed.
Steps to reproduce the bug
- Follow the guide on creating a new site, enabling instant loading, and enabling MathJax.
- Create a new page and write random formulas.
- Preview and click on the new page to see if formulas are rendered.
Package versions
- Python: 3.9.2
- MkDocs: 1.1.2
- Material: 7.1.0
Project configuration
site_name: My Docs
theme:
name: material
features:
- navigation.instant
markdown_extensions:
- pymdownx.arithmatex:
generic: true
extra_javascript:
- javascripts/config.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
System information
-
OS: macOS 11.2.3, Ubuntu 20.04
-
Browser: Chrome 89.0.4389.114
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Mathjax not working - Mathematics Meta - Stack Exchange
There is a connection timeout when loading things from cdn.mathjax.org. After a long time, the page is rendered without rendering the formulas.
Read more >Loading and Configuring MathJax
Usually, MathJax loads its components only when they are needed, but each component will require a separate file to be loaded, and that...
Read more >MathJax sometimes fails to load math equation in Android
I have put MathJax into my project to display math equations on my app, it appears to be working, however, on some situations...
Read more >Lazy load mathjax - Google Groups
I liked the idea of mathjax lazyload. I tried and it is fast. The only problem is the equations are rendering when in...
Read more >Loading and Configuring MathJax
If you don't load an explicit configuration file, you will need to include an in-line configuration block in order to tell MathJax how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting. We might need to adjust the configuration (after
window.MathJax
and add:This should trigger after the new document content was injected.
Added in 7761cad09.