I have a problem with foreach loop. When I pass parameters as list with '/' used as separator it works really well. However when any element in that list is defined with \def the separator seems to not work and the strings are concatenated.
\newcommand{\testme}[1]{
\foreach \aa/\bb in {#1} {
|\aa| |\bb| \newline
}
}
\def\testmedef{{xyz}/{XYZ}}
\testme{
{abc}/{CDE},
\testmedef%
}
Result:
|abc|CDE|
|xyz/XYZ|xyz/XYZ|
Thank you for your kind help!
ExpandArgs
pstricks - How do I have to invoke \expandafter for a macro with multiple arguments? - TeX - LaTeX Stack Exchange%
at exactly the wrong locations. See symbols - What is the use of percent signs (%) at the end of lines? (Why is my macro creating extra space?) - TeX - LaTeX Stack Exchange and the linked question