General ⇒ Coloring columns of a table in Beamer
Coloring columns of a table in Beamer
Example:
---------------
\columncolors[]{1}{blue!20}{blue!10}
\begin{tabular}{l!{\vrule}c<{\onslide<2->}c<{\onslide<3->}c<{\onslide<4->}c<{\onslide}c}
Class & A & B & C & D \\
X & 1 & 2 & 3 & 4 \\
Y & 3 & 4 & 5 & 6 \\
Z & 5 & 6 & 7 & 8
\end{tabular}
----------------
You can see the problem running the whole code below:
----------------------------------
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{fancyvrb,color}
\usepackage{colortbl}
\usetheme{Madrid}
\title{Hello}
\author{Me}
\begin{document}
\frame {
\frametitle{Problem?}
\columncolors[]{1}{blue!20}{blue!10}
\begin{tabular}{l!{\vrule}c<{\onslide<2->}c<{\onslide<3->}c<{\onslide<4->}c<{\onslide}c}
Class & A & B & C & D \\
X & 1 & 2 & 3 & 4 \\
Y & 3 & 4 & 5 & 6 \\
Z & 5 & 6 & 7 & 8
\end{tabular}
}
\end{document}
-----------------------
Any advice would be much appreciate it.
Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Coloring columns of a table in Beamer



It was a silly mistake, I need to add the option:
\documentclass[.....,xcolor=table]{beamer}
at the preamble!

