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

The theorem count doesn't update when I move to another section. I.e. I'm currently in section 6, and LyX has already in theorem 30, when theorem 1 is in section 1. How can I make LyX start counting the theorems and lemmas from "1" in each new section?

share|improve this question
up vote 2 down vote accepted

If you add the Theorems (Numbered by Section) module your theorems will be numbered 1.x for the first section, 2.x for the second, etc.

If you for some reason don't want the section number in the theorem number (which you should, if you're cross referencing theorems), you can add to the preamble (Document --> Settings --> LaTeX preamble) the following.


(Assuming you're using the Theorems (AMS) module, I didn't check if other theorem modules have other names for that counter.)

Note that the LyX view will not have the correct numbers with this last method, but the PDF will be correct.

Reference: Resetting theorem counters: \sections and (missing) \subsections

share|improve this answer
Thanks a lot ! It worked ! Many Thanks ! – joshua Nov 10 '12 at 18:04

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.