I was wondering if there is a way to use macro within a \foreach
loop. For example some of my defined locals are:
\newcommand{\labA}{Adult}
\newcommand{\labB}{Adolescent}
\newcommand{\labC}{Child}
In the main text, what I want to do is generate a for loop with A B C, but present the \labA
, \labB
and \labC
. For example
\foreach \age in {A,B,C}
{
(I want to show \lab\age here)
}
However, \lab\age
does not seem to work, and I was wondering if there is a way to show local that contains local (A, B, and C) from the loop.