在我的 TeX 文档中,定理、定义、引理按以下方式枚举:
Definition 1.1
Lemma 1.1
Theorem 1.1
Definition 1.2
Lemma 1.2
Theorem 1.2
但我希望
Definition 1.1
Lemma 1.2
Theorem 1.3
Definition 1.4
Lemma 1.5
Theorem 1.6
我如何获得它?
编辑。我的文档的开头是:
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[cp1250]{inputenc}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{observation}{Observation}[section]
\newtheorem{proposition}{Proposition}[section]
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{example}{Example}[section]
答案1
只需使用第一个可选参数,表示要共享的计数器:
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}