Fix MathML spacing rules for mo elements. (mathjax/MathJax#2392) #656
+23
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies the MathML spacing rules for
<mo>
(and embellished<mo>
) to correspond to Neil's explanation of the rules in mathjax/MathJax#2392. This means that space is only added when the (embellished) operator is inside an mrow (or inferred mrow) that has more than one element. This also makes the spacing between two successive<mo>
elements be the maximum of therspace
of the first and thelspace
of the second (as opposed to the sum of the two, as in the past).This only affects when MathML spacing has been selected for the output jax, not the TeX spacing.
Finally, this also fixes the
coreParent()
function, which used to skip over<mstyle>
elements, and so would incorrectly report the parent for<mstyle><mo>+</mo></mstyle>
as the<mo>
element rather than the<mstyle>
. Similarly, theisTopEmbellished()
function incorrectly reported the<mo>
as the top embellished operator.Resolve issue mathjax/MathJax#2392.