[Tex/LaTex] declare a different overlay specification in different beamer modes

beamer

I have a beamer frame with about 150 slides on it. I want article and handout mode to only show frame 92.

Reading section 8.6.2 of the beamer manual it seems like I should be able to do something like

\begin{frame}<handout:92>
...
\end{frame}

but that seems to have no effect–all 150 slides are set in handout mode, overlaying (making the result unreadable).

I have gotten the effect I want by taking all commands within the frame that have an overlay specification and adding "| handout:0" to make them not appear in handout mode. Annoying, but works. But for my 150-slide frame the different slides are generated by a PGF \foreach loop so I can't code slide 92 differently from the rest. But can I do this at the frame's overlay specification?

It seems that the frame's overlay spec really acts differently from other commands. If I only do

\begin{frame}<92>...\end{frame}

then I get only slide 92 in beamer mode but all slides in article or handout mode.

Best Answer

From what I know of beamer:

\begin{frame}<92> means \begin{frame}<beamer:92|handout:1>

similarly

\only<5> means \only<beamer:5|handout:1>

In handout mode, if overlays do not contain specification for handout mode, all slides of a frame are the same and contain all overlay elements (except \alt for which it is the alternative one, I think but I am not sure). So printing one specific slide of a frame in handout mode does not make sense, unless overlays contain a specification for handout mode.

In the extreme case where you want the overlays to be the same in beamer and handout modes, you give an overlay specification for "all" modes.

\only<all:5>

So to do what you want:

\begin{frame}<handout:92>
...
\only<all:5-97>
...
\only<all:143>
...
\end{frame}

The following code demonstrates an easier solution for what you seem to be willing to do.

\documentclass[handout]{beamer}

\usepackage{tikz}

\begin{document}

\begin{frame}
\foreach \n  in {1,...,10} {
    \pgfmathtruncatemacro{\oneifnisfive}{\n==5}
    \only<\n| handout:\oneifnisfive>{Slide \n\par}
}
\end{frame}

\begin{frame}<handout:5>
\foreach \n  in {1,...,10} {
    \only<all:\n>{Slide \n\par}
}
\end{frame}

\end{document}