1

I show a table on one slide that updates a subsequent second slide. On a third slide I add a figure on the right.

This works nicely in regular mode, where the last slide would be exactly how my handout slide which collapses the three slides into one. Here is how it looks like:

enter image description here

However I failed so far, the first table is still shown on top of the second table, here the failed result:

enter image description here

I successfully use overlayarea to do this with figures but apparently it doesn't work with tables. Perhaps I also failed where to start the column environments.

\begin{overlayarea}{\textwidth}{\textheight}
    \ifhandoutmode
        \only<2>{\includegraphics[width=11cm]{figure1.pdf}}
    \else
        \only<1>{\includegraphics[width=11cm]{figure1.pdf}}
        \only<2>{\includegraphics[width=11cm]{figure2.pdf}}
    \fi
    \ifhandoutmode
      \only<2>{
        \centerline{\tiny\textbf{Fig 1.} Caption.}
      }
    \else
      \only<1-2>{
        \centerline{\tiny\textbf{Fig 1.} Caption.}
      }
    \fi
\end{overlayarea}

So I tried it now with \visible but also to no avail. This is my actual code:

\documentclass[
handout
]{beamer}
\usepackage{tikz,array,xcolor}

\begin{document}

\begin{frame}{Title}
\begin{columns}[T,onlytextwidth]
    \begin{column}{0.5\textwidth}
        \visible<1>{
            \sffamily\bfseries\Large
            \begin{tabular}{>{\centering\arraybackslash}p{1cm}>{\centering\arraybackslash}p{1cm}}
            \cline{1-2}
            \textbf{V} & \textbf{P} \\
            \cline{1-2}
            0 & 0 \\
            \cline{1-2}
            \end{tabular}
        }
        \visible<2-3>{
            \sffamily\bfseries\Large
            \begin{tabular}{>{\centering\arraybackslash}p{1cm}>{\centering\arraybackslash}p{1cm}>{\centering\arraybackslash}p{3cm}}
            \cline{1-2}
            \textbf{V} & \textbf{P} &\\
            \cline{1-2}
            \textcolor{blue}{1} & \textcolor{blue}{1} & \textcolor{blue}{$\leftarrow$} \\
            \cline{1-2}
            \end{tabular}
        }
    \end{column}
    \begin{column}{0.5\textwidth}
        \visible<3>{
            \begin{center}
            \includegraphics[height=0.6\textheight,width=0.8\textwidth, keepaspectratio]{figures/frog.jpg}
            \end{center}
        }
    \end{column}
\end{columns}
\mode<handout>{
\only<1>{}
\only<2>{}
}
\end{frame}

\end{document}

1 Answer 1

1

Instead of replacing the whole table, you can use \alt<2->{1}{0} to replace just the numbers on specific overlays:

\documentclass[
handout
]{beamer}
\usepackage{tikz,array,xcolor}

\begin{document}

\begin{frame}{Title}
\begin{columns}[T,onlytextwidth]
    \begin{column}{0.5\textwidth}
      \sffamily\bfseries\Large
      \begin{tabular}{>{\centering\arraybackslash}p{1cm}>{\centering\arraybackslash}p{1cm}>{\centering\arraybackslash}p{3cm}}
      \cline{1-2}
      \textbf{V} & \textbf{P} &\\
      \cline{1-2}
      \alt<2->{\textcolor{blue}{1}}{0} & \alt<2->{\textcolor{blue}{1}}{0} & \textcolor{blue}{$\leftarrow$} \\
      \cline{1-2}
      \end{tabular}
    \end{column}
    \begin{column}{0.5\textwidth}
      \begin{center}
        \includegraphics<3>[height=0.6\textheight,width=0.8\textwidth, keepaspectratio]{example-image-duck}
      \end{center}
    \end{column}
\end{columns}
\end{frame}

\end{document}

enter image description here

5
  • This looks great, however it shows the blue table on slide 1 in regular mode, whereas it should show the black table on slide 1. Also there are three slides in regular mode, where blue table is shown on slide 2, and blue table + figure on slide three. But handout should exactly as your solution.
    – jay.sf
    May 10, 2023 at 15:11
  • @jay.sf See my edited answer May 10, 2023 at 15:15
  • Thanks, you nailed it! I just used `\alt<2->{\textcolor{blue}{1}}{0} & \alt<2->{\textcolor{blue}{1}}{0} & \alt<2->{\textcolor{blue}{\textcolor{blue}{$\leftarrow$}}}{} \` to deal also with the arrow.
    – jay.sf
    May 10, 2023 at 15:24
  • Allow me a small follow-up question, how to add a caption that only displays on slide 3, resp. in the handout?
    – jay.sf
    May 10, 2023 at 15:34
  • 1
    @jay.sf If your image has a caption, you can use the \visible<3>{...} from your original code May 10, 2023 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .