Im using the usual counter for my book. That is, the theorems, lemmas, etc, are labeled according to the chapter and section (Ex Theorem 2.5.18).

I included an appendix just with the chapter title and it has no sections, the commands I set were



but the theorems, lemmas, def, etc in this chapter are labeled with things like "Theorem A.0.5.", I want that it be in the form "A.5", that is, ommit the section countering.

  • What packages do you use to generate your theorems?
    – Werner
    Commented Aug 14, 2012 at 16:14
  • Do your theorems, lemmas, etc. share a common counter, or are they numbered separately? Also, how is the subordination of the theorem/lemma/etc counter(s) achieved in the first place? Via instructions such as \numberwithin{section}{theorem}? Please advise.
    – Mico
    Commented Aug 14, 2012 at 16:30
  • I use the following instructions for the subordination \newtheorem{teor}{Theorem}[section] \newtheorem{prop}[teor]{Proposition} \newtheorem{defin}[teor]{Definition} \newtheorem{corol}[teor]{Corollary} \newtheorem{lema}[teor]{Lemma}
    – everk
    Commented Aug 14, 2012 at 16:32

1 Answer 1


This may depend heavily on the package you're using for your theorems/lemmas. However, in the default situation with book and using the traditional \newtheorem command to create your theorems, the following works.

The MWE below renews the display of the section number to only print the chapter number (since the section number is not needed). The image below shows an extract of pages 1 & 3 only:

enter image description here

\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\chapter{A chapter}\lipsum[1]
\section{A section}\lipsum[2]
\@addtoreset{theorem}{chapter}% Reset theorem counter with stepping of chapter
\renewcommand{\thesection}{\thechapter}% Section number prints chapter number
\chapter{Another chapter}\lipsum[4]

Counter resetting with the stepping of other counters is achieved via \@addtoreset. However, other packages also provide this functionality, like chngcntr (using \counterwithin and \counterwithout) and amsmath (using \numberwithin and \numberwithout). See the TeX FAQ entry Master and slave counters.

  • it was very useful, but I have another problem with your solution. If I include a second appendix B, the labeling continues with respect to the previous appendix. For example, the first theorem was "Theorem B.15" and not "Theorem B.1"
    – everk
    Commented Aug 14, 2012 at 16:35
  • @everk: I've added \@addtoreset to modify the way theorems work in the appendix.
    – Werner
    Commented Aug 14, 2012 at 17:02
  • In my case, I included package fncychap in an article document, which caused the problem. So I just removed fncychap because I do not need to modify chapter styles in an article!
    – zyy
    Commented Apr 15, 2020 at 1:19

You must log in to answer this question.

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