Asked By: Anonymous
I am using Mithril and am dynamically mounting some content. the first time the page loads everything works fine. Once I click a button, which causes one thing to unmount and another to mount, the Mathjax won’t render again. I have tried calling the
MathJax.Hub.Queue(["Typeset",MathJax.Hub]); function on element and page load, but it still does not work. The console indicates that
MathJax.Hub is undefined after the remount. MathJax itself is being loaded synchronously.
What can I do?
Answered By: Anonymous
Your error message suggests that you may be using MathJax version 3 rather than version 2. The MathJax API has changed significantly with version 3, and
MathJax.Hub is no longer part of version 3. The replacement you are looking for is probably
MathJax.typesetPromise(). See the MathJax documentation for typesetting and converting math for more details.