# Changing the numbering in appendix

So I use the following theorem environments, which are resetted in each section.

\newtheorem{definition}{Definition}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]


So I have a counter for each theorem, i.e. for definition, proposition and lemma. But in the appendix, I want that definition, proposition and lemma share a counter, that is they get labeled consecutively.

In other words, after I start

\appendix


I would like to have the following numbering: Lemma A.1 Proposition A.2

instead of Lemma A.1 Proposition A.1

How can this be achieved? I have been trying a lot, but without success.

EDIT: The following document illustrates my problem.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}

\begin{document}

\newtheorem{definition}{Definition}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]

\section{First section}
\begin{definition}
test
\end{definition}
\begin{definition}
test2
\end{definition}
\begin{lemma}
testLemma
\end{lemma}

\appendix
\section{My appendix}
\begin{lemma}
THIS IS
\end{lemma}
\begin{proposition}
NOT THE WAY I WANT IT TO BE
\end{proposition}

\end{document}

• Could you post a full, yet minimal, compilable code? Aug 12 '17 at 14:20
– Doc
Aug 12 '17 at 15:46

It is very easy with ntheorem which has a \renewtheorem command and apptools, for its \AtAppendix command:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{ntheorem}

\newtheorem{definition}{Definition}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]
\usepackage{apptools}
\AtAppendix{\renewtheorem{definition}{Definition}[section]
\renewtheorem{proposition}[definition]{Proposition}
\renewtheorem{lemma}[definition]{Lemma}}

\begin{document}

\section{First section}
\begin{definition}
test.
\end{definition}
\begin{definition}
test2.
\end{definition}
\begin{lemma}
test Lemma.
\end{lemma}

\appendix

\section{My appendix}

\begin{lemma}
THIS IS
\end{lemma}
\begin{proposition}
NOT THE WAY I WANT IT TO BE
\end{proposition}

\begin{definition}
OR IS IT?
\end{definition}

\end{document}