-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in 4 beta 6 that wasn't in beta 4 #3253
Comments
The The upshot here is that you haven't actually disabled the enhancement or the explorer, and the message you are getting is due to that. That still shouldn't happen, but the speech and accessibility features have been significantly updated in beta.6, and it looks like something has gone wrong with that. In the meantime, you can done one of two things. The first would be to use MathJax = {
loader: {load: ['input/tex', '[tex]/mhchem', 'input/asciimath', '[mml]/mml3']},
tex: {packages: {'[+]': ['mhchem']}},
options: {
enableMenu: false,
menuOptions: {settings: {enrich: false}}
}
}; to disable enrichment (which also should disable the speech production and explorer). Alternatively, since you are already loading nearly all the needed components anyway, you could just use MathJax = {
loader: {load: ['input/tex', '[tex]/mhchem', 'input/mml', 'input/asciimath', '[mml]/mml3', 'output/chtml']},
tex: {packages: {'[+]': ['mhchem']}}
}; and then load <script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/[email protected]/startup.js"></script> instead of I also notice you are calling MathJax.startup.document.inputJax = MathJax.startup.getInputJax(); instead to get fresh instances of the input jax, or even just use MathJax.texReset() to clear the labels if that is what you are looking for, though this does not clear macros defined with In any case, it would be best not to use |
I did some more testing to find out what was causing the error itself in your original code, and figured out what is going on. The My suggestion of replacing the For the latter, you do need to do just a little bit more than I said above. In particular, you need to initialize the input jax's adaptors and mmlFactory properties to be the ones from the document itself, so you should do const doc = MathJax.startup.document;
doc.inputJax = MathJax.startup.getInputJax();
doc.inputJax.map(jax => {
jax.setAdaptor(doc.adaptor);
jax.setMmlFactory(doc.mmlFactory);
}); to get everything properly set up with new input jax. I had forgotten about that when I wrote my original reply. |
Issue Summary
Switching
to
caused a crash in MathJax in
speech()
.This happens in both Firefox and Chrome on Windows 10.
I don't want to the accessibility features on because the page that this is in replaces them with my own math accessibility. If there is some new settings I should use, let me know. Potentially, that setting should not have been used in beta 4, but the speech code didn't cause a crash before.
Steps to Reproduce:
Apologies, I don't have an easy way for you to replicate my code (I include the relevant portions below)
Technical details:
I am using the following MathJax configuration:
Supporting information:
Here's the stack:
The text was updated successfully, but these errors were encountered: