beamer:在不同框架上跨越长枚举的最佳方法

beamer:在不同框架上跨越长枚举的最佳方法

我对和枚举有疑问beamer。拆分长枚举的最佳方式是什么,beamer以便每个要点都有自己的框架?

我已经找到了这个相关答案但我想知道是否有更清洁的解决方案。还有另一个,但我想保留对帧中断的控制。

答案1

enumerate您可以使用和(重新)存储计数器定义自己的枚举列表:

\documentclass{beamer}

\makeatletter
\newenvironment{cenumerate}{%
  \enumerate
  \setcounter{\@enumctr}{\csname saved@\@enumctr\endcsname}%
}{%
  \expandafter\xdef\csname saved@\@enumctr\endcsname{\the\value{\@enumctr}}%
  \endenumerate
}
\newenvironment{cenumerate*}{%
  \enumerate
}{%
  \expandafter\xdef\csname saved@\@enumctr\endcsname{\the\value{\@enumctr}}%
  \endenumerate
}
\makeatother

\begin{document}

\begin{frame}
  \begin{cenumerate*}% starting a new continous enumerate
  \item 1st
  \item 2nd
  \item 3rd
  \item 4th
  \end{cenumerate*}
\end{frame}

\begin{frame}
  \begin{cenumerate}
  \item 5th
  \item 6th
  \item 7th
  \item 8th
  \end{cenumerate}
\end{frame}

\begin{frame}
  \begin{cenumerate}
  \item 9th
  \item 10th
  \item 11th
  \item 12th
  \end{cenumerate}
\end{frame}

\end{document}

但是,如果您使用如下逐步枚举,这将会失败:

\begin{frame}
  \begin{cenumerate}
  \item 5th
  \item<2-4> 6th
  \item<3-4> 7th
  \item<4> 8th
  \end{cenumerate}
\end{frame}

答案2

这允许在页面的 80% 处中断框架:

\documentclass{beamer}
\begin{document}

\begin{frame}[allowframebreaks=0.8,t]{title}{}
  \begin{enumerate}
  \item 1st
  \item 2nd
  \item 3rd
  \item 4th
  \item 5th
  \item 6th
  \item 7th
  \item 8th
  \item 9th
  \item 10th
  \item 11th
  \item 12th
  \item 13th
  \item 14th
  \item 15th
  \item 16th
  \item 17th
  \item 18th
  \end{enumerate}
\end{frame}

\end{document}

相关内容