Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to have an overlay that adds a background color to a column of a table in beamer.

I can create a table with a colored second column using the colortbl package.

\begin{tabular}[]{r >{\columncolor{red!30}}} c}

If I try to simply make the color code an overlay this doesn't work (as I expected).

\begin{tabular}[]{r \onslide[2-]{>{\columncolor{red!30}}} c}

Can I create the effect I intend (without simply duplicating the table)?

share|improve this question
On a side note and just in case someone might have the same question as I had (Google brought me here): I tried to do the same thing with \cellcolor and used \visible<2-> but that didn't work – the cell still had the same color in every frame. The solution: Use \only instead of \visible. – balu Jul 7 '13 at 18:41

2 Answers 2

up vote 10 down vote accepted

Try conditionally defining a column type and using that:


1 & 2 \\
3 & 4 \\

You get a package warning for redefining the column type but there's no \renewcolumntype so you have to live with it.

share|improve this answer
Great! I didn't expect it to be possible at all. :) – ziggystar Nov 30 '10 at 15:47

Also, have a look at this link (german), very useful for rowcolor!topic/de.comp.text.tex/v7qQFV3pjkw

share|improve this answer
Welcome to!. While linking to other resources is, of course, perfectly okay, we prefer answers to be self-contained. (Links can quickly go away, you know). Hence, it would be great if you could distill the relevant parts of the thread you linked to in a a minimal working example (MWE) that illustrates the approach. – Daniel Jul 10 '12 at 17:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.