The problem
I am having a problem reading tab-delimited files using csv-simple. My question is how do I fix it, and why is it occuring in the first place
MWE
\documentclass[a4paper]{article}
\usepackage{csvsimple}
\usepackage[centering,margin=1in]{geometry}
\begin{filecontents*}{\jobname.csv}
abc def
fgh ijk
\end{filecontents*}
\begin{document}
\begin{tabbing}
\hspace*{2cm}\=\hspace*{2.5cm}\= \kill
\csvreader[head=false,separator=tab]{\jobname.csv}{1=\word,2=\meaning}{\word \> \meaning\\}
\end{tabbing}
\end{document}
Problem
! Undefined control sequence.
\meaning ->\csvcolii
Update 1
So it was suggested that filecontents*
does not preserve tabs. So I created a separate file with tabs, and updated my code.
Both of them are here: https://gist.github.com/deepakjois/7d70ef87b061c97f91e9
Now I am getting a really funny output, where the second column of the first row is repeating for all the rows.
\meaning
is a reserved LaTeX command. Shows you the content of a macro.filecontents*
doesn't output tab characters.