Multiple asynchronous typesetting calls simultaneously issue
Issue Summary
Perform multiple asynchronous typesetting calls simultaneously will cause chemical equations can't render correctly, or more even, an error You can't use 'macro parameter character #' in math mode
will occur.
Steps to Reproduce:
Type and execute in console:
var ele = document.createElement("div");
ele.innerHTML='$$\\ce{\\color{#F65353}{H2O}}$$';
document.body.append(ele);
MathJax.typesetPromise([ele]);
var ele = document.createElement("div");
ele.innerHTML='$$x$$';
document.body.append(ele);
MathJax.typesetPromise([ele]);
If you perform two typeset actions synchronously, all will be just fine.
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
I'm not sure if it's a bug, though documentation only mention that not recommend performing multiple asynchronous typesetting calls simultaneously, rather than we can't.
Technical details:
- MathJax Version: 3.2.2
- Client OS: Window 10
- Browser: Firefox 105
I am using the following MathJax configuration:
DEFAULT
and loading MathJax via
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>