LaTeX各层级定理环境

\documentclass[11pt,a4paper]{report}
\usepackage{amsthm}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{exmp}[thm]{Example} % same for example numbers

\newcommand{\chaptercontent}{
\section{Basics}
\begin{defn}Here is a new definition.\end{defn} %defn
\begin{thm}Here is a new theorem.\end{thm}      %thm
\begin{thm}Here is a new theorem.\end{thm}
\begin{exmp}Here is a good example.\end{exmp}   %exmp
\subsection{Some tips}
\begin{defn}Here is a new definition.\end{defn}
\section{Advanced stuff}
\begin{defn}Here is a new definition.\end{defn}
\subsection{Warnings}
\begin{defn}Here is a new definition.\end{defn}
}

\begin{document}
\tableofcontents

\part{Addition and Subtraction}             %part I Addition and Subtraction
\chapter{Addition} \chaptercontent          %Chapter 1 Addition
\chapter{Subtraction} \chaptercontent       %Chapter 1 Subtraction

\part{Multiplication and Division}          %part II Multiplication and Division
\chapter{Multiplication} \chaptercontent    %Chapter 1 Multiplication
\chapter{Division} \chaptercontent          %Chapter 2 Division
\end{document}


%structure:part > chapter > section > subsection > subsubsection > paragraph > subparagraph

你可能感兴趣的:(LaTeX各层级定理环境)