-
-
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
Combining Right Arrow Above U+20D7 display issue #3231
Comments
Whether a character stretches is determined by the MathML "operator dictionary", which is described in Appendix C of the MathML specification. The character U+2192 (right arrow) is defined as a stretchy accent (it gets There are two possible solutions. First, you cold use <math xmlns="http://www.w3.org/1998/Math/MathML">
<mover accent="true">
<mrow>
<mi mathvariant="italic">ABCDE</mi>
</mrow>
<mo stretchy="true">⃗</mo>
</mover>
</math> or you could use the configuration MathJax = {
startup: {
ready() {
const {TEXCLASS} = MathJax._.core.MmlTree.MmlNode;
const {OPTABLE, MO} = MathJax._.core.MmlTree.OperatorDictionary;
OPTABLE.infix['\u20D7'] = MO.WIDEACCENT;
MathJax.startup.defaultReady();
}
}
} to add U+20D7 to the operator table with the defaults for the |
Thanks @dpvc |
Issue Summary:
The Right Arrow Above U+20D7 character is not displayed as expected. Specifically, the arrow is centered and has a fixed width, so when displayed over a string of characters, it is not stretched to cover the full width of the expression below.
Here is the screenshot illustrating the problem
https://www.screencast.com/t/BfrEZ5G0
Steps to Reproduce:
Render following MathML in the browser
<math xmlns="http://www.w3.org/1998/Math/MathML"><mover accent="true"><mrow><mi mathvariant="italic">ABCDE</mi></mrow><mo>⃗</mo></mover></math>
Observed Behavior:
The arrow is centered and has a fixed width, not stretching to cover the entire width of the expression "ABCDE."
Expected Behavior:
The arrow should stretch to cover the full width of the expression "ABCDE."
Alternative Approach:
When replacing U+20D7 with Rightwards Arrow U+2192 the formula displayed as expected.
<math xmlns="http://www.w3.org/1998/Math/MathML"><mover accent="true"><mrow><mi mathvariant="italic">ABCDE</mi></mrow><mo>→</mo></mover></math>
Technical details:
Supporting information:
Note that MathML source equation is displayed in MS word correctly. But when copying this equasion and then pasting it into notepad the U+20D7 char is being replaced with U+2192.
When looking in the document.xml however, it is still the U+20D7 that is used in the equation.
Thank you,
Oleg
The text was updated successfully, but these errors were encountered: