1

I want to uncover a table columnwise in beamer. I am doing the following thing:

\documentclass[10pt]{beamer}
\usepackage{colortbl}
\usepackage{booktabs}
\usepackage{array}
\begin{document}
\begin{frame}
\begin{tabular}{crrr<{\onslide<2->}r<{\onslide<2->}r<{\onslide<2->}r<{\onslide}}
    & $f_1$    & $f_2$ & $S$   & $f''_1$ & $f''_2$ & $T$\\
$A$ &   2\,000 & 500   & 100.0 & 100     & 100     & 100.0 \\
$B$ &   1\,120 & 175   & 45.5  & 70      & 35      & 52.5
\end{tabular}
\end{frame}

\begin{frame}
\begin{tabular}{crrr<{\onslide<2->}r<{\onslide<2->}r<{\onslide<2->}r<{\onslide}}
  & \multicolumn{1}{c}{$f_1$}   &
    \multicolumn{1}{c}{$f_2$}   &
    \multicolumn{1}{c}{$S$}     &
    \multicolumn{1}{c}{$f''_1$} &
    \multicolumn{1}{c}{$f''_2$} &
    \multicolumn{1}{c}{$T$}     \\
$A$ &   2\,000 & 500  & 100.0 & 100   & 100   & 100.0 \\
$B$ &   1\,120 & 175  & 45.5  & 70    & 35    & 52.5
\end{tabular}
\end{frame}
\end{document}

On the first frame everything works quite well. On the second frame, I am adding \multicolumn and things get messy. I am stuck.

0

1 Answer 1

0

You can use the same technique as in https://topanswers.xyz/tex?q=2000#a2242

\documentclass{beamer}

\usepackage{tabularray}
\UseTblrLibrary{counter}

\begin{document}
    \begin{frame}
        \begin{tblr}{
      colspec={rrrrrrr},
            cells={cmd=\onslide<\arabic{colnum}->},
      row{1}={halign=c}
    }
                & $f_1$    & $f_2$ & $S$   & $f''_1$ & $f''_2$ & $T$\\
      $A$ &   2\,000 & 500   & 100.0 & 100     & 100     & 100.0 \\
      $B$ &   1\,120 & 175   & 45.5  & 70      & 35      & 52.5
        \end{tblr}
    \end{frame}
\end{document}

enter image description here


or if instead of uncovering the columns one by one, you want to split the table in two parts:

\documentclass{beamer}

\usepackage{tabularray}
\UseTblrLibrary{counter}

\begin{document}
    \begin{frame}<4,7>
        \begin{tblr}{
      colspec={rrrrrrr},
            cells={cmd=\onslide<\arabic{colnum}->},
      row{1}={halign=c}
    }
                & $f_1$    & $f_2$ & $S$   & $f''_1$ & $f''_2$ & $T$\\
      $A$ &   2\,000 & 500   & 100.0 & 100     & 100     & 100.0 \\
      $B$ &   1\,120 & 175   & 45.5  & 70      & 35      & 52.5
        \end{tblr}
    \end{frame}
\end{document}

enter image description here

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.