I would like to be able to turn a list A,B,C
into A \\ B \\ C
, where A, B, C are LaTeX expressions. It would be quite simple to do with a package like xstring
, but for the possibility that A, B or C contain a comma. So I thought of using xparse
,writing some code like {>{\SplitList{,}}m}
.
Unfortunately not only it didn't work, but even trying such a simple thing as:
\DeclareDocumentCommand\foo%
{>{\SplitList{,}}m}%
{\ProcessList{#1}{#1 X}
.......................
\foo{a,b,c}
just produces:
I expected aXbXcX
. I really don't understand what's happening, nor what ProcessList
does.
Another problem is that up to now, I've no idea how to indicate the replacement of the separating commas with newline commands.