I am trying to use CSV reader (from the csvsimple package) to print out some data to a table. However, I am observing a weird offset in the first two cells of the first column:
\documentclass[12pt,a4paper]{report}
\usepackage{csvsimple}
\usepackage{filecontents}
\begin{document}
\begin{filecontents}[overwrite]{data.csv}
x,y,z
42,43,44
42,43,44
42,43,44
42,43,44
42,43,44
\end{filecontents}
\begin{table}[h]
\centering
\begin{tabular}{|l|l|l|}
\hline
$x$ & $y$ & $z$
\tabularnewline
\hline\hline
42 & 43 & 44 \tabularnewline\hline
\csvreader[
head to column names,
late after line=\tabularnewline\hline]
{data.csv}{}{
\x & \y & \z
}
\end{tabular}
\end{table}
\end{document}
This issue clearly comes from the \csvreader macro (removing the first line of hardcoded data does not affect the offset); using p{0.5cm} instead of l solves the issue for me, but I would ideally want to stick with l. What am I missing here?
My TeX is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.10.20)
My csvsimple is Package: csvsimple 2019/04/09 version 1.21 LaTeX CSV file processing
UPD: ideally, I would like to retain the separation of the body of the table and the header, since this is a small piece of a bigger puzzle and I would like to be able to design a complex table header)





