Tuple<Box, Box> GetTopBottomPadding(int i, int j)
{
var value = matrixCellGaps[i][j].Vertical;
var topBox = new StrutBox(0.0, VerticalPadding / 2 + value, 0.0, 0.0);
var bottomBox = new StrutBox(0.0, VerticalPadding / 2 + value, 0.0, 0.0);
return new Tuple<Box, Box>(topBox, bottomBox);
}
The issue disappears:
I don't have enough hindsight to know if there are side effects.
There is an alignment problem in the matrix rendering when there is an empty cell.
Ex:
\matrix{A & B \\ A & B \\ & B}
It seems that the issue is located in
GetTopBottomPadding
: https://github.com/ForNeVeR/xaml-math/blob/77d0bceeab5e6790cfb0b9a193b65f22b4217385/src/XamlMath.Shared/Atoms/MatrixAtom.cs#L139-L145If one replace the
shift
argument by0
:The issue disappears:
I don't have enough hindsight to know if there are side effects.