[Tex/LaTex] Pause a column of a table in beamer class

beamer

I have used ‎\usetheme{PaloAlto} for my presentation file in beamer class. I have some questions. Is it possible to pause a column, for example last column, of a table? Is it possible to pause a column of a matrix?

Thanks in advance.

‎\documentclass{beamer}‎
\usepackage[utf8x]{inputenc}
‎\usetheme{PaloAlto}
\usecolortheme{seahorse}‎‎‎
‎\setbeamercovered{transparent}‎
‎‎\usepackage{amsmath,amsthm,amssymb}‎ 
‎


‎\begin{document}‎

\begin{frame}
\maketitle
\end{frame}
‎\begin{frame}‎
  ‎\frametitle{Outline}‎
  ‎\tableofcontents‎
  % ‎You might wish to add the option [pausesections]‎

‎\end{frame}‎

‎\section{Basic definitions}‎

\subsection{Definitions and examples}‎
‎\begin{frame}‎
 ‎\begin{example}‎‎
 \begin{table}[htp]\centering‎
\caption{ ‎$2^{3}$ Full Factorial Design}‎‎‎
‎\begin{tabular}{ccc|c}‎
 ‎&{factors} &&Response variable‎‎\\ \hline‎
‎$A$&$B$&$C$&‎$‎\mathbf{y}‎$‎\\ \hline‎
 ‎$-1$ & $-1$ & $-1$  &‎$‎y_{1}‎$‎\\‎ 
  ‎$\phantom{{-}}1$ &  $-1$ &  $-1$ &‎$‎y_{2}‎$   \\‎ 
‎$-1$ &  $\phantom{{-}}1$ &  $-1$&‎$‎y_{3}‎$    \\‎ 
 ‎$\phantom{{-}}1$ &  $\phantom{{-}}1$ &  $-1$&‎$‎y_{4}‎$ \\‎
‎$-1$ &  $-1$ &  $\phantom{{-}}1$&‎$‎y_{5}‎$
‎\end{tabular}‎
‎\end{table}‎
 \end{example}

‎\end{frame}‎
\begin{frame}
\begin{equation}‎

\label{U9}‎
‎U_{9}=‎
‎\left[‎
‎\begin{array}{lllllllll}‎
-‎1&     \phantom{{-}}1&     \phantom{{-}}1&‎    -‎1&‎    -‎1&     \phantom{{-}}1&‎    -‎1&     \phantom{{-}}1&‎    -‎1\\‎
     ‎\phantom{{-}}1&‎    -‎1&     \phantom{{-}}1&     \phantom{{-}}1&‎    -‎1&‎    -‎1&‎    -‎1&‎    -‎1&     \phantom{{-}}1\\‎
     ‎\phantom{{-}}1&     \phantom{{-}}1&‎    -‎1&‎    -‎1&     \phantom{{-}}1&‎    -‎1&     \phantom{{-}}1&‎    -‎1&‎    -‎1\\‎
    -‎1&     \phantom{{-}}1&‎    -‎1&‎    -‎1&     \phantom{{-}}1&     \phantom{{-}}1&‎    -‎1&‎    -‎1&     \phantom{{-}}1\\‎
    -‎1&‎    -‎1&     \phantom{{-}}1&     \phantom{{-}}1&‎    -‎1&     \phantom{{-}}1&     \phantom{{-}}1&‎    -‎1&‎    -‎1
\end{array}‎
‎\right]‎.
‎\end{equation}}‎

‎‎\end{frame}‎
\end{document}‎

Best Answer

You can pause a column using >{\onslide<2->}c<{\onslide}.

Please also note that

  • beamer does not have floats, so adding floating specifier to your table does not make sense.
  • \centering is superfluous, tables are centred by default in beamer.
  • if you simply right align your cells, you don't need all your \phantom{-}

\documentclass{beamer}
\usepackage{array}

\begin{document}

\begin{frame}

\begin{table}
\caption{$2^{3}$ Full Factorial Design}
\begin{tabular}{rrr|>{\onslide<2->}c<{\onslide}}
\multicolumn{3}{c}{factors} & Response variable\\ \hline
$A$&$B$&$C$&$\mathbf{y}$\\ \hline
$-1$ & $-1$ & $-1$  &$y_{1}$\\ 
$1$ &  $-1$ & $-1$ &$y_{2}$   \\ 
$-1$ & $1$ & $-1$&$y_{3}$    \\ 
$1$ &  $1$ & $-1$&$y_{4}$ \\
$-1$ & $-1$ & $1$&$y_{5}$\\
$1$ &  $-1$ & $1$ & $y_{6}$\\
$-1$ & $1$ & $1$&$y_{7}$\\
$1$ &  $1$ &  $1$&$y_{8}$\\
\end{tabular}
\end{table}

\end{frame}

\end{document}

enter image description here


Or the other way round:

\documentclass{beamer}
\usepackage{array}

\begin{document}

\begin{frame}

\begin{table}
\caption{$2^{3}$ Full Factorial Design}
\begin{tabular}{rrr|>{\onslide<1>}c<{\onslide}}
\multicolumn{3}{c}{factors} & Response variable\\ \hline
$A$&$B$&$C$&$\mathbf{y}$\\ \hline
$-1$ & $-1$ & $-1$  &$y_{1}$\\ 
$1$ &  $-1$ & $-1$ &$y_{2}$   \\ 
$-1$ & $1$ & $-1$&$y_{3}$    \\ 
$1$ &  $1$ & $-1$&$y_{4}$ \\
$-1$ & $-1$ & $1$&$y_{5}$\\
$1$ &  $-1$ & $1$ & $y_{6}$\\
$-1$ & $1$ & $1$&$y_{7}$\\
$1$ &  $1$ &  $1$&$y_{8}$\\
\end{tabular}
\pause
\end{table}

\end{frame}

\end{document}