在 beamer 中,我想创建两个嵌套的枚举列表并继续数字,而不是像这样从头开始。
1.
2.
3.
4.
5.
6.
我的代码基于这个解决方案https://tex.stackexchange.com/a/531803/153274。
\documentclass{beamer}
\newcounter{currentenumi}
\begin{document}
\begin{frame}
\frametitle{Plan}
\begin{enumerate}
\setbeamertemplate{enumerate items}[square]
\item {\large Summary}
\vskip1em
\item {\large Research}
\setcounter{currentenumi}{\theenumi}
\vskip1em
\begin{enumerate}
\setcounter{enumi}{\thecurrentenumi}
\item {\large Introduction}
\vskip1em
\item {\large Research During PhD}
\vskip1em
\item {\large Research During PostDoc}
\end{enumerate}
\vskip1em
\item {\large Conclusions}
\end{enumerate}
\end{frame}
\end{document}
我尝试过这个解决方案https://tex.stackexchange.com/a/55001/153274而且它也不起作用。
答案1
当您想要更改第二级枚举的计数器时,您enumii
需要enumi
:
\documentclass{beamer}
\newcounter{currentenumi}
\begin{document}
\begin{frame}
\frametitle{Plan}
\begin{enumerate}
\setbeamertemplate{enumerate items}[square]
\item {\large Summary}
\vskip1em
\item {\large Research}
\setcounter{currentenumi}{\theenumi}
\vskip1em
\begin{enumerate}
\setcounter{enumii}{\thecurrentenumi}
\item {\large Introduction}
\vskip1em
\item {\large Research During PhD}
\vskip1em
\item {\large Research During PostDoc}
\setcounter{currentenumi}{\theenumii}
\end{enumerate}
\vskip1em
\setcounter{enumi}{\thecurrentenumi}
\item {\large Conclusions}
\end{enumerate}
\end{frame}
\end{document}