0

These two loops do not produce the same result:

\documentclass{article}

\usepackage{tikz}

\begin{document}

\foreach \i in {a,b,c} {%
    \i+
}

\def\Index{a,b,c}
\foreach \i in {\Index} {%
    \i+
}

\end{document}

two different lines

Why is this? How do I get \foreach to iterate over the comma-separated content of \Index even though it looks like a single token?

iago-lito
  • 1,472

0 Answers0