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

Padding is not respected with `\cases` #389

Closed Orace closed 1 year ago

Orace commented 1 year ago

With \cases, the matrix cell alignment is set to Left and GetLeftRightPadding return null for leftBox:

https://github.com/ForNeVeR/xaml-math/blob/77d0bceeab5e6790cfb0b9a193b65f22b4217385/src/XamlMath.Shared/Atoms/MatrixAtom.cs#L147-L156

Then the total padding is HorizontalPadding / 2 instead of HorizontalPadding.

The issue doesn't exist with \matrix.
Ex: \cases{C &= \cases{ A & B \\ A & B} \\ M &= x\matrix{A & B \\ A & B}}

image