TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to pass a numeric set to the list argument of the \pgfplotsinvokeforeach command? I need something like this:

\pgfplotsinvokeforeach{\a} {<...>}

Thank you

share|improve this question
up vote 5 down vote accepted

You'll have to expand the list macro first:


    #1 \par%


share|improve this answer
\expandafter\pgfplotsinvokeforeach\expandafter{\mylist}{<...>} is easier. – egreg May 1 '12 at 13:31
@egreg: Hehe, thanks, you're right. \expandafters make my head hurt. – Jake May 1 '12 at 13:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.