我尝试使用套印在同一张幻灯片上显示不同的内容。不幸的是,这会增加一些额外的空间。我该如何避免这种情况?
以下是一个例子:
\documentclass{beamer}
\begin{document}
\begin{frame}{Frame 1}
\begin{itemize}
\item Here the space below this line is smaller ...
\item Following line 1
\end{itemize}
\end{frame}
\begin{frame}{Frame 2}
\begin{itemize}
\item ... than below here
\end{itemize}
\begin{overprint}
\onslide<1>
\begin{itemize}
\item Following line 2.1
\end{itemize}
\onslide<2>
\begin{itemize}
\item Following line 2.2
\end{itemize}
\end{overprint}
\end{frame}
\end{document}
编辑
这里有另一个例子来表明额外的空间不是(仅仅?)来自于关闭 itemize。
\documentclass{beamer}
\begin{document}
\begin{frame}{Test 1}
Here the space below this line is smaller ...
\begin{itemize}
\item Following line 1
\end{itemize}
\end{frame}
\begin{frame}{Test 2}
... than below here
\begin{overprint}
\onslide<1>
\begin{itemize}
\item Following line 2.1
\end{itemize}
\onslide<2>
\begin{itemize}
\item Following line 2.2
\end{itemize}
\end{overprint}
\end{frame}
\end{document}
答案1
额外的空间 - 至少部分 - 不是由套印引起的,而是由关闭和打开新itemize
环境引起的,您可以使用以下方法进行测试
\documentclass{beamer}
\begin{document}
\begin{frame}{Frame 1}
\begin{itemize}
\item Here the space below this line is smaller ...
\item Following line 1
\end{itemize}
\end{frame}
\begin{frame}{Frame 2}
\begin{itemize}
\item ... than below here
\end{itemize}
\begin{itemize}
\item Following line 2.1
\end{itemize}
\end{frame}
\end{document}
如果您不需要单独的 itemize 环境,我只需使用一个环境:
\documentclass{beamer}
\begin{document}
\begin{frame}{Frame 1}
\begin{itemize}
\item Here the space below this line is smaller ...
\item Following line 1
\end{itemize}
\end{frame}
\begin{frame}{Frame 2}
\begin{itemize}
\item ... than below here
\only<1>{\item Following line 2.1}
\only<2>{\item Following line 2.2}
\end{itemize}
\end{frame}
\end{document}