[Tex/LaTex] beamer \pause behaves differently inside tabular using different \setbeamercovered option

beamertables

The following MWE demonstrates the problem:

\documentclass{beamer}

\usepackage{lmodern}

\setbeamercovered{transparent=0}
%\setbeamercovered{invisible}

\begin{document}

\begin{frame}

\begin{tabular}{ll}
a & b \\\pause
c & d
\end{tabular}

\end{frame}

\end{document}

\pause effects one row if \setbeamercovered{invisible} is used, but only one cell if \setbeamercovered{transparent=??} is used.

Is it a bug? Shouldn't it be the same?! Can I write my code to affect the entire row with both of the above?

Best Answer

Please disregard my earlier comment. \pause can be used within a tabular environment.

To uncover a table rowwise, you should use \pause, not after, but before a \\. The code is adapted from the beamer documentation itself (see subsection 23.5 Uncovering a Table Rowwise).

I don't have a satisfactory explanation for the behaviour your code displays. As pointed out in KevinC's comment, \pause seems to produce surprising results when used inside array-type environment. The beamer doc (subsection 9.1) warns about that:

This command does not work inside amsmath environments like align, since these do really wicked things.

Perhaps it is best not to use \pause in ways other than those shown in the beamer manual.

\documentclass{beamer}

\setbeamercovered{invisible}

\begin{document}
\begin{frame}
\begin{tabular}{lcccc}
    Class & A & B & C & D           \\
    \hline
    X       & 1 & 2 & 3 & 4 \pause  \\
    Y       & 3 & 4 & 5 & 6 \pause  \\
    Z       & 5 & 6 & 7 & 8
\end{tabular}
\end{frame}
\end{document}

enter image description here