[texhax] custom style sheet
Martin Heller
mr_heller at yahoo.dk
Tue Aug 2 14:48:12 CEST 2011
Michael P. Soulier wrote, on 02-08-2011 14:02:
> Thanks, although the help examples don't seem to work.
>
> \rowcolor{gray}{.9}
The syntax is \rowcolor[gray]{0.9}
> results in
>
> ! LaTeX Error: Undefined color `gray'.
>
> I included the color package but no difference.
You need xcolor.
\documentclass{article}
\usepackage[table]{xcolor} % loads colortbl
\begin{document}
\begin{tabular}{|l|c|}
\rowcolor[gray]{.9}
one&two\\
\rowcolor[gray]{.5}
three&four
\end{tabular}
\end{document}
More information about the texhax
mailing list