MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Undersetting mathml token regression from v2 to v3

Open dainiak opened this issue 5 years ago • 6 comments

Issue Summary

This example taken from StackExchange works perfectly in MathJax 2.7, but not in MathJax 3.0.5: \mathop{\underset{\mmlToken{mo}{⎵}}{78\,255\,300,00}}\limits_{10\text{ digits}}

MJv2: image

MJv3: image

Technical details:

  • MathJax v3.0.5 vs. v2.7
  • Client OS: Windows 10
  • Browser: Chrome 81

dainiak avatar Apr 18 '20 21:04 dainiak

Yes, there are some issues with stretchy characters that ned to be addressed. In v2, there were options in the stretchy character day to allow pieces to be repositioned, but that was not carried over to v3. We are doing work to extend the v3 font support this summer, and we hope to address such issues then.

dpvc avatar Apr 20 '20 13:04 dpvc

For the time being, if you are using CommonHTML output, you could add

<style>
mjx-stretchy-h.mjx-c23B5 > mjx-ext > mjx-c::before {
  vertical-align: -.24em;
  margin-bottom: -.24em;
}
</style>

to the page, which will fix this particular stretchy character. Similar adjustments could be made for others that need it.

dpvc avatar Apr 20 '20 13:04 dpvc

Thank you! Is there a similar workaround for SVG? I only use SVG output module currently.

dainiak avatar Apr 20 '20 18:04 dainiak

Try

@namespace xlink "http://www.w3.org/1999/xlink";
g[data-mml-node="mo"]:last-child >
  use[xlink|href$="2518"] + svg >
  use[xlink|href$="2212"] {
    transform: translateY(-250px) scaleX(100) translateX(-100px);
}

and see if that does the trick.

dpvc avatar Apr 20 '20 19:04 dpvc

OOPS, I left out the important

@namespace xlink "http://www.w3.org/1999/xlink";

line in my comment above. I've added it in. Note that it has to come above any other CSS declarations.

dpvc avatar Apr 21 '20 17:04 dpvc

Thank you, I’ll try that!

dainiak avatar Apr 21 '20 18:04 dainiak