Latex Beamer: Only show subset of overlays in a frame
Asked Answered
L

1

9

I have a few tikz pictures in a latex beamer presentation with lots of overlays that I want to display in multiple locations, but each time only a part of the steps. I want to avoid copying the tikz code and having to maintain multiple similar files. Therefore my question is: How do I only use a subset of the overlay slides in a beamer frame, or how can I start a frame at a certain overlay number?

I created a simplified example to demonstrate: The same input itemize with overlayed items is imported in two frames. I want to display the first two slides in the first frame and the other two on the third frame. In between I talk about other stuff (more details etc.). The solution with the \only<...> tags in here does not work: In the first occasion there is one empty slide, in the second there are two.

\documentclass{beamer}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{frame}
\only<1-2>{ % this almost works, but there is an empty slide too much
\input{list.tex}
}
\end{frame}

\begin{frame}
Some kind of intermediate distraction.
\end{frame}

\begin{frame}
% here I would like to set the overlay count to 3
\only<3-4>{
\input{list.tex}
}
\end{frame}

\end{document}

list.tex:

\begin{itemize}
  \item<1-> item 1 % this should appear in frame 1 slide 1 and frame 2 slide 1-2
  \item<2-> item 2 % this should appear in frame 1 slide 2 and frame 2 slide 1-2
  \item<3-> item 3 % this should appear in frame 2 slide 1
  \item<4-> item 4 % this should appear in frame 2 slide 2
\end{itemize}
Linguistic answered 17/11, 2020 at 17:7 Comment(0)
M
12

\againframe is your new best friend:

\documentclass{beamer}

\begin{document}

\begin{frame}<1-2>[label=foo]
\begin{itemize}
  \item<1-> item 1 % this should appear in frame 1 slide 1 and frame 2 slide 1-2
  \item<2-> item 2 % this should appear in frame 1 slide 2 and frame 2 slide 1-2
  \item<3-> item 3 % this should appear in frame 2 slide 1
  \item<4-> item 4 % this should appear in frame 2 slide 2
\end{itemize}
\end{frame}

\begin{frame}
Some kind of intermediate distraction.
\end{frame}

\againframe<3-4>{foo}

\end{document}
Malacostracan answered 17/11, 2020 at 17:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.