CSharpMath
CSharpMath copied to clipboard
textPainter does not correctly center an equation which contains eqnarray
We have a formula containing eqnarray which should appear centered, however it's rendered too far over to the right.
In the screenshot, the first formula is an eqnarray with two lines, which are aligned on the "=" sign. The third line is a separate formula which shows how the second line would appear if it was centered.
It appears that the textPainter assumes both lines in the first formula are individually centered (instead of the second line being aligned slightly to the right with the "="):

The LaTex is respectively:
$$\begin{eqnarray}a+b+c+d+e+f&=&a+b+c+d+e+f\\0 &=& a+b+c+d+e+f-a-b-c-d-e-f\end{eqnarray}$$
$$0=a+b+c+d+e+f-a-b-c-d-e-f$$
Similar spacing issue:
$$\begin{pmatrix} y^{2}e^{xy} & (xy + 1)e^{xy} \\ (xy + 1)e^{xy} & x^{2}e^{xy} \end{pmatrix}$$
