Plugin Author
pkra
(@pkra)
Hard to say without a live page. My first guess would be that there’s SPA-like routing happening, i.e., clicking a link fetches some data and replaces the body HTML on the fly.
In that case, MathJax needs to be triggered to render the fresh content, see https://docs.mathjax.org/en/latest/advanced/typeset.html
Thread Starter
Keith
(@keithkhl)
@pkra Thank you for the quick feedback.
This is an example live page that you can take a look.
Regarding MathJax.typeset(), by this doc, Typesetting and Converting Mathematics — MathJax 3.2 documentation, it seems like the process should be automatic, but somehow on my website, another process blocks the MathJax JS to be called (or loaded) properly.
Plugin Author
pkra
(@pkra)
A quick look seems to confirm SPA-style routing.
this doc, Typesetting and Converting Mathematics — MathJax 3.2 documentation, it seems like the process should be automatic
That page specifically says:
it will do this automatically when it is first loaded
(emphasis mine). When the site adds/replaces content dynamically, MathJax has already completed its automatic-on-load rendering.
First, I’d try to figure out how the site is doing its client-side routing. Ideally, that will tell you how to hook into the routing. Then a script can leverage that hook to trigger mathjax – the link I had posted earlier will help with the MathJax part.
Marking this as resolved since it is not an issue with this plugin but the way MathJax and the site’s design interact.
