Skip to content

Commit fbcaa39

Browse files
committed
\pgfmatrix: Optimize out \pgf@matrix@column@sep@N.
Simplify code to handle column separation in pgf matrices: change \pgf@picminx only once per matrix cell for this purpose. Signed-off-by: Gábor Braun <[email protected]>
1 parent aea0349 commit fbcaa39

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

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

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,10 @@
393393
\advance\pgf@x by -\pgf@xa%
394394
\fi%
395395
\advance\pgfmatrixcurrentcolumn by1\relax % only temporary for the following:
396-
\expandafter\xdef\csname pgf@matrix@column@sep@\the\pgfmatrixcurrentcolumn\endcsname{\the\pgf@x}%
397-
\ifpgf@matrix@fixed%
398-
\expandafter\gdef\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname{\global\pgf@picminx=0pt}%
399-
\else%
400-
\expandafter\global\expandafter\let\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname=\pgfutil@empty%
401-
\fi%
396+
\expandafter\xdef\csname pgf@matrix@column@finish@%
397+
\the\pgfmatrixcurrentcolumn\endcsname%
398+
{\global\ifpgf@matrix@fixed\else\advance\fi%
399+
\pgf@picminx -\the\pgf@x}%
402400
}%
403401
\fi%
404402
&%
@@ -416,17 +414,13 @@
416414
\global\pgf@picmaxy=0pt\relax%
417415
\global\pgf@picminy=0pt\relax%
418416
\fi%
417+
%
418+
% Step 5: Row and column separation
419+
%
419420
\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname%
420421
\pgf@matrix@row@finish%
421422
\egroup\egroup%
422423
%
423-
% Step 5: Horizontal gap
424-
%
425-
\ifnum\pgfmatrixcurrentcolumn>1\relax%
426-
\pgf@y=\csname pgf@matrix@column@sep@\the\pgfmatrixcurrentcolumn\endcsname\relax%
427-
\advance\pgf@picminx by-\pgf@y%
428-
\fi%
429-
%
430424
% Step 6: Protocol and adjust height and depth
431425
%
432426
% Step 6.1: Protocol...

0 commit comments

Comments
 (0)