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}
.\expandafter\ListParser\expandafter{\precondition}
.itemize
environment inside atabular
environment cell without providing a\parbox
around it\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.