Open chenxia25 opened 1 year ago
MathJax inserts a visually hidden MathML version of the mathematics so that assistive technology that understands mathML can use that to read the mathematical output. Browsers that have native MathML rendering support will typeset that MathML, and the assumption is that the size of the rendered MathML will be approximately that of the MathJax-rendered expression. Unfortunately, in this case, that isn't true, and it is the invisible MathML that is causing the excess height.
Recent versions of Edge, Chrome, and Opera (and any other Blink-based browsers) have included new support for MathML notation. This implements the MathML-core specification, which doesn't include everything from MathML3, which is what MathJax is based around. In particular, MathML-core does not include the mlabeledtr
element that is used to handle tagged expressions, like the numbered equations in your example. Because that is not implemented, the native MathML output for it is not correct, and it turns out that, in the final column of the alignment, each "x" ends up on its own line, making the alignment much taller than it should be. That leads to the scroll bars you are seeing.
Luckily, this can be fixed in CSS in several ways.
First, you could add
mlabeledtr {
display: table-row;
}
which would make the mlabeledtr
act like a plain mtr
. (The label would end up being the first column of the output, but at least the entries in the other columns would be correct.)
Alternatively (or in conjunction) you could use
mjx-assistive-mml {
right: 0;
bottom: 0;
}
so that the assistive-MathML output will always cover the same space that the MathJax typeset version does.
Issue Summary
When I included a 4-line formula containing
\tag
in the HTML file, the scroll bar appeared (it should not have appeared because the height of this formula is much smaller than the screen height). And this only happens in Microsoft Edge. I'm confused.Steps to Reproduce:
a.html
with the following contentTechnical details:
Supporting information: