diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-27 00:01:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-27 00:01:50 +0000 |
commit | 90ae413a94da014dbf7a6a8ab584f7c668483a5a (patch) | |
tree | 4e0528a2b2fb2004988e7fc804ea2f1354f1f5d5 /Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex | |
parent | 800cc56380d1edfe567a6a66bef13e8950eb2b0c (diff) |
pgf 3.0.0
git-svn-id: svn://tug.org/texlive/trunk@33057 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex | 72 |
1 files changed, 38 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex index 32024c047d6..a9344f6c95c 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulematrix.code.tex,v 1.4 2010/08/24 21:28:58 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulematrix.code.tex,v 1.8 2013/09/17 17:34:00 tantau Exp $ \usepgfmodule{shapes} @@ -156,7 +156,7 @@ \def\pgfmatrix#1#2#3#4#5#6{% \ifpgfmatrix% - \PackageError{pgf}{You cannot nest pgfmatrix environments, yet}{} + \pgferror{You cannot nest pgfmatrix environments, yet} \fi% \bgroup% \everycr{}% @@ -270,26 +270,7 @@ \pgfutil@ifnextchar[{\pgf@matrix@cell@cont}{\pgf@matrix@cell@cont[0pt]}}%} \def\pgf@matrix@cell@cont[#1]{% - \ifnum\pgfmatrixcurrentcolumn<\pgf@matrix@numberofcolumns% - \else% - {% - \global\pgf@matrix@fixedfalse% - \pgf@x=0pt% - \pgf@matrix@addtolength{\pgf@x}{\pgfmatrixcolumnsep}% - \pgf@matrix@addtolength{\pgf@x}{#1}% - \ifpgf@matrix@fixed% - \expandafter\pgfutil@g@addto@macro\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname% - {\global\pgf@picmaxx=0pt}% - \fi% - \advance\pgfmatrixcurrentcolumn by1\relax % only temporary for the following: - \expandafter\xdef\csname pgf@matrix@column@sep@\the\pgfmatrixcurrentcolumn\endcsname{\the\pgf@x}% - \ifpgf@matrix@fixed% - \expandafter\gdef\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname{\global\pgf@picminx=0pt}% - \else% - \expandafter\global\expandafter\let\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname=\pgfutil@empty% - \fi% - }% - \fi% + \xdef\pgf@matrix@last@nextcell@options{#1}% &\pgf@matrix@correct@calltrue&% }% @@ -402,19 +383,41 @@ \def\pgf@matrix@endcell{% \ifpgf@matrix@empty@cell@% \else% - \expandafter\pgfmatrixendcode% - \fi + \expandafter\expandafter\expandafter\pgfmatrixendcode% + \expandafter\ifpgf@matrix@last@cell@in@row\expandafter\pgf@matrix@last@cell@in@rowtrue\expandafter\fi% + \fi% \pgfsys@endpicture% + \ifnum\pgfmatrixcurrentcolumn<\pgf@matrix@numberofcolumns% + \else% + \ifpgf@matrix@last@cell@in@row\else% + {% + \global\pgf@matrix@fixedfalse% + \pgf@x=0pt% + \pgf@matrix@addtolength{\pgf@x}{\pgfmatrixcolumnsep}% + \pgf@matrix@addtolength{\pgf@x}{\pgf@matrix@last@nextcell@options}% + \ifpgf@matrix@fixed% + \expandafter\pgfutil@g@addto@macro\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname% + {\global\pgf@picmaxx=0pt}% + \fi% + \advance\pgfmatrixcurrentcolumn by1\relax % only temporary for the following: + \expandafter\xdef\csname pgf@matrix@column@sep@\the\pgfmatrixcurrentcolumn\endcsname{\the\pgf@x}% + \ifpgf@matrix@fixed% + \expandafter\gdef\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname{\global\pgf@picminx=0pt}% + \else% + \expandafter\global\expandafter\let\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname=\pgfutil@empty% + \fi% + }% + \fi\fi% + % Special case of the empty picture + \ifdim\pgf@picmaxx=-16000pt\relax% + \global\pgf@picmaxx=0pt\relax% + \global\pgf@picminx=0pt\relax% + \global\pgf@picmaxy=0pt\relax% + \global\pgf@picminy=0pt\relax% + \fi% \csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname% \pgf@matrix@row@finish% \egroup\egroup% - % Special case of the empty picture - \ifdim\pgf@picmaxx=-16000pt\relax% - \pgf@picmaxx=0pt\relax% - \pgf@picminx=0pt\relax% - \pgf@picmaxy=0pt\relax% - \pgf@picminy=0pt\relax% - \fi% % % Step 5: Horizontal gap % @@ -495,8 +498,7 @@ \def\pgf@matrix@padding{% \ifpgf@matrix@correct@call% \else% - \PackageError{pgfbasematrix}{Single ampersand used with wrong - catcode}{}% + \pgferror{Single ampersand used with wrong catcode}% \fi% \hskip\pgf@matrix@paddingskip\hfil% } @@ -599,13 +601,15 @@ % if the cell contains nothing, the following \let will be at the % beginning (macro expansion has stopped here since neither \omit % nor \span was found) - \let\pgf@matrix@signal@cell@end=\pgf@matrix@signal@cell@end% + \let\pgf@matrix@signal@cell@end=\pgf@matrix@signal@cell@end + \pgf@matrix@last@cell@in@rowtrue% &\pgf@matrix@correct@calltrue% \global\pgf@matrix@fixedfalse% \pgf@y=0pt% \pgf@matrix@addtolength\pgf@y{\pgfmatrixrowsep}% \pgfutil@ifnextchar[{\pgfmatrixendrow@skip}{\pgf@matrix@finish@line}% } +\newif\ifpgf@matrix@last@cell@in@row \def\pgf@matrix@signal@cell@end{\pgf@matrix@signal@cell@end} % exact definition does not matter, only needs to be unique. |