TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a document with a lot of lemmas and theorems. In the main part of the document there are sections and subsections, so I defined


to number the lemmas accordingly. But in the appendices I don't have subsections, so I figured it would be better if lemmas in the appendices are not numbered with respect to subsections, but with respect to sections. Therefore, I gave the command


just after opening the appendices with \appendix. But something strange happened. In appendix A I don't have lemmas. In appendix B the first lemma is numbered B.3. Could anyone explain me this behavior and suggest a solution?

Edit: If I give the command


the first lemma will be numbered B.1. But I'm still confused about why it is necessary to set the counter to 0.

share|improve this question
up vote 16 down vote accepted

Your counter resets at subsections not at sections, so

share|improve this answer
If I do this the number of the first lemma will be B.0.1. – Egbert May 31 '12 at 12:23
I meant do that at the point that you rededine the counter, not at the satrt – David Carlisle May 31 '12 at 12:27
Ah sorry, I commented away \renewcommand\thelem... (which is silly, I admit). It works now, thanks! – Egbert May 31 '12 at 12:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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