\documentclass{article}
\usepackage{forarray}
\begin{document}
\newcommand{\mytext}[1]{\gdef\themytext{#1}}
\newcommand{\mytest}[1]{\ForEach{,}{\typeout{\thislevelitem}}{#1}}
% this one works, it prints
% x
% y
% z
\mytest{x,y,z}
% this one doesn't work, it prints
% x,y,z
\mytext{x,y,z}
\mytest{\themytext}
\end{document}
This is a simplified example of an issue I'm facing writing a LaTeX class file. I can't get \ForEach to work when the list parameter comes via a global macro definition.
How can I modify the definition of \mytex so that the example works?
Thanks

\ForEachXis what you need. – egreg Jun 22 '12 at 13:41\ForEachXwould be easier – Daniel E. Shub Jun 22 '12 at 14:00\ForEachXfixes this issue for me very cleanly. Thank you. – fosstel Jun 22 '12 at 14:06