I have been using the list parsing functionality from etoolbox and I have a weird use case in which I want a space separated list.
\usepackage{etoolbox}
\DeclareListParser*{\symbolListParser}{<symbol for space character>}
\newcommand{\processSymbolList}[1]{
\symbolListParser{}{#1}
}
I am unsure where to even start looking. I have poked around for a while looking at documentation about lists, documentation about space, and documentation about ascii characters to no avail.
so if someone could either tell me how to do it, where to look or that it isn't possible I would really appreciate it.
UPDATE: I did find this but I was looking for something a bit cleaner like what the OP wanted
UPDATE2: Thanks to Tobi for the answer. I've accepted it. below is a more general version of spacelist that behaves more like the list parser
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{ \spacelist }{ mm }{
\seq_set_split:Nnn \l_tmpa_seq { ~ } { #2 }
\seq_map_inline:Nn \l_tmpa_seq {
#1{##1}
}
}
\ExplSyntaxOff
% to use you would write it like:
\spacelist{\fbox}{Boxes and Spaces in a List}
etoolbox
lists can be space separated. It probably depends on the implementation, where probably both delimited and undelimited arguments are used; when TeX is looking for an undelimited argument, it ignores spaces as it goes, and this may explain the infinite loop it enters if you use{ }
as the delimiter argument. – egreg Feb 16 '15 at 21:25