# Rename appendix section in a single chapter

I want to add an appendix section to one chapter in a latex document of class book.

I do not like the style of the subappendices package, where the appendices per chapter are quite highlighted. I like very much the style that the MWE below gives, but I have two problems: I currently manually number the appendix section as 2.A. The effort is okay with me, but the spacing is not quite right. More importantly, I don't know how to get the Lemma labeled 2.A.1''.


\documentclass{book}
\usepackage{amsmath}
\newtheorem{lemma}{Lemma}[section]
\begin{document}
\tableofcontents
\chapter{One}
\section{One.One}
Test One.One
\begin{lemma}
This is numbered as desired.
\end{lemma}
\section{One.Two}
Test One.Two
\chapter{Two}
\section{Two.One}
Test Two.One
\section{One.Two}
Test Two.Two
\section*{2.A Appendix: Pi}
This section has a little bit too little space between 2.A'' and Appendix: Pi'' (both here and more visibly in the ToC)
%\renewcommand{\thesection}{2.A}
\begin{lemma}
This should be Lemma 2.A.1
\end{lemma}
%\renewcommand{\thesection}{\arabic{section}}
\chapter{Three}
\section{Three.One}
Test Three.One
\begin{lemma}
This should be Lemma 3.1.1
\end{lemma}
\end{document}


Quick and dirty fix. Seems to do what you want.

\documentclass{book}
\usepackage{amsmath}
\newtheorem{lemma}{Lemma}[section]
\begin{document}
\tableofcontents
\chapter{One}
\section{One.One}
Test One.One
\begin{lemma}
This is numbered as desired.
\end{lemma}
\section{One.Two}
Test One.Two
\chapter{Two}
\section{Two.One}
Test Two.One
\section{One.Two}
Test Two.Two

{\setcounter{section}{0}
\renewcommand{\thesection}{\thechapter.\Alph{section}}
\section{Appendix: Pi}%
This section has a little bit too little space between 2.A'' and Appendix: Pi'' (both here and more visibly in the ToC)
\begin{lemma}
This should be Lemma 2.A.1
\end{lemma}
}
\chapter{Three}
\section{Three.One}
Test Three.One
\begin{lemma}
This should be Lemma 3.1.1
\end{lemma}
\end{document}

• It does, will award bounty as soon as I can, thanks – Bananach Oct 23 '18 at 14:46