summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/math-ali.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-09-08 18:33:04 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-09-08 18:33:04 +0200
commit6b89257547b260e08e805816ef752a4b5018328e (patch)
treefc4be03efff7d809523bc00d2fea24e1d10035b2 /tex/context/base/mkiv/math-ali.mkiv
parent8601b3c9b34e6ff21d413b5b9256d76d867c2aec (diff)
downloadcontext-6b89257547b260e08e805816ef752a4b5018328e.tar.gz
2017-09-08 17:29:00
Diffstat (limited to 'tex/context/base/mkiv/math-ali.mkiv')
-rw-r--r--tex/context/base/mkiv/math-ali.mkiv42
1 files changed, 27 insertions, 15 deletions
diff --git a/tex/context/base/mkiv/math-ali.mkiv b/tex/context/base/mkiv/math-ali.mkiv
index c82170463..40da3d4c9 100644
--- a/tex/context/base/mkiv/math-ali.mkiv
+++ b/tex/context/base/mkiv/math-ali.mkiv
@@ -866,8 +866,25 @@
\alignmark\alignmark
\math_matrix_stop_cell}
-\def\math_matrix_make_pickup
- {\gdef\NC{\gdef\NC{\aligntab}}}
+\newconditional\c_math_matrix_first
+
+\def\math_matrix_NR
+ {\aligntab\omit
+ \math_matrix_stop_row
+ \math_matrix_pickup
+ \crcr
+ \math_matrix_start_row}
+
+\def\math_matrix_NC
+ {\ifconditional\c_math_matrix_first
+ \expandafter\math_matrix_NC_yes
+ \else
+ \expandafter\math_matrix_NC_nop
+ \fi}
+
+\def\math_matrix_pickup{\global\settrue \c_math_matrix_first}
+\def\math_matrix_NC_yes{\global\setfalse\c_math_matrix_first}
+\def\math_matrix_NC_nop{\aligntab} % avoids lookahead
% \def\math_matrix_stop_wrapup
% {\crcr
@@ -879,17 +896,12 @@
{\dontleavehmode
\bgroup
\tabskip\zeropoint
- \math_matrix_make_pickup
- \def\NR{%
- \aligntab\omit
- \math_matrix_stop_row
- \math_matrix_make_pickup
- \crcr
- \math_matrix_start_row
- }%
+ \math_matrix_pickup
+ \let\NR\math_matrix_NR
+ \let\NC\math_matrix_NC
+ \let\MC\math_matrix_NC
%
\let\endmath\relax
- \def\MC{\NC}%
%
\setbox\nextbox\vbox\bgroup
\math_matrix_start_table
@@ -942,8 +954,8 @@
\rawprocesscommacommand[\mathmatrixparameter\c!align]\math_matrix_set_columns_step}
\unexpanded\def\math_matrix_start#1%
- {\pushmacro\NC % not tested that well
- \begingroup
+ {\begingroup
+ \globalpushmacro\c_math_matrix_first
\edef\currentmathmatrix{#1}%
\dosingleempty\math_matrix_start_indeed}
@@ -958,8 +970,8 @@
\def\math_matrix_stop
{\math_matrix_stop_processing
- \endgroup
- \popmacro\NC}
+ \globalpopmacro\c_math_matrix_first
+ \endgroup}
% vcenter:
%