[Tex/LaTex] Multiply-defined labels warnings with frame labels in Beamer with againframe

beamercross-referencing

This question is pretty much identical to this (to the best of my knowledge) unanswered question from comp.text.tex, which, at the moment, is the top Google hit for this problem: when specifying frame labels in Beamer with the intention of using them with the \againframe command, LaTeX begins spitting out errors over "multiply-defined labels".

Here's a specific, compilable example to demonstrate this issue:

\documentclass{beamer}
\begin{document}

\begin{frame}<1>[label=firstframe]{The first frame}
    \begin{itemize}
        \item This is not the fourth slide
            \pause
        \item Ah, but now it \emph{is} the fourth slide!
    \end{itemize}
\end{frame}

\begin{frame}{The second frame}
    This is a boring second slide.
\end{frame}

\againframe{firstframe}

\end{document}

The intention here is to display the first frame's first bullet point in the first slide, then again on the third slide, and then both bullet points on the fourth slide.

LaTeX will report the following warnings when compiling this presentation:

LaTeX Warning: Label `firstframe<1>' multiply defined.


LaTeX Warning: Label `firstframe' multiply defined.

How does one remove the occurrence of these warnings, other than avoiding the use of \againframe?

Best Answer

You add a second \pause and use the overlay specification. Like this

\begin{frame}<1>[label=firstframe]{The first frame}
    \begin{itemize}
        \item This is not the fourth slide
            \pause \pause
        \item Ah, but now it \emph{is} the fourth slide!
    \end{itemize} \end{frame}

\begin{frame}{The second frame}
    This is a boring second slide. \end{frame}

\againframe<2-3>{firstframe}

Yes, the solution is a bit silly, but this has to do with how beamer process the \againframe command internally. The command is built to 'continue' a frame, not to 'repeat' a frame. (The reason that you get repeated label warnings is that every frame/overlay is labelled internally (so that the various TOC jumping around and hyperlinks work). If you label a frame, the internal labels will be name<n> for the n'th overlay of that frame.)