The following code works in the minimal example but not in my document
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\pgfplotsinvokeforeach{1,2,...,10} {
\edef\nursery{#1}
\nursery
}
\end{document}
i get the error
! Illegal parameter number in definition of \pgffor@body.
<to be read again>
1
l.143 }
somebody knows this problem?
##1instead (or perhaps even more hashes)? This is the typical way how to solve nested macro definitions – Christian Feuersänger Apr 21 '11 at 20:50\forach \nursery in {1,2,...,10} {\nursery}instead. In the (rare) case that you need control over TeX groups, you can also use\pgfplotsforeachungrouped \nursery in {1,2,...,10} {\nursery}. – Christian Feuersänger Apr 21 '11 at 20:52