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'm creating a beamer presentation. I have this table:

\begin{array}
    \visible<1->{\cellcolor{Blue}{0}} & \visible<2->{\cellcolor{Red}{0 + 1}} \\
    \visible<1->{\cellcolor{Yellow}{0 + 1 + 2}} & \visible<2->{\cellcolor{Green}{0 + 1 + 2 + 3}}
\end{array}

Unfortunately, the cell colors are visible from the start, before there is text. Using \only solves the color issue, but destroys the text alignment.

How can I fix this?

EDIT: Here's a compilable example:

\documentclass[table,dvipsnames]{beamer}
\usepackage[ngerman]{babel}
\begin{document}
\begin{frame}
    $\begin{array}{ll}
        \visible<1->{\cellcolor{Blue}{0}} & \visible<2->{\cellcolor{Red}{0 + 1}} \\
        \visible<3->{\cellcolor{Yellow}{0 + 1 + 2}} & \visible<4->{\cellcolor{Green}{0 + 1 + 2 + 3}} \\
    \end{array}$
\end{frame}
\end{document}
share|improve this question
    
Please turn the example into a full compilable document, starting from \documentclass and packages loaded. –  Claudio Fiandrino Jul 11 '12 at 16:42
    
@ClaudioFiandrino Done. –  ryyst Jul 11 '12 at 16:55

1 Answer 1

up vote 3 down vote accepted

What about using \pause in each element of the table?

MWE:

\documentclass[table,dvipsnames]{beamer}
\usepackage[ngerman]{babel}
\begin{document}
\begin{frame}
    $\begin{array}{ll}
        \visible<1->{\cellcolor{Blue}{0}}\pause & \visible<2->{\cellcolor{Red}{0 + 1}}\pause \\
        \visible<3->{\cellcolor{Yellow}{0 + 1 + 2}}\pause & \visible<4->{\cellcolor{Green}{0 + 1 + 2 + 3}} \\
    \end{array}$
\end{frame}
\end{document}

This will give you:

enter image description here

share|improve this answer

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.