ForNeVeR / xaml-math

A collection of .NET libraries for rendering mathematical formulae using the LaTeX typesetting style, for the WPF and Avalonia XAML-based frameworks
MIT License
637 stars 100 forks source link

Block height for `\text` #412

Closed ForNeVeR closed 6 months ago

ForNeVeR commented 1 year ago

Consider this example:

\text{f(x)} = \cases{\text{1/3} & \text{if 0 ≤ x ≤ 1;} \\
\text{2/3} & \text{if 3 ≤ x ≤ 4;} \\
\text{0} & \text{elsewhere.}}
image

You may note that the text blocks are looking a off. Compare it with same block without \text, check the text block vertical offsets:

\text{f(x)} = \cases{1/3 & if\thickspace0 \leqslant x \leqslant 1; \\
2/3 & if\thickspace3 \leqslant x \leqslant 4; \\
0 & \text{elsewhere.}}
image

(I have specially left elsewhere in the \text block to compare the offset.)

Something's wrong here.