matrix
command to create tikz diagrams like
Code: Select all
\begin{tikzpicture}[-stealth',looseness=.5,auto]
\matrix [matrix of math nodes, column sep={1.5cm,between origins}, row sep={1.5cm,between origins}]
{|(a)| A& |(b)| B& |(c)| C \\[12pt]
&|(x)| \alpha & \\
};
\end{tikzpicture}
Code: Select all
\def\contenumatrice{|(a)| A& |(b)| B& |(c)| C \\[12pt] &|(x)| \alpha& \\}
Code: Select all
\begin{tikzpicture}[-stealth',looseness=.5,auto]
\matrix[matrix of math nodes, column sep={1.5cm,between origins}, row sep={1.5cm,between origins}]
{\contenumatrice};
\end{tikzpicture}
I then tried to force the development of
\contenumatrice
with \expandafter
:
Code: Select all
\begin{tikzpicture}[-stealth',looseness=.5,auto]\expandafter\matrix\expandafter[matrix of math nodes, column sep={1.5cm,between origins}, row sep={1.5cm,between origins}]
\expandafter{\contenumatrice};
\end{tikzpicture}
\expandafter
" which I haven't found explained in the pgftikz manual. Clearly, tikz does not accept the parameterization of a matrix command using a macro. Is it possible to force tikz to use a macro's development of a macro as an argument to the matrix?