Is there a way to make an array in LaTeX. I want to write a function that does this (here the array has only 2 elements but I want to be able to have many as I want).
\foo{\MakeArray{foo,bar}}
foo|bar-foo&bar
I could have done this like that
\newcommand\foo[2]{\1-\2}
\foo{foo|bar}{foo&bar}
But I need to enter the elements twice which is not very neat...



arrayjobxpacakge, but I tend to just use comma separated lists, and use pgf's\foreachto process them.newcommand{\fooArray}{foo,bar}should suffice. – Peter Grill Sep 15 '12 at 0:12