2

Apparently (§5.1.4 beamer manual), the beamer command \againframe is thought to continue frames

In beamer, you can use the \againframe command to “continue” frames that you previously started somewhere, but where certain details have been suppressed.

rather than repeating the same frame twice in a presentation. Indeed, using the command to repeat the same frame kind of works, in the sense that compiles and gives the desired output in the PDF. However, this leads to a duplication of labels with consequent Warnings in compilation. This does not happen if one uses the \againframe to continue a frame.

MWE:

\documentclass{beamer}

\begin{document}

\begin{frame}<1>[label=test]{A frame}
    \begin{itemize}
        \item<1> Item
        \item<2> Advanced item
    \end{itemize}
\end{frame}

\againframe<1-2>{test} % This gives warnings, I repeat overlay 1
%\againframe<2>{test}  % This is fine, I continue a frame

\end{document}

Now, a simple workaround to create two identical overlays and then use one in a point of the presentation and the other where it is needed to repeat the frame has been already suggested in the answers to this question.

However, if this is needed multiple times and/or on complicated frames it gets quite annoying. Therefore, I would like to know if somebody has a clever idea to avoid the label redefinition. Differently asked, how might a \repeatframe command be defined? To simply ignore the warning is something I would like to avoid...

I also found another question on the subject, but I am not sure that what is suggested in that nice answer is the best I can get and is a real solution to the issue.

P.S.: Literally duplicate the frame (Copy-Paste), although it would work, is not an option. Everybody knows that as soon as you have to change that frame you have to remember to change its copies...

1

How about moving the content you want to repeat to a different file? This way one can \input it multiple times. If there are no overlays one could even move \begin{frame}...\end{frame} to the subfile

\documentclass{beamer}

\begin{document}

\begin{frame}<1>
\input{theframeyouwanttorepeat} 
\end{frame}

\begin{frame}
test
\end{frame} 

\begin{frame}<2>
\input{theframeyouwanttorepeat} 
\end{frame}

\end{document}

and theframeyouwanttorepeat.tex:

 zzz \pause yyy
  • Your approach is quite neat, nice! However, in a big project with already many files and complicated slides to be repeated I would prefer to keep the code of the slide together with those in the (sub)section. Therefore I cannot go this way. – Axel Krypton Jul 24 at 12:27

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.