In the memoir
class, I would like to have my theorems labeled according to the sections, e.g., Theorem 1.2.3.
However, sometimes I have theorems at the beginning of a chapter before the first section of the chapter is declared. It seems that LaTeX incorrectly handles the numbering of the theorems in this case, and it does not seem to reset the theorem counter at the declaration of a new chapter. For example
\documentclass{memoir}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\chapter{One}
\section{A}
\begin{theorem} OneA \end{theorem}
\chapter{Two}
\begin{theorem} Two \end{theorem}
\section{B}
\begin{theorem} TwoB \end{theorem}
\end{document}
Gets me:
Chapter 1 One
1.1 A
Theorem 1.1.1 OneA
Chapter 2 Two
Theorem 2.0.2 Two
2.1 B
Theorem 2.1.1 TwoB
which gets the numbering of theorem Two incorrectly as 2.0.2 (whereas it should be 2.0.1), since the counter is still running from the last section in the previous chapter.
How do I fix this?
2.2
then, not2.0.2
as you wrote?