I'm doing some tables using LyX and I tried to set a color background in the cells , but I got this error:
Undefined control sequence
\rowcolor
{cyan} &
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
I added this code in the cell: \rowcolor{cyan}
, and I tried almost with this: \cellcolor{cyan}
, but it doesn't work. I searched on the Internet some help about of how to set the color background in the cells, and some pages mentioned the package colortbl
(but how can I use it, how does it works or what configuration in LyX do I need to change?)
I'll appreciate any help.
colortbl
package, which defines therowcolor
command. To load the package, go toDocument
>Settings
, scroll down the left panel to findLaTeX Preamble
, and add the line\usepackage{colortbl}
.\rowcolor
to fill the header of lightgray, and I got this: link