Let's say you want to typeset a vector $\vec{v}$ (with a nice top arrow) in SILE, or a variable with a fancy hat $\hat{n}$, or a long vector $\overrightarrow{AB}$...
How would you do that?
Quick answer: you can't.
I am not discussing here the issue of stretchy operators, which is a different topic[^1]
... but the correct positioning of accents on top of or under other elements...
And as shown in this issue description here, GitHub is not bad at it. So? :pig_nose:
How hard can it be for such an advanced typesetting system as SILE? :clown_face:
[^1]: See #2148 (although the case here would be on horizontal stretching... erm...)
MathML
One is supposed to use <mover>, <munder>, <munderover> to attach accents to other elements, with specific attributes ("accent" and/or "accentunder", see references below). EDIT: And one might not even have to use them for operator symbols in a pre-defined table, where defaults may apply.
For instance,
with U+20D7 ("vec"): <mover accent="true"><mi>x</mi><mo>⃗</mo></mover>
with U+2192 ("rightarrow"): <mover accent="true"><mi>x</mi><mo>→</mo></mover>
Try these, and see how SILE currently handles them.
The "accent" attribute is not supported, and the position of the accent somewhat off....
From a quick analysis, SILE's OpenType parser is handing the corresponding MATH features, so it would be at hands...
bottom accent attachment is probably addressed without needing OpenType, but I haven't checked yet.
TeX-like math
In LaTeX, one would use \vec{v}, \hat{n}, \overrightarrow{AB} etc.
What does these produce in SILE?
Let's try.
The commands are recognized, defaulting to atoms.
The argument is lost without warning, and the output is not what one would expect.
Of course, adding a custom \def to handle the mapping to MathML would be possible... But it then falls on the same issue as above.
TL;DR
[ ] Handle (top) accent attribute in MathML
[ ] Handle bottom accent attribute in MathML
[x] Handle LaTeX-compatible \vec{v} etc. in TeX-like math
Dear SILE 0.15.5 math enthusiasts,
Let's say you want to typeset a vector $\vec{v}$ (with a nice top arrow) in SILE, or a variable with a fancy hat $\hat{n}$, or a long vector $\overrightarrow{AB}$...
How would you do that?
Quick answer: you can't.
I am not discussing here the issue of stretchy operators, which is a different topic[^1] ... but the correct positioning of accents on top of or under other elements...
And as shown in this issue description here, GitHub is not bad at it. So? :pig_nose: How hard can it be for such an advanced typesetting system as SILE? :clown_face:
[^1]: See #2148 (although the case here would be on horizontal stretching... erm...)
MathML
One is supposed to use
<mover>
,<munder>
,<munderover>
to attach accents to other elements, with specific attributes ("accent" and/or "accentunder", see references below). EDIT: And one might not even have to use them for operator symbols in a pre-defined table, where defaults may apply.For instance,
<mover accent="true"><mi>x</mi><mo>⃗</mo></mover>
<mover accent="true"><mi>x</mi><mo>→</mo></mover>
Try these, and see how SILE currently handles them. The "accent" attribute is not supported, and the position of the accent somewhat off.... From a quick analysis, SILE's OpenType parser is handing the corresponding MATH features, so it would be at hands...
References:
<mo>
(but this is not part of MatML Core)<munder>
<mover>
<munderover>
TeX-like math
In LaTeX, one would use
\vec{v}
,\hat{n}
,\overrightarrow{AB}
etc.What does these produce in SILE? Let's try. The commands are recognized, defaulting to atoms. The argument is lost without warning, and the output is not what one would expect. Of course, adding a custom
\def
to handle the mapping to MathML would be possible... But it then falls on the same issue as above.TL;DR
\vec{v}
etc. in TeX-like math