\chapter{First chap}
\section{First sec}
this one is correct.

\chapter{Second chap}
This number is wrong.

\section{Second sec}
this one is correct again.

Obviously I would like to have the lemma in the 2nd chapter before the Second sec to start at zero. But how?

  • The number is “2.0.1”; what do you expect it to be?
    – egreg
    Sep 5, 2015 at 23:10
  • @egreg only in 2015 release Sep 5, 2015 at 23:23
  • @DavidCarlisle Hidden feature!
    – egreg
    Sep 5, 2015 at 23:26
  • @egreg In my actual work there are some lemmas and theorems before the new chapter, so the first lemme in the new chapter has number i.e. 4.0.3 ; and this does not look fine
    – os23
    Sep 5, 2015 at 23:52

1 Answer 1


LaTeX < 2015: The number of the lemma is only reset, when section is increased, not chapter. \@addtoreset helps to reset lemma, if chapter is increased:



In the recent LaTeX release 2015/01/01, this is no longer necessary, because the counter reset is implemented in a transitive way.

Number format

If the section number 0 should be suppressed, then the following redefinition of \thelemma helps:

  \ifnum\value{section}=0 %

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .