latex提供各层级定理环境:documentclass[11pt,a4paper]{report}usepackage{amsthm} heoremstyle{plain}
ewtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter heoremstyle{definition}
ewtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
ewtheorem{exmp}[thm]{Example} % same for example numbers
ewcommand{chaptercontent}{section{Basics}egin{defn}Here is a new definition.end{defn} %defnegin{thm}Here is a new theorem.end{thm} %thmegin{thm}Here is a new theorem.end{thm}egin{exmp}Here is a good example.end{exmp} %exmpsubsection{Some tips}egin{defn}Here is a new definition.end{defn}section{Advanced stuff}egin{defn}Here is a new definition.end{defn}subsection{Warnings}egin{defn}Here is a new definition.end{defn}}egin{document} ableofcontentspart{Addition and Subtraction} %part I Addition and Subtractionchapter{Addition} chaptercontent %Chapter 1 Additionchapter{Subtraction} chaptercontent %Chapter 1 Subtractionpart{Multiplication and Division} %part II Multiplication and Divisionchapter{Multiplication} chaptercontent %Chapter 1 Multiplicationchapter{Division} chaptercontent %Chapter 2 Divisionend{document}%structure:part > chapter > section > subsection > subsubsection > paragraph > subparagraph