# [texhax] longtable/xcolor interaction

Uwe Kern u.kern at web.de
Tue Feb 1 11:45:52 CET 2005

<philip.ratcliffe at uninsubria.it> schrieb am 31.01.05 00:34:48:

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

> However, the problem really lies with the \rowcolors command, which works ok
> as
>
> \rowcolors[]{1}{green!25}{green!25}
>
> 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.

Thanks for pointing me to this problem and providing a minimal example.
A first investigation suggests that the bug materialises as a result
of longtable's redefinition of the \hline command which - as its doc says -
"is more like a \cline".
It turns out indeed that

\rowcolors[\cline{1-1}]{1}{red}{red}
\begin{tabular}
A\\
\end{tabular}

doesn't work either.

Thus, the bug is clearly due to the implementation of xcolor's
\rowcolors command which doesn't account for implicit \cr-type
commands within \rowcolors' optional argument.

Until I have fixed this bug in xcolor, I can only suggest not to use
\rowcolors[\hline]{...}{...} for longtable environments.

Best regards
Uwe

______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193