Math equation is rendering with backslashes.
Issue Summary
The math equations are rendering with backslashes randomly. Sometimes it gets fixed with a browser refresh and sometimes it doesn't.
I am also getting the following errors in the console
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>
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.