强制列表的位置

强制列表的位置

我希望 Beamer 幻灯片包含问题和答案列表,但我不想一次性显示所有问题和答案。我希望第一次显示显示第一个问题。第二次显示显示第一个问题和第一个答案。第三次显示显示第一个问题、第一个答案、第二个问题,依此类推。很简单。

如果此列表始终从相同的垂直位置开始,那就太好了,这样从视觉上看,随着列表的增长,较早的 Q 和 A 保持不变,但我找不到强制这样做的方法。

这是我的第一次尝试

\documentclass{beamer}

\begin{document}
{\LARGE
\begin{frame}{\huge List of Questions}
\vspace*{-1in}
\begin{itemize}
\item This is the first question.
\end{itemize}
\end{frame}

\begin{frame}{\huge List of Questions}
\vspace*{-1in}
\begin{itemize}
\item This is the first question.
\item This is the first answer.
\end{itemize}
\end{frame}

\begin{frame}{\huge List of Questions}
\vspace*{-1in}
\begin{itemize}
\item This is the first question.
\item This is the first answer.
\item This is the second question
\end{itemize}
\end{frame}

\begin{frame}{\huge List of Questions}\vspace*{-1in}
\begin{itemize}
\item This is the first question.
\item This is the first answer.
\item This is the second question.
\item This is the second answer.

\end{itemize}
\end{frame}
}
\end{document}

答案1

Beamer 项目具有叠加感知功能(请参阅 Beamer 用户指南中的“3.10 使用叠加规范”一节)。这意味着您可以使用例如\item<3-> second question来指定项目应在框架内的哪个叠加层上显示。

如果你逐一显示项目,beamer 甚至可以自动为你完成此操作:

\documentclass{beamer}

\setbeamerfont{frametitle}{size=\huge}

\begin{document}

\begin{frame}
\frametitle{List of Questions}
\begin{itemize}[<+->]
\item This is the first question.
\item This is the first answer.
\item This is the second question.
\item This is the second answer.
\end{itemize}
\end{frame}

\end{document}

在此处输入图片描述

相关内容