I use amsthm for my theorems, lemmas etc.

I'd like their numbering to look like that:

Theorem 1.1.1
Lemma 1.1.2
Definition 1.1.3
Theorem 1.2.1
Definition 1.2.2
Corollary 1.2.3
Theorem 2.1.1

To make the numbering "per-section" I did


But then each theorem type I defined had its own counter. So I tried


But then the numbers are just plain, section part disappears!

So I'd like to write something like


But this doesn't work :(

How can I achieve such effect?

  • I think you have a typo: Definition 1.1.2 should be 1.1.3. – Ryan Reich May 6 '11 at 21:02

You need to make a "dummy" theorem and make all the others subordinate to that. For example:

% \newtheorem{dummy}{Dummy}[section]
\newcounter{dummy} \numberwithin{dummy}{section}








Either the commented \newtheorem line or the \newcounter line works; the \numberwithin command is defined by amsmath, but if you are using amsthm you are probably using that too. If not, then the \newtheorem line works just with amsthm.

| improve this answer | |
  • 1
    Instead of adding a dummy counter, I usually do \numberwithin{equation}{section} and then \newtheorem{theorem}[equation]{Theorem}, etc. (I like having displayed equations numbered with the same scheme as theorems, etc.) – John Palmieri May 6 '11 at 21:51
  • @John: that's quite reasonable, especially if your equations are all pretty important statements. I myself tend to scatter displayed equations, often with numbering for easy reference, just to keep the text clean, so numbering them with theorems would be awkward. The other alternative to the dummy is @Gonzalo's answer, but I forgot about it because I'm hung up on symmetry. – Ryan Reich May 6 '11 at 21:54
  • when I'm reading a book or paper, I sometimes find it frustrating searching for Equation (1.2.5) if it's nowhere near Lemma 1.2.4, but instead is part of the proof of Theorem 1.2.13. So I like everything numbered sequentially, if I'm going to number equations at all. (Often I just need to refer to equations in nearby text and label them with (*) or something like that. If I don't number any equations, then it just acts like a dummy counter anyway.) – John Palmieri May 6 '11 at 22:40
  • Works! The \numberwithin is exactly what I was looking for. The dummy theorem method seems like a hacky trick :) @John: And that brings even more consistency! Thanks guys! – Jasiu May 7 '11 at 8:00
  • Dear Ryan, how would I go about numbering my theorems, propositions and lemmas without reference to the section? So to have, for instance, Section 1 : Lemma 1, Lemma 2, Theorem 3; Section 2 : Lemma 1, Lemma 2, Lemma 3, Theorem 4, Corollary 5 ? – Olivier Bégassat Dec 23 '13 at 16:36

Perhaps this is what you are trying to achieve:




\chapter{Test chapter}
\section{Test section}





The first declaration indicates that the counter for theo environments will be reset to 0 whenever the parent counter section is incremented, and the theorem label will have the section number prepended. The other declarations simply subordinate their counter to the one just declared.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.