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
line breaking in MathML (V4) #3188
Comments
Update: this worked with version 2.7.8
|
Note that your math items are in-line math items because the MathJax v2 did not perform in-line breaking except in limited situations, so the line-breaking you show from v2 would likely have to have been for displayed equations, not in-line ones (the equation numbers also suggest that that is the case, as in-line expressions don't get equation numbers). So I suspect the examples you have used are not actually the same in both cases. MathJax v4 does implement in-line breaking, but note that the rules for in-line breaking are based on the TeX in-line breaking rules, which only break an expression at a top-level operator that is of class <math>
<mi>x</mi>
<mo>+</mo>
<mrow>
<mi>y</mi>
<mo>+</mo>
<mi>z</mi>
</mrow>
</math> has only one valid in-line breakpoint at the first plus sign, and the second plus is not a breakpoint as it is inside an explicit The expressions you point to in your screen shot all have explicit <math id="mml367">
<mstyle displaystyle="true">
<mrow>
<mi>A</mi>
<mo>=</mo>
<mi>π</mi>
<msqrt>
<mn>1</mn>
<mi>a</mi>
</msqrt>
<mo>←</mo>
<mo>↑</mo>
<mo>→</mo>
<mo>↓</mo>
<mi>∞</mi>
<mo>≠</mo>
<mo>∝</mo>
<mo>≅</mo>
<mo>≈</mo>
<mo>≡</mo>
<mo>∀</mo>
<mo>∃</mo>
<mi>∅</mi>
<mo>∩</mo>
<mo>∪</mo>
<mo>∂</mo>
<mi>ρ</mi>
<mi>φ</mi>
<mi>γ</mi>
<mi>ς</mi>
<mo>⊂</mo>
<mo>⊃</mo>
<mo>⊕</mo>
<mo>⊝</mo>
<mo>⊗</mo>
<mi>σ</mi>
<mi>ω</mi>
<mo>∋</mo>
<mo>∈</mo>
<mo>∆</mo>
<mi>γ</mi>
<mi>ε</mi>
<mi>θ</mi>
<mi>τ</mi>
</mrow>
</mstyle>
</math> which won't break, but if you remove the outer <math id="mml367">
<mstyle displaystyle="true">
<mi>A</mi>
<mo>=</mo>
<mi>π</mi>
<msqrt>
<mn>1</mn>
<mi>a</mi>
</msqrt>
<mo>←</mo>
<mo>↑</mo>
<mo>→</mo>
<mo>↓</mo>
<mi>∞</mi>
<mo>≠</mo>
<mo>∝</mo>
<mo>≅</mo>
<mo>≈</mo>
<mo>≡</mo>
<mo>∀</mo>
<mo>∃</mo>
<mi>∅</mi>
<mo>∩</mo>
<mo>∪</mo>
<mo>∂</mo>
<mi>ρ</mi>
<mi>φ</mi>
<mi>γ</mi>
<mi>ς</mi>
<mo>⊂</mo>
<mo>⊃</mo>
<mo>⊕</mo>
<mo>⊝</mo>
<mo>⊗</mo>
<mi>σ</mi>
<mi>ω</mi>
<mo>∋</mo>
<mo>∈</mo>
<mo>∆</mo>
<mi>γ</mi>
<mi>ε</mi>
<mi>θ</mi>
<mi>τ</mi>
</mstyle>
</math> then line breaks are possible (try it in your codepen example). The other expression also has Note that line breaking of displayed equations is more general, and can break inside So the upshot is, this is the expected behavior for MathJax's line breaking. |
I am using the latest version of MathJax But line breaking is not working.
I am using the following MathJax configuration:
and loading MathJax via
Implemented sample:
https://codepen.io/Mohammad-Shahbazi-the-styleful/pen/OJqGXmx
The text was updated successfully, but these errors were encountered: