Certain special characters in .csv files cause LaTeX to throw "Undefined Control Sequence" errors
Closed this issue · 1 comments
Leonerd-04 commented
I believe the error is due to this package; if not I'd appreciate anyone who could direct me to what is likely causing the error.
When trying to read data values from a .csv file, LaTeX throws multiple "Undefined Control Sequence" errors whenever one of the columns is named "θ". I tried multiple fixes and the only one that worked was setting that column's name to "theta" instead.
Even if special characters like θ are not supposed to be supported, a more informative error message is needed here.
hmenke commented
Not reproducible.
% just some bogus data
\begin{filecontents*}[force]{data.csv}
r,θ,φ
0,10,0
1,20,-1
2,30,1
\end{filecontents*}
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot table [col sep=comma,x=r,y=θ] {data.csv};
\end{axis}
\end{tikzpicture}
\end{document}