-
Notifications
You must be signed in to change notification settings - Fork 214
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
Handle variant forms for pseudo-scripts better. (mathjax/MathJax#2519) #604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remembered the discussion we had on that:
We wanted to handle pseudoprimes in core
and giving the resulting node a pseudoprime
property instead.
Firstly, we could expose the property (e.g., for SRE). And secondly, it would not need to be handled explicitly in the Wrapper
.
Right you are! Thanks for coming up with it again. It had totally slipped my mind. |
…and expose the pseduoscript in the MathML output, as per Volker's request
OK, I've moved the pseudo-script and prime checking to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only some minor things.
This PR improves the handling of pseudo scripts so that both the superscript version (using
msup
) and the non-superscript versions will render properly (with a font that has the proper glyphs available, like STIX2). In the past, MathJax used the larger sized primes in thenormal
mathvariant, and this lead to incorrect sizes being used when the primes were not inmsup
. This PR now expects the regular size to be in thenormal
variant and the larger size in the-tex-variant
font, and themo
element sets the correct variant for the position it is used in. It also remaps common characters that might be used for primes to their appropriate prime character (e.g.,'
maps to U+2032 (prime)).That means
<msup><mi>x</mi><mo>'</mo></msup>
,<mi>x</mi><mo>'</mo>
and<mtext>x′</mtext>
will all render properly (when the font contains the right characters, which the MathJax TeX fonts don't, but the STIX2 fonts do).This is intended as a step toward making MathJax work better with STIX2, as well as setting the stage for modifications to the MathJax fonts later this summer.