Closed egorpugin closed 6 years ago
This is not a bug. It is also not a feature, but just normal behaviour.
In a table, there should be no stuff between \\\hline
and \end{tabular}
. With the given code, there is some internal processing which results in the empty table line.
The line can be easily suppressed, if the late after line
option is used which puts code after this internal processing. You will find this in the documentation everywhere for tables.
With the given example, you need the following modification:
\documentclass{article}
\usepackage{csvsimple}
\begin{filecontents*}{grade.csv}
name,givenname,matriculation,gender,grade
Maier,Hans,12345,m,1.0
Huber,Anna,23456,f,2.3
Weisbaeck,Werner,34567,m,5.0
\end{filecontents*}
\begin{document}
\begin{tabular}{l|c}%
\csvreader[head to column names,
late after line=\\\hline% <------------------
]{grade.csv}{}% use head of csv as column names
{\givenname\ \name & \matriculation}% specify your coloumns here
\end{tabular}
\end{document}
Thank you!
Hi,
I'm using \csvloop like this and get the new line or whatever at the end for some reason. Thus my table is showed incorrectly. (Manual table fill works fine.)
Is this a bug or is there a way to supress it? I tried some simple changes in the style file but did not succeed.
Screenshot:![Image of Yaktocat](https://i.imgur.com/HlXGV5u.png)
Simple repro with yours example:
You'll get the last empty row.