[Tex/LaTex] Beamer: handout/article mode – produce multiple copies of a frame with distinct overlay numbers

beamerbeamerarticleoverlays

Similar questions have been asked before, but I was unable to come up with a general purpose solution out of the answers provided.

First, here is a MWE:

%\documentclass{beamer}
\documentclass[handout]{beamer}
%\documentclass{article}
%\usepackage{beamerarticle}

\begin{document}

\begin{frame}[label=foo]\frametitle{My only frame}
  \begin{enumerate}[]
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
    \item Item \arabic{enumi}
  \end{enumerate}
\end{frame}

\againframe{foo}
\againframe{foo}
\end{document}

As can be seen in the example, the challenge is in producing two snapshots of the evolution of the frame that is built. In the example, I try, but fail to produce two such snapshots: one at overlay 5 and another at (the final) overlay 10.

I am search for a solution that would make this possible, without modifying the overlay instructions within the frame. If this is not possible, I guess not only me, but others would be interested in a solution that uses O(k) modifications to the frame, where k is the number of snapshots (rather than O(n) work, where n is the total number of overlays.

It would be really nice to achieve this in both the article and the handout modes. I suspect that the former is more challenging.

I conjecture that this is not possible. If this is indeed the case, a definite answer will also be useful. At least one stop searching if this is the case, and perhaps beamer will offer this some day.

Related previous questions

Best Answer

You do need to tell beamer what you want to appear in each frame of the handout version. You can use \onslide specifications to do this so that you do not need to modify the existing overlay specifications at all. (I'm not sure this is what you want - probably not.)

The following code modifies your MWE so that, in presentation mode, there would actually be 10 slides within the frame. These are then placed on slides 1 or 2 of the handout. This is a waste of code: if you only want to show slide 5 and slide 10, you do not need two \againframe but only one. But, anyway, with the two:

\documentclass[handout]{beamer}

\begin{document}

  \begin{frame}<1-| handout:0>[label=foo]{My only frame}
    \begin{enumerate}[<+->]% or whatever you like for presentation mode
      \onslide<1-| handout:1-2>
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \onslide<1-| handout:2>
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
    \end{enumerate}
  \end{frame}

  \againframe<0| handout:1>{foo}
  \againframe<0| handout:2>{foo}
\end{document}

slides 5 and 10 for handout

More efficiently with only one repeat:

\documentclass[handout]{beamer}

\begin{document}

  \begin{frame}<1-| handout:1>[label=foo]{My only frame}
    \begin{enumerate}[<+->]% or whatever you like for presentation mode
      \onslide<1-| handout:1-2>
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \onslide<1-| handout:2>
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
      \item Item \arabic{enumi}
    \end{enumerate}
  \end{frame}

  \againframe<0| handout:2>{foo}
\end{document}

I'm not sure how this could apply to article mode since then there are no frames or slides.