# [texhax] custom style sheet

Uwe Lueck uwe.lueck at web.de
Fri Aug 19 12:41:21 CEST 2011

"Michael P. Soulier" <msoulier at digitaltorque.ca> wrote 19.08.2011 11:09:09:
> On 19/08/11 Arnaud Schmittbuhl said:
>> Le Thu, 18 Aug 2011 20:52:32 -0400,
>> "Michael P. Soulier" <msoulier at digitaltorque.ca> a écrit :
>> > The problem with that is that there's no way I can see to specify an
>> > initial table header colour, followed by alternating colours, which
>> > is what I require.
>>
>> It has to be done inside the tabular environment
>
> Yes, which is what I do now, but it has required me to patch the tool that's
> generating my LaTeX, so it's unfortunate that this cannot be done via
> stylesheet. That would seem to be what a stylesheet is for, but alas...

\newenvironment{myzebratable}[2][c]
{\rowcolors{2}{gray!30}{gray!15}%
\tabular[#1]{#2}%
\rowcolor{gray!55}}
{\endtabular}

\begin{myzebratable}{lll}
even    & even  & even\\
odd     & odd   & odd \\
even    & even  & even\\
\end{myzebratable}

?

I also wonder what happens if the \rowcolors command occurs once
in the style file only (instead of my proposal above).

Curious:

Uwe.