# Lemma numbering not changed in appendix when using a solution

I am trying to implement the lemma numbering solution in this question. I am currently compiling the document from a parent file such that:

\usepackage{chngcntr}
\usepackage{apptools}
\AtAppendix{\counterwithin{lemma}{section}}

\newtheorem{lemma}{Lemma}

\begin{appendices}
\include{Appendix1/appendix1}
\end{appendices}


where the appendix file has

\begin{lemma}
A lemma in appendix.
\end{lemma}


The lemma number remains sequential and doesn't change to reflect that it is in the appendix file...

• Please -- as usual here -- make your code snippet compilable! Did your used class define environment appendices? As far as I know command appendix is usualy used to initiate the appendix. – Kurt Mar 22 at 18:42

\begin{appendices}