\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 '15 at 23:10
  • @egreg only in 2015 release – David Carlisle Sep 5 '15 at 23:23
  • @DavidCarlisle Hidden feature! – egreg Sep 5 '15 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 '15 at 23:52

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 %
| 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.