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'm writing a multichapter report and I'm having a problem with the theorems being numbered correctly of section zero of a new chapter.

For instance, chapter two ends with Corollary 2.3.21 and Chapter three begins with Theorem 3.0.22. Also, Chapter three ends with Corollary 3.3.2 and Chapter four begins with Theorem 4.0.3. And so on...

My (edited to not write out whole theorems) code follows.


%Declaring a bunch of math symbols%


\chapter{The First Chapter} \input{thefirstchapter}

\chapter{The Second Chapter} \input{thesecondchapter}

et cetera

edit: I also forgot to mention something very curious about this: Chapters one and two are fine, it's every following chapter that is a problem.

edit part 2: Here's a minimal working example

\chapter{The First Chapter}
\begin{theorem} Here's some stuff.\end{theorem}
\begin{remark} Here's a remark about stuff \end{remark}
\section{stuff part 2}
\begin{corollary} Here's some stuff about stuff\end{corollary}
\begin{conjecture} Here's what should happen \end{conjecture}
\chapter{The Second Chapter}
\begin{lemma} Here's some small stuff\end{lemma}
\begin{lemma} Here's some more smalll stuff\end{lemma}
\section{big stuff}
\begin{theorem} Big Theorem\end{theorem}
\begin{theorem} Big Theorem\end{theorem}
\begin{corollary} Big Consequence.\end{corollary}
\section{almost as big stuff}
\begin{lemma} small stuff\end{lemma}
\begin{theorem} big stuff\end{theorem}
\begin{corollary} big stuff\end{corollary}
\chapter{The Third chapter}
\begin{definition} How about this stuff?\end{definition}

Note that the first lemma of chapter 2 prints as lemma 2.0.3 and the definition in chapter 3 prints as definition 3.0.4

share|improve this question
Have a look at tex.stackexchange.com/questions/24822/… – lockstep Apr 6 '12 at 17:17
up vote 5 down vote accepted

you are numbering theorems within sections. therefore, if a theorem appears within the first part of a chapter before the first \section command, the theorem number won't be reset. (it isn't automatically reset at a chapter break since you have specified per-section numbering.)

add the code \setcounter{theorem}{0} at the beginning of any chapter where you will have theorem-class objects before the first section.

the reference given in @lockstep's comment also contains a workable approach.

share|improve this answer
I implemented this and it worked. Thanks! – user13352 Apr 6 '12 at 18:26

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.