I have a long (mathematical) document with parts, sections, subsections and paragraphs. The theorems etc. in the parts are numbered
Theorem 1.2.3
where the first number corresponds to the section
, the second number to the subsection
and the third to the number of the theorem, example, etc.
In the appendix (and only in the appendix), I will only use sections, no subsections. By default, a lemma in the appendix is numbered as
Lemma A.0.1
for the first lemma in the first appendix. I would like to suppress the subsection
number (only in the appendix), so that the first lemma in the first appendix is numbered as
Lemma A.1
I have tried to add \setcounter{secnumdepth}{1}
after the \appendix
command, but nothing changed.
\renewcommand{\thetheorem}{\thesection.\arabic{theorem}}
after you've started you Appendix.Lemma A.5
. Do I need to redefine all my theorems/lemmas/etc.? Is that possible outside of the preamble?chngcntr
and putting\counterwithin{theorem}{section}
after\appendix
.theorem
is not your counter, replace it with the one you-re using, e.g.lemma
.