[texhax] custom style sheet

Uwe Lueck uwe.lueck at web.de
Thu Aug 18 17:11:27 CEST 2011


"Michael P. Soulier" <msoulier at digitaltorque.ca> scripsit 29.07.2011 13:12:07:
> [...]
> The tabular environment is being used, and I was hoping to
> alternate a background colour on each row to make the rows easier to follow.

During a more general discussion of typesetting tables elsewhere, I found

    http://en.wikibooks.org/wiki/LaTeX/Tables#Alternate_Row_Colors_in_Tables

So the \rowcolors command, provided by the xcolor pacakge
(which seems to use colortbl's \rowcolor), provides automatical toggling,
now row-wise \rowcolor needed.

I guess for the colours tried in previous postings, the command is

    \rowcolors{1}{[gray]{.9}}{[gray]{.5}}

preceding the table.

I think Martin Heller

    http://tug.org/mailman/htdig/texhax/2011-August/017969.html

was wrong in saying that his proposal needs xcolor,
because (i) he used just \rowcolor from colortbl, and
(ii) the colour model "gray" he used is provided by
the standard color package already.

In the CSS world, this style of tables seems to be called "zebra tables" (google).

Cheers,

    Uwe.



More information about the texhax mailing list