MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Math equation is rendering with backslashes.

Open shramikajadhav opened this issue 2 years ago • 1 comments

Issue Summary

The math equations are rendering with backslashes randomly. Sometimes it gets fixed with a browser refresh and sometimes it doesn't. Screen Shot 2024-02-01 at 11 11 06 AM

Screen Shot 2024-02-01 at 11 25 45 AM

I am also getting the following errors in the console Screen Shot 2024-02-01 at 11 12 02 AM

Screen Shot 2024-02-01 at 11 11 41 AM

Also used this method to fix this but no luck - MathJax.typesetPromise();

Technical details:

  • MathJax Version: 4.0.0-beta.4
  • Client OS and Browser: Windows chrome, Firefox and Mac chrome, Firefox

Loading MathJax via

 <script
      id="MathJax-script"
      async
      src="https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js"
    ></script>

shramikajadhav avatar Feb 01 '24 16:02 shramikajadhav

There is not enough information given to resolve your issue.

The fact that you sometimes get rendered equations and sometimes not suggests that there is a timing issue with some other code that is running in your page. For example, if the contents of part of you page are loaded dynamically, then depending on whether MathJax loads and runs first and the dynamic content loads later (you see the raw TeX code), or the dynamic content arrives first and MathJax runs after that (the math is typeset). The error messages suggest that page content that included mathematics may have been replaced while MathJax is typesetting (so when MathJax tries to put the typeset math into the page, the DOM elements where that is to happen are no longer there).

You probably need to synchronize MathJax's typesetting with the loading of the page content. How you do that depends on the content management framework that you are using. Without knowing more about what is going on in your page, we can't give you anything more specific than that.

dpvc avatar Feb 01 '24 20:02 dpvc