Skip to content
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

Undersetting mathml token regression from v2 to v3 #2415

Open
dainiak opened this issue Apr 18, 2020 · 6 comments
Open

Undersetting mathml token regression from v2 to v3 #2415

dainiak opened this issue Apr 18, 2020 · 6 comments

Comments

@dainiak
Copy link
Contributor

@dainiak dainiak commented Apr 18, 2020

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
@dpvc dpvc added the Accepted label Apr 20, 2020
@dpvc
Copy link
Member

@dpvc dpvc commented Apr 20, 2020

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
Copy link
Member

@dpvc dpvc commented Apr 20, 2020

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.

@dainiak
Copy link
Contributor Author

@dainiak dainiak commented Apr 20, 2020

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

@dpvc
Copy link
Member

@dpvc dpvc commented Apr 20, 2020

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
Copy link
Member

@dpvc dpvc commented Apr 21, 2020

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.

@dainiak
Copy link
Contributor Author

@dainiak dainiak commented Apr 21, 2020

Thank you, I’ll try that!

@dpvc dpvc added the v3 label May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants