ConTeXt: Is ist possible to use matrices nested like in 'block' matrices?
I'm unsure whether this breaks something else but it seems as if the definition of \NC
is not reverted properly. Reported here: https://mailman.ntg.nl/pipermail/ntg-context/2017/089631.html
I cranked distance
up to 2em
to make the difference more visible.
\unprotect
\def\math_matrix_stop
{\crcr
% \ifgridsnapping \else
\mathstrut\crcr
\noalign{\vskip-\baselineskip}%
% \fi
\egroup
\gdef\math_matrix_NC{\endmath\aligntab}
\egroup
\mathmatrixright
\endgroup}
\protect
\definemathmatrix[pmatrix][left={\left(}, right={\right)}, distance=2em]
\def\matOne{\startmatrix\NC 1 \NC 0 \NR\NC 0 \NC 1\NR\stopmatrix}
\def\matTwo{\startmatrix\NC a\NR\NC b\NR\stopmatrix}
\def\matThree{\startmatrix\NC c \NC d\NR\stopmatrix}
\starttext
\startformula
\startpmatrix
\NC \matOne \NC \matTwo \NC \matTwo \NR
\NC \matThree \NC e \NC e\NR
\stoppmatrix
\stopformula
\startformula
\startpmatrix
\NC 1 \NC 0 \NC a \NR
\NC 0 \NC 1 \NC b \NR
\NC c \NC d \NC e\NR
\stoppmatrix
\stopformula
\stoptext