\
docsvlist
and \
forcsvlist
(from the etoolbox
package). The first uses the time-honoured LaTeX technique of
changing the definition of a \
do
command; it runs through the
list, and processes every item of the list as the argument of the
\
do
command; so:
will convert the elements of a CSV list into an itemised list. The macro\begin{itemize} \renewcommand*{\do}[1]{\item #1} \docsvlist{item1, item2, {item3a, item3b}, item4} \end{itemize}
\
forcsvlist
applies a function to each element of a
CSV list; this can of course be used to implement
\
docsvlist
, at the cost of a little clarity.
This answer was added: 2013-09-10
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ltx-csv