I would like to learn to manipulate comma separated lists in Latex.
To give a concreet but artificial example, I would like to have this command:
\swap{1,10}
expand to this:
{10,1}
How can I achieve it?
comma-separated listmacros
I would like to learn to manipulate comma separated lists in Latex.
To give a concreet but artificial example, I would like to have this command:
\swap{1,10}
expand to this:
{10,1}
How can I achieve it?
Best Answer
I think you should ask what you want in full generality. For your concrete example,
should work, although I didn't test it.