我在 latex 投影仪演示文稿中有一些 tikz 图片,其中有很多叠加层,我想在多个位置显示,但每次都只是步骤的一部分。我想避免复制 tikz 代码而不得不维护多个类似的文件。因此,我的问题是:如何在投影仪帧中仅使用叠加幻灯片的子集,或者如何以特定叠加编号开始帧?
我创建了一个简化的示例来演示:在两个框架中导入具有重叠项目的相同输入项。我想在第一帧显示前两张幻灯片,在第三帧显示另外两张幻灯片。在这之间我谈论其他东西(更多细节等)。用 \only<...>
的解决方案这里的标签不起作用:第一次有一个空幻灯片,第二次有两个。
\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}
列表.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}
最佳答案
\againframe
是你最好的新 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}
关于 latex 投影仪 : Only show subset of overlays in a frame,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64879955/