-
-
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
MathJax 3.2.0 Lazy Loading - mtd error #2788
Comments
Thanks for the report. It turns out that this is due to the combination of XHTML, the The reason turns out to be that lazy loading causes the original MathML to be serialized and when it shows up again, it is re-parsed. But with the explicit You can tell MathJax to do xml parsing with the Fortunately, there is an easy work-around. This configuration will allow your example to work properly in a lazy-loaded XHTML document: MathJax = {
loader: {load: ['ui/lazy']},
mml: {
parseAs: 'xml'
},
startup: {
ready() {
const {HTMLAdaptor} = MathJax._.adaptors.HTMLAdaptor;
HTMLAdaptor.prototype.body = function(doc) {return doc.body || doc};
MathJax.startup.defaultReady();
}
}
}; |
That seems to be working for me. Thanks! |
Handle document created by parsing in XHTML. (mathjax/MathJax#2788)
Hey guys, I am still able to reproduce this bug in MathJax 3.2.1. Here's an updated "reproducer" that points at the 3.2.1 sources in place of the 3.2.0 sources. Can someone take another look? The workaround you gave me at the top of this conversation (back in october) still works. I disabled the workaround to test the fix, but I'm afraid I've had to put it back in. |
You need to keep the mml: {
parseAs: 'xml'
}, because of the XHTML document. The stuff from the |
Oh! That helps. I'll give that a try. |
That worked. Thanks! I had other startup logic I needed so it was just a matter of removing these two lines from it, I think:
|
Yes, that's right. Glad that did it for you. |
Issue Summary
When using
load: ['ui/lazy']
with mathml tables, some mtd elements load as yellow mtd text instead of loading correctly. When you load it without lazy typesetting, it renders just fine.This is happening in a variety of browsers. I'm testing on macOS, looking at Safari, MS Edge, and FireFox.
Steps to Reproduce:
Technical details:
Supporting information:
See attached zip archive for screenshots and sample xhtml.
MathJax-3.2.0-lazy-mtd-bug.zip
The text was updated successfully, but these errors were encountered: