It seems that \NC in mathalignment is looking ahead for the next \NR, because when I wrap the matrix in an explicit brace group it works fine again:
\definemathmatrix [pmatrix] [left=\left(,right=\right)] \starttext \placeformula \startformula \startmathalignment \NC \sigma_x \NC= {\startpmatrix \NC 0 \NC 1 \NR \NC 1 \NC 0 \NR \stoppmatrix} \NR[+] \stopmathalignment \stopformula \stoptext On Tue, 2017-06-06 at 10:26 +1200, Henri Menke wrote: > Dear list, > > When I have a mathmatrix inside a mathalignment the numbering using \NR[+] > does not work anymore. > Instead it prints "[+]" on the next line. I guess the definition of \NR > from mathmatrix leaks > outside. Affects both TL2017 and latest beta. MWE is below. > > Cheers, Henri > > --- > > \definemathmatrix > [pmatrix] > [left=\left(,right=\right)] > > \starttext > > \startformula > \startmathalignment > \NC \sigma_x \NC= > \startpmatrix > \NC 0 \NC 1 \NR > \NC 1 \NC 0 \NR > \stoppmatrix > \NR[+] > \NC \sigma_y \NC= > \startpmatrix > \NC 0 \NC -i \NR > \NC i \NC 0 \NR > \stoppmatrix > \NR[+] > \NC \sigma_z \NC= > \startpmatrix > \NC 1 \NC 0 \NR > \NC 0 \NC -1 \NR > \stoppmatrix > \NR[+] > \stopmathalignment > \stopformula > > \stoptext ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________