0

The title says it all. I would like to create a list in a macro, and then iterate over it using TikZ's \foreach macro. Alas, as usual, superimposition does not work here, as the following MWE shows. What do I miss?

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\newcommand\magic{tiddly, tiddly, winky, woo} 
\begin{tikzpicture}
\foreach \w [count=\n] in {tiddly, tiddly, winky, woo} 
\node[anchor=west] at (0,-\n) {\n.\w};
\foreach \w [count=\n] in {\magic}
\node[anchor=west] at (3,-\n) {\n.\w};
\end{tikzpicture}
\end{document}

enter image description here

azetina
  • 28,884
Yossi Gil
  • 15,951

0 Answers0