Skip to content

Commit 2a365ea

Browse files
committed
\pgfmatrix: deduplicate halign header.
This is to simplify code without changing functionality. Move \pgfmatrix@init@row out of halign header to this end. Signed-off-by: Gábor Braun <[email protected]>
1 parent ab2bedf commit 2a365ea

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

tex/generic/pgf/modules/pgfmodulematrix.code.tex

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,29 +186,17 @@
186186
}%
187187
\def\pgf@matrix@cont{%
188188
\setbox\pgf@matrix@box=\hbox\bgroup\vbox\bgroup%
189-
\halign\bgroup%
190189
\pgf@matrix@init@row%
191-
\pgf@matrix@step@column%
192-
{%
193-
\pgf@matrix@startcell%
194-
##%
195-
% Warning: \pgf@matrix@startcell relies on the next token being
196-
% \pgf@matrix@endcell here for checking emptiness of cell.
197-
\pgf@matrix@endcell%
198-
}%
199-
% Add a token after & in user input,
200-
% which provides content for the following cell and ends it.
201-
\aftergroup\pgf@matrix@nextcell%
190+
\halign\bgroup%
202191
&%
203-
##\pgf@matrix@padding&&%
204192
\pgf@matrix@step@column%
205193
{%
206194
\pgf@matrix@startcell%
207195
##%
208196
% Warning: \pgf@matrix@startcell relies on the next token being
209197
% \pgf@matrix@endcell here for checking emptiness of cell.
210198
\pgf@matrix@endcell%
211-
}
199+
}%
212200
% Add a token after & in user input,
213201
% which provides content for the following cell and ends it.
214202
\aftergroup\pgf@matrix@nextcell%
@@ -322,7 +310,6 @@
322310
% Init a line
323311

324312
\def\pgf@matrix@init@row{%
325-
\relax%
326313
\global\advance\pgfmatrixcurrentrow by 1\relax%
327314
\global\pgfmatrixcurrentcolumn=0\relax%
328315
\expandafter\gdef\csname pgf@matrix@maxy\the\pgfmatrixcurrentrow\endcsname{0pt}%
@@ -640,6 +627,7 @@
640627
\else%
641628
\global\let\pgf@matrix@row@finish=\pgfutil@empty%
642629
\fi%
630+
\pgf@matrix@init@row%
643631
}%
644632

645633

0 commit comments

Comments
 (0)