-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Math operators: stretchy or not stretchy #2148
Comments
Well, I don't think we should do this... |
See above comment - Considered closed. |
Let's take again the Schwinger-Dyson equation, from some Joe's test page which gives both a TeX formula and a MathML one...
Expectation:
Current SILE results (SILE 0.15.5 + most of my previous math-related PRs, notably #2146 slightly extended)
MathML:
TeX-like = the TeX formula with the
\left
and\right
commands set to nothing.Analysis
On the bright side, we are quite close in both cases. But the some operators are not stretched (in both cases); and (in the TeX-like case) some are stretched while they shouldn't.
MathML:
packages/math/unicode-symbols.lua
(a small list)TeX-like
\left
and\right
come into play.-d texmath
, we see that we converted the TeX to ...\mi{F}\mo{[}\mo{ϕ}\mo{]}
...i.e.
<mi>F</mi><mo>[</mo><mo>ϕ</mo><mo>]</mo>
<mi>F</mi><mrow><mo stretchy="true" form="prefix">[</mo><mi>ϕ</mi><mo stretchy="true" form="postfix">]</mo></mrow>
-- see, besides the correct handling of stretchy etc., the extra<mrow>
there?Conclusion
I'd say it's a bug (= incompleteness of the implementation but leading to an unexpected output)
The steps would be clear:
stretchy=bool
on MathML elements... --> see Math more fixes and features #2151Standalone atoms are forced to stretchy=false\left
and\right
might be considered too (and this does also affect the stretchy flag, and in addition allows for some of the left or right symbols to be something other than a natural mathopen/mathclose pair.) --> see Support TeX-like left..right construct #2179EDIT: Not discussed here, but since it also occurs in the above examples, there's another topic on unary/binary operators (#1642)...
EDIT: The aforementioned MathML table also has indications for spacing around operators (which we implement with an hard-coded thin/med/thick TeX-inspired logic. It's not the topic here, but spacing issue can also be noticed in the above examples (... "How many issues do you want me to open?" 🌵 )
The text was updated successfully, but these errors were encountered: