我已经设置了以下定理环境:
\usepackage[framemethod=TikZ]{mdframed} % Defined mdtheoremenv used below
% I don't believe this affects anything with numbering, including just in case
\makeatletter
\renewcommand\thmt@listnumwidth{4.3em}
\makeatother
\newmdtheoremenv[...]{theorem}{Theorem}[subsection]
\newmdtheoremenv[...]{lemma}[theorem]{Lemma} % shares counter with theorem
\newmdtheoremenv[...]{proposition}[subsection]{Proposition} % Proposition environment
\theoremstyle{definition} % This style is typically used for definitions, examples, etc.
\newtheorem{definition}[subsection]{Definition} % Numbered by subsection
但是,每次我使用定理环境时,节计数器似乎都会增加。例如,在第 2.1 节中,我声明了三个引理:引理 2.2.1、引理 2.2.2 和引理 2.2.3,这似乎会将节计数器增加到 4 (?) 显然,这不是很直观。第 2.1 节后面应该跟着第 2.2 节,而不是第 2.3 节。我该如何解决这个问题?
第 2 节 最小代码
\section{Sequences} % Correctly labeled as section 2
\subsection{Convergence} % Correctly labeled as section 2.1
\begin{itemize}
\item[]
\begin{definition}[Sequential convergence] % Labeled as Definition 2.2
A sequence of real numbers ...
\end{definition}
\item[]
\begin{lemma} % Labeled as Lemma 2.2.1
A sequence of real numbers has \textbf{at most} one limit.
\end{lemma}
\item[]
\begin{lemma} % Labeled as Lemma 2.2.2
Every convergent sequence is bounded.
\end{lemma}
\item[]
\begin{definition}[Sequential monotonicity] % Labeled as Definition 2.3
A sequence $\seq{x}{n}$ is said to be ...
\end{definition}
\item[]
\begin{lemma} % Labeled as Lemma 2.3.1
Any increasing sequence that is bounded above is convergent.
\end{lemma}
\end{itemize}
\subsection{Algebraic Manipulations of Limits} % Incorrectly labeled as 2.4
编辑:在编辑我原来的问题时,我发现了一个愚蠢的错误,即在“定义”环境中使用子节计数器。将其更改为“定理”解决了这个问题。无论如何,谢谢你的帮助!
答案1
你没有说你是如何定义的\newmdtheoremenv
,但假设它遵循相同的惯例\newtheorem
{theorem}{Theorem}[subsection]
意味着theorem
计数器将重置每个subsection
但
{proposition}[subsection]{Proposition}
表示与proposition
共享相同的计数器subsection
,因此将按相同的顺序编号。
注意可选参数的位置。