我怎样才能在latex中连续地对定理、定义等进行编号,而不为每个定理、定义开始一行?

我怎样才能在latex中连续地对定理、定义等进行编号,而不为每个定理、定义开始一行?,latex,tex,Latex,Tex,因为我不是以英语为母语的人,而且我确信到目前为止还没有人理解我的意思,所以我会尝试用简单的语言来解释。。。 我正在为我的学士学位写一篇论文,所以只有大约30页。。。现在,我为一些命令定义如下: \newtheorem{theo}{Theorem}[chapter] \newtheorem{lema}{Lemma}[chapter] \theoremstyle{definition} \newtheorem{defin}{Definition}[chapter] \theoremstyle{

因为我不是以英语为母语的人,而且我确信到目前为止还没有人理解我的意思,所以我会尝试用简单的语言来解释。。。 我正在为我的学士学位写一篇论文,所以只有大约30页。。。现在,我为一些命令定义如下:

\newtheorem{theo}{Theorem}[chapter]

\newtheorem{lema}{Lemma}[chapter]

\theoremstyle{definition}
\newtheorem{defin}{Definition}[chapter]

\theoremstyle{plain}
\newtheorem{cor}{Corollar}[chapter]
\cor
\cor
\defin
\lema
Corollar 2.1 
Corollar 2.2
Definition 2.1
Lemma 2.1
Corollar 2.1 
Corollar 2.2
Definition 2.3
Lemma 2.4
这很有效;但是,例如,如果我在第2章中使用如下命令:

\newtheorem{theo}{Theorem}[chapter]

\newtheorem{lema}{Lemma}[chapter]

\theoremstyle{definition}
\newtheorem{defin}{Definition}[chapter]

\theoremstyle{plain}
\newtheorem{cor}{Corollar}[chapter]
\cor
\cor
\defin
\lema
Corollar 2.1 
Corollar 2.2
Definition 2.1
Lemma 2.1
Corollar 2.1 
Corollar 2.2
Definition 2.3
Lemma 2.4
它是这样计算的:

\newtheorem{theo}{Theorem}[chapter]

\newtheorem{lema}{Lemma}[chapter]

\theoremstyle{definition}
\newtheorem{defin}{Definition}[chapter]

\theoremstyle{plain}
\newtheorem{cor}{Corollar}[chapter]
\cor
\cor
\defin
\lema
Corollar 2.1 
Corollar 2.2
Definition 2.1
Lemma 2.1
Corollar 2.1 
Corollar 2.2
Definition 2.3
Lemma 2.4
然而,对花冠、定义、引理等进行自己的编号是没有意义的,因为这篇论文很短,因此它比帮助更容易混淆; 所以我希望它是这样的:

\newtheorem{theo}{Theorem}[chapter]

\newtheorem{lema}{Lemma}[chapter]

\theoremstyle{definition}
\newtheorem{defin}{Definition}[chapter]

\theoremstyle{plain}
\newtheorem{cor}{Corollar}[chapter]
\cor
\cor
\defin
\lema
Corollar 2.1 
Corollar 2.2
Definition 2.1
Lemma 2.1
Corollar 2.1 
Corollar 2.2
Definition 2.3
Lemma 2.4
知道怎么做吗?

如前所述,您可以尝试以下方法:

\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theo}{Theorem}[chapter] % reset theorem numbering per chapter

\theoremstyle{definition}
\newtheorem{defin}[theo]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{lema}[theo]{Lemma} % same for  Lemmas
\newtheorem{cor}[theo]{Corollar}% same for Corollars

作为你问题的补充,但你应该写
\begin{cor}…\end{cor}
。仅仅放置
\cor
大致相当于
\begin{cor}
,但会留下一个未关闭的组。