Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I was trying to compose an answer to Bold one cell in table using CSV reader using the collcell package, and can't seem to get it to work either with the csvsimple tabluar, nor datatool.

With the cvssimple, I get:

Runaway argument?
! Paragraph ended before \collect@cell@arg was complete.
 <to be read again> 

With the datatool I get:

! TeX capacity exceeded, sorry [input stack size=5000]. \reserved@a ->\def \reserved@a *{\let \@xs@assign \@xs@expand@and@detokenize... l.56 \end{tabular}

! ==> Fatal error occurred, no output PDF file produced!

enter image description here


  • Apologies for the formatting screw up: But before you attempt to edit it to fix it, see Preview not displaying identical to final post

  • The MWE below code compiles fine and produces the output shown above as the cvssimple and datatool tables below do not use the collcell pacakge. In order to attempt to use the collcell package the two tabular column specifications need to be changed from l l to L L so that the \newcolumntype is used.



% Make csv in question


% Need this so that the header rows is not passed to \collectcell


Normal \textbf{tabular}:\par
\begin{tabular}{L L}\toprule
    \Header{First Name} & \Header{Last Name}\\\cmidrule{1-2} 
    Albert  & Einstein  \\
    Marie   & Curie     \\
    Thomas  & Edison    \\

Using \verb|\csvreader|:\par
\csvreader[tabular=l l,
    table head=\Header{First Name} & \Header{Last Name} \\\hline]%
{\name & \surname}%

Using \verb|\DTLforeach|:\par
\begin{tabular}{l l}\toprule
    \Header{First Name} & \Header{Last Name}\\\cmidrule{1-2} 
        \Name & \Surname \\
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The collcell package (written by me) scans over the tabular content to find the end of the cell by looking for the tokens automatically added by TeX when finding the next & or for \\ etc. I don't think it is compatible with cvssimple, which will add such tokens in a different way I guess, even if it doesn't matter for the typesetting itself.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.