Take the 2-minute tour ×
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 have a beamer presentation with a tabular environment. I want to expose the tabular environment column by column, on separate slides. I tried using \pause in the tabular header, or in the cells themselves, but they don't show a whole column at once. I want even the headers not to show until the next click. Is it possible to do that without having to copy partial tables into multiple frames?

(I also want each header of a new column appearing to be alerted, compared to the previous columns, but that's not a must if it is hard.)

share|improve this question

1 Answer 1

up vote 4 down vote accepted

This should take care of it. See Beamer User Guide section 9.6.3 for \action. Section 9.3 and others talk about \onslide, but that won't handle alerts.

enter image description here

\documentclass{beamer}

\newcommand{\aheader}[2]{\action<#1-|alert@#1>{#2}}
% first argument: slide number to appear from, second argument: content of header 
\newcommand{\hiddencell}[2]{\action<#1->{#2}}
% first argument: slide number to appear from, second argument: content of cell

\begin{document}
\frame{
Here's my table:
\begin{tabular}{rrr}
\aheader{2}{Column A} & \aheader{3}{Column B} & \aheader{4}{Column C} \\
\hiddencell{2}{1} &     \hiddencell{3}{2} &     \hiddencell{4}{3} \\
\hiddencell{2}{4} &     \hiddencell{3}{5} &     \hiddencell{4}{6} \\
\hiddencell{2}{7} &     \hiddencell{3}{8} &     \hiddencell{4}{9}
\end{tabular}
}
\end{document}
share|improve this answer
    
this still keeps the table borders, if there are any (I use borders between cells). is there a way to make them appear only when needed, when the column shows? –  kloop Jul 30 '11 at 21:01
1  
Section 23.5 of the User Guide reads "When you wish to uncover a table line-by-line, you will run into all sorts of problems if there are vertical and horizontal lines in the table," and gives the reasons why. It recommends using the colortbl package instead. I'm trying to break the habit of excessive vertical rules (and horizontal ones) in my tables, and sticking with the designs given in the booktabs package. –  Mike Renfro Jul 30 '11 at 21:26

Your Answer

 
discard

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.