TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Why can't I wrap \rowcolor in \only? (Beamer), there are solutions to how to use \rowcolor with \only in Beamer. Is there a way to use \columncolor in a similar way?

share|improve this question
up vote 4 down vote accepted

The \columncolor macro seems to be very special handled1 and can't be patched to support beamer overlays. I would do it be using custom column types which are defined differently depending on the overlay:






   A &  B \\
   A &  B \\
   A &  B \\



1 In fact \columncolor is never defined at all! Another internal tabular macro simply scans the tabular preamble for it and extracts the argument of it!

share|improve this answer
Works perfectly! Although I do not fully understand the syntax...:) – Li Wang Jul 21 '11 at 10:01
@Lee: See the array package manual. >{code} adds the code before (>) every cell. There is also <{code} which adds it afterwards and must be used after the column character. – Martin Scharrer Jul 21 '11 at 10:04

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.