I would like to define a number of related commands by using the counter in a for-loop.
For example, I want to define 26 commands like this:
\newcommand{\calA}{{\cal A}}
\newcommand{\calB}{{\cal B}}
...
I've been searching for a while (and have in fact learned quite a bit), but have still not found the answer. Here's my latest attempt (it uses the forloop package):
\newcounter{ct}
\forLoop{1}{26}{ct}{
\expandafter\newcommand\expandafter%
{\csname cal\Alph{ct}\endcsname}%
{{\cal \Alph{ct}}}
}
All 26 commands are created, but are all defined as {\cal Z}. I guess {\cal \Alph{ct}} is only expanded after the loop has completed.
How can I accomplish my goal? And how does it work?



