How to shade table cell(s) in LaTeX 

Date:          Wed, Feb 23 2000 10:00 am
Groups:        comp.text.tex
> So, can anyone suggest an easyish way to shade the background of a given
> table cell in LaTeX?

Use the package "colortbl" (and the "graphicx" package for the gray levels); read the documentations. Something like a single cell.

Maurizio Loreti

How to shade table cell(s) in LaTeX 

> \multicolumn{1}{>{\columncolor[gray]{0.8}}c}{text} should shade
> a single cell.

So that's how! I recently wanted to shade some cells, but when I looked at colortbl I couldn't see how to do an individual cell. (Any chance of getting an easier \cellcolor command, David?)

Donald Arseneau

How to shade table cell(s) in LaTeX 

> > cell.  (Any chance of getting an easier \cellcolor command, David?)
>
> But this is just an instance of the the normal way to make any particular
> cell in a table differ from what is set for the column.  Why should there
> be a special command for it just for color?

Because it is not just that. I choose to look at it as cell *content*, and I wanted to *inherit* the justification from the main table template, not specify it again (possibly incompatibly). And if there were @{} or >{} texts in the template I would want to inherit them too.

Donald Arseneau