我有三个要点,我想在一帧上连续地提出,一张一张地展示。第二点需要澄清一下,所以我想插入一张包含这个要点的幻灯片,以及关于它的注释。三个要点居中对齐,但这个注释可能相当长,所以我想将包含注释的幻灯片顶部对齐(与选项一样[t]
)。理想情况下,我希望所有这些都发生在一页上。也就是说,页码不会在任何这些幻灯片中增加。
最小工作示例:
\documentclass{beamer}
\usetheme{Ilmenau}
\begin{document}
\begin{frame}
\begin{onlyenv}<-2,4->
\begin{block}{Block One}
This is my first block.
\end{block}
\end{onlyenv}
\begin{onlyenv}<2->
\begin{block}{Block Two}
This is my second block.
\end{block}
\end{onlyenv}
\begin{onlyenv}<3>
\begin{block}{Note}
This is a really long note about block two that takes several lines.
When it appears on slide 3 the entire frame should be top aligned,
rather than centered as on slides 1, 2, and 4.
\end{block}
\end{onlyenv}
\begin{onlyenv}<4->
\begin{block}{Block Three}
This is my third block.
\end{block}
\end{onlyenv}
\end{frame}
\end{document}
为了更加明确,我希望Block One
在幻灯片 1 中单独居中显示。在幻灯片 2 中,Block One
和Block Two
应该居中显示。幻灯片 3 应包含Block Two
和Note
顶部对齐,然后幻灯片 4 应包含Block One
、Block Two
和Block Three
,再次居中。
我尝试创建另外两个框架来代表幻灯片 3 和 4,但这样会产生大量重复代码,而且我似乎也无法协调页数。我也尝试过\againframe
只为第三张幻灯片创建框架,但遇到了同样的问题。
答案1
您可以使用[t]
op 对齐框架并\vfill
在所有覆盖层的顶部插入一个应居中的:
\documentclass{beamer}
\usetheme{Ilmenau}
\begin{document}
\begin{frame}[t]
\only<1,2,4>{\vfill}
\begin{onlyenv}<-2,4->
\begin{block}{Block One}
This is my first block.
\end{block}
\end{onlyenv}
\begin{onlyenv}<2->
\begin{block}{Block Two}
This is my second block.
\end{block}
\end{onlyenv}
\begin{onlyenv}<3>
\begin{block}{Note}
This is a really long note about block two that takes several lines.
When it appears on slide 3 the entire frame should be top aligned,
rather than centered as on slides 1, 2, and 4.
\end{block}
\end{onlyenv}
\begin{onlyenv}<4->
\begin{block}{Block Three}
This is my third block.
\end{block}
\end{onlyenv}
\end{frame}
\end{document}