I'm writing some notes, and I'd like to have a different labeling convention in the appendices than in the main text. In the main text I'd like to label things with 2 tiers (e.g., Theorem 3.2) while in the appendix I'd like to label them with 3 tiers (e.g., Theorem A.1.5). Is this possible?
Asked
Active
Viewed 47 times
0
1 Answers
2
The answer is yes, see e.g. here.
\documentclass{article}
\usepackage{amsmath,amsthm}
\newtheorem{mythm}{Theorem}[section]
\begin{document}
\section{Eucalyptus trees}
\begin{mythm}
Koalas love eucalyptus.
\end{mythm}
\section{Marmots}
\begin{mythm}
Koalas like marmots.
\end{mythm}
\numberwithin{mythm}{subsection}
\appendix
\section{Activities}
\subsection{During daytime}
\begin{mythm}
Koalas sleep a lot.
\end{mythm}
\subsection{Hibernation}
\begin{mythm}
Koalas don't hibernate.
\end{mythm}
\end{document}
-
Thanks, this is super helpful! As a quick followup, if I want to change the numbering for both Lemmas and Theorems (and other theorem environments), do I have to add lines \numberwithin{theorem}{subsection} and \numberwithin{lemma}{subsection} or is it possible to change the numberings for all environments with one command? – Aaron Landesman May 13 '18 at 16:22
-
@AaronLandesman No, you can make counters follow a master counter, see here and perhaps also here. – May 13 '18 at 17:23
\numberwithin. If this fails, you may want to provide more context, e.g. an MWE. – May 13 '18 at 02:13