I use the amsmath
environment and I put the following code in the preamble:
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}{Corollary}[section]
\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem*{ex}{Example}
\newtheorem{prop}{Proposition}[section]
\theoremstyle{remark}
\newtheorem*{rem}{Remark}
This works very well for my theorems, proofs, etc, except that I would like to make a small modification which is easiest to clarify with an example: if I have written two theorems and one definition in chapter 3, I want the next definition to be number 3.4 instead of 3.2. In other words, I want to order my theorems, lemmas, etc, all as a single category instead of ordering each category by itself. How do I modify my code to do this?
Best Answer
For the selected structures, use as first optional argument the counter of the structure you initially subordinated to the section counter, so the selected structures will share the counter. For example, after yo do
the counter
thm
for theTheorem
structure is subordinated to thesection
counter, and definingmakes the
lem
counter share the counter forTheorem
structure. A complete example: