I want to create a bullet list from a string with delimiters in it.
The delimiter in my example is |
Example string:
This is|A bullet|List from|A string
I want to get that to become a bulletlist like this:
- This is
- A bullet
- List from
- A string
What do I need to do this? Some extra packages or?
I can use any delimiter but , since the string comes from a CSV file that gets parsed with csvsimple if that makes it easier.
MWE (after suggestions in answer):
\documentclass{scrreprt}
\usepackage{csvsimple}
\usepackage{etoolbox}
\csvreader[head to column names]{content/usecases.csv}{}{%
\begin{table}
\begin{tabular}{|l|l|}
\hline
Name & \ucname \\ \hline
Pre conditions &
\begin{itemize}
\renewcommand*{\do}[1]{\item #1}%
\ListParser{\preconditions} %
\end{itemize} \\ \hline
\end{tabular}
\end{table}
}
\end{document}
CSV Example:
ucname,precondition
test,This is|A test
test2,Barely
test3,No List
test4,List|Again|Here
Follow-up posted here: Auto generate list-items within table from string with delimiter


\documentclass{...}and ending with\end{document}. – Aug 12 '14 at 21:51\expandafter\ListParser\expandafter{\precondition}. – Werner Aug 12 '14 at 22:24itemizeenvironment inside atabularenvironment cell without providing a\parboxaround it – Aug 12 '14 at 22:27\do undefined. }. It is not all of the entries in my CSV that actually generates an output with multiple items for a list. Will add CSV example in a sec. – Frederik Aug 12 '14 at 22:29\newcommand*{\do}...instead of\renewcommand*{\do}...– Aug 12 '14 at 22:33Illegal parameter number in definition of \csv@@body. }– Frederik Aug 12 '14 at 22:34