[texhax] longtable/xcolor interaction

Philip G. Ratcliffe philipratcliffe at tiscali.it
Mon Jan 31 00:34:55 CET 2005

> At a suggestion I received during the discussion, I am trying
> "longtable", and not having any luck.  The Companion2 and the FAQ are
> silent on this, so I assume I am doing something stupid.

Well, they can't foresee all errors one might make in typing, but read on

> When I try to typeset the lines shown below, I get an immediate failure
> (TeX capacity exceeded [input stack size=5000]).

Such an error is nearly always a sign of an error in the LaTeX input source
and one can usually uncover the problem by commenting out lines until it
goes away.

Now, having said that, I'm no expert on the packages you're using, but I'd
say you've found a bug.

First of all though, the \caption line should apparently be

  \caption{Table of values for selected $N$}\\

i.e. with \\ at the end.

However, the problem really lies with the \rowcolors command, which works ok


but not with \hline as the optional argument, despite the manual
specifically saying it may be used like this.  Indeed, it does work fine
that way together with an ordinary tabular environment; so this seems to be
a problem of package clash.

Note that I'm cc'ing the xcolor package author.  Here's a minimal buggy
script to play with:

%\rowcolors[      ]{1}{red}{red} % this works
%\rowcolors[\hline]{1}{red}{red} % this doesn't
\caption{Bug example}\\

Cordialmente,  Philip G. Ratcliffe

Professor of Nuclear & Subnuclear Physics
Dipartimento di Fisica e Matematica
Universita degli Studi dell'Insubria
via Valleggio 11
22100 Como (CO)

Tel. +39 (031) 238.6231
Fax  +39 (031) 238.6119
Cell +39 (340) 2346580
Web  http://www.unico.it/~pgr

More information about the texhax mailing list