Graphics, Figures & Tablescoloured row in a table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

coloured row in a table

Post by kostoglotov »

Hi there,
I am trying to make a coloured row in my table. The tex file of that section is attached. I have tried a few ideas from this forum but for some reason unsuccessfully... Wanted to ask if anyone could help me out with that.
I'd need the second row in yellow...
Thanks a lot..
ak

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

coloured row in a table

Post by torbjorn t. »

You can use the colortbl-package, and add

Code: Select all

\rowcolor{yellow}
at the beginning of the row in question. See the documentation (PDF) for details.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

coloured row in a table

Post by localghost »

kostoglotov wrote:[…] The tex file of that section is attached. […]
You forgot to attach the file. The colortbl package is best included by using an option for the xcolor package.

Code: Select all

\usepackage[table]{xcolor}
The according manuals explain the details. I am sure that the forum search also yields suitable results. Always a matter of search parameters.


Best regards
Thorsten
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

Re: coloured row in a table

Post by kostoglotov »

Thank you very much.
I have solved it yesterday immediately I'd posted the question - thank to the other forum discussions. But could delete it or edit it since the site seemed to have some problem...

Anyway, I have used this

\rowcolor{yellow}

but wanted to ask how can I define colour I want in RGB?

Cheers.
ak
kostoglotov
Posts: 58
Joined: Sun Apr 27, 2008 12:50 pm

Re: coloured row in a table

Post by kostoglotov »

Hi,
I've got it now.

It's as follow for those who were wondering as me how to do that...

\rowcolor[rgb]{1,0,0}

Cheers.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

coloured row in a table

Post by localghost »

kostoglotov wrote:[…] It's as follow for those who were wondering as me how to do that […]
To be read in the xcolor manual.
Post Reply