Skip to content

Commit

Permalink
Little improvements for matrix/inner style
Browse files Browse the repository at this point in the history
  • Loading branch information
hmenke committed Jun 1, 2020
1 parent 65bcaaf commit 5c96618
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions doc/generic/pgf/text-en/pgfmanual-en-tikz-matrices.tex
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ \subsubsection{Cell Styles and Options}
\begin{stylekey}{/tikz/matrix/inner style/even odd row}
Wraps |/tikz/every even row| and |/tikz/every odd row|.
\end{stylekey}
\begin{stylekey}{/tikz/matrix/inner style/this cell}
\begin{stylekey}{/tikz/matrix/inner style/cell}
Wraps |/tikz/row |\meta{number}| column |\meta{number}.
\end{stylekey}

Expand All @@ -512,7 +512,7 @@ \subsubsection{Cell Styles and Options}
even odd column,
row,
even odd row,
this cell
cell
}
}
\end{codeexample}
Expand All @@ -535,7 +535,7 @@ \subsubsection{Cell Styles and Options}
even odd row,
column,
row,
this cell,
cell,
/tikz/my style
}
}
Expand Down
12 changes: 8 additions & 4 deletions tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4023,7 +4023,7 @@
\tikzset{every even row/.try}%
\fi
},
matrix/inner style/this cell/.code={%
matrix/inner style/cell/.code={%
\tikzset{row \the\pgfmatrixcurrentrow\space column \the\pgfmatrixcurrentcolumn/.try}%
},
matrix/inner style order/.store in=\tikz@common@matrix@code@styleorder,
Expand All @@ -4033,7 +4033,7 @@
even odd column,
row,
even odd row,
this cell
cell
},
}%
Expand Down Expand Up @@ -4089,8 +4089,12 @@
\let\tikz@options=\pgfutil@empty%
\let\tikz@mode=\pgfutil@empty%
\pgfutil@for\pgf@temp:=\tikz@common@matrix@code@styleorder\do{%
\expandafter\def\expandafter\pgf@temp\expandafter{\romannumeral-`0\expandafter\pgfutil@trimspaces\expandafter{\pgf@temp}}%
\pgfutil@ifempty\pgf@temp{}{\expandafter\tikzset\expandafter{matrix/inner style/.cd,\pgf@temp/.try}}%
\toks0=\expandafter{\romannumeral-`0\expandafter\pgfutil@trimspaces\expandafter{\pgf@temp}}%
\def\pgf@marshal{}%
\pgfutil@ifempty\pgf@temp{}{%
\edef\pgf@marshal{\noexpand\tikzset{matrix/inner style/.cd,\the\toks0}}%
}%
\pgf@marshal
}%
\tikz@options%
}%
Expand Down

0 comments on commit 5c96618

Please sign in to comment.