![如何在投影仪中按部分对命题进行编号?](https://linux22.com/image/256325/%E5%A6%82%E4%BD%95%E5%9C%A8%E6%8A%95%E5%BD%B1%E4%BB%AA%E4%B8%AD%E6%8C%89%E9%83%A8%E5%88%86%E5%AF%B9%E5%91%BD%E9%A2%98%E8%BF%9B%E8%A1%8C%E7%BC%96%E5%8F%B7%EF%BC%9F.png)
我的演讲分为三部分,涉及三篇不同的论文。我想对每部分(论文)中的定理和命题进行编号。
答案1
您可以使用etoolbox
包,使\part
命令重置计数器:
\documentclass{beamer}
\usepackage{etoolbox}
\setbeamertemplate{theorems}[numbered]
\pretocmd{\part}{\setcounter{theorem}{0}}{}{}
\newtheorem{proposition}[theorem]{Proposition}
\begin{document}
\part{Test Part One}
\begin{frame}
\begin{theorem}
Test theorem in part one.
\end{theorem}
\begin{proposition}
Test proposition in part one.
\end{proposition}
\end{frame}
\part{Test Part Two}
\begin{frame}
\begin{theorem}
Test theorem in part two.
\end{theorem}
\begin{proposition}
Test proposition in part two.
\end{proposition}
\end{frame}
\end{document}