1

I've been using both colortbl and longtable together, on big documents, for years (the former to color rows, columns, or individual cells), and the latter to allow big table to break over pages. In past, using the two together caused no problems at all. However, with the recent update to 'tools' (where longtable lives), colortbl causes problems that it didn't used to.

Here's an MWE - it compile perfectly, until you uncomment colortbl. If this is a non-fixalbe incompatability, I'll have to revert to an older version of the tools packgel. The hundreds of pages I'd have to recode in various books that rely on both longtable and colortbl being able to play nice is more than daunting...

Any suggestions (beyond reverting to an older version of things...)?

 \documentclass[12pt]{article}

 % \usepackage{colortbl}

 \usepackage{longtable}

 \begin{document}

 \begin{center}
 \begin{longtable}{cp{9.5cm}}
 \emph{code} & \emph{interpretation} \\
 \\[-0.2cm]
 \texttt{111} & Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
 Quisque faucibus mi varius, aliquam quam et, commodo diam. Mauris congue 
 aliquam dolor, vel sollicitudin enim consequat id.  
 \\
 \\[-0.2cm]
 \texttt{110} & Aliquam hendrerit elit dolor, quis venenatis lorem rutrum 
 ut. Aenean eget ante luctus lacus accumsan varius. Cras massa odio, 
 fringilla scelerisque laoreet id, pulvinar nec tortor.
 \\
 \end{longtable}
 \end{center}

 \end{document}
2
  • 1
    if you update your tex system you should get a newer colortbl that fixes this, sorry about the inconvenience. Incidentally don't enclose longtable in a center environment: it doesn't cemter it, it just adds spurious vertical space. Dec 20, 2018 at 1:06
  • OK -- thanks. I realized the problem must be colortbl, because it also 'doesn't polay nice' with tabularx, or any other table environments. Your suggestion solved the problem. Dec 20, 2018 at 1:18

0

Browse other questions tagged .