Quantcast
Channel: One cell too many with datatool and longtable - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by David Carlisle for One cell too many with datatool and longtable

$
0
0

datatool apparently doesn't protect its internals enough to be used in this context. You can hide the switching in \noalign as below. I also removed the center environment as it has no effect on longtable.

\documentclass{article}\usepackage{datatool,longtable}\begin{document}\DTLsetseparator{;} \DTLloaddb{kundt2}{kundt2.csv}\begin{longtable}{|c|c|c|}\caption[De berekende bronsterkte van de buis]{De berekende bronsterkte van de buis} \label{tbl:kundt2} \\\hline\endfirsthead\endhead\endfoot\endlastfoot\noalign\bgroup\DTLforeach{kundt2}{\1=1, \2=2, \3=3}{\egroup\ifthenelse{\value{DTLrowi}>0}{\1 & \2 & \3 \\ \hline }{}\noalign\bgroup}\egroup\end{longtable}\end{document}

enter image description here


Viewing all articles
Browse latest Browse all 2

Trending Articles