# Sectioning Inside Appendices

I am using the following to include appendices at the end of a memoir document:

\documentclass[a4,12pt,oneside,openany]{memoir}
\renewcommand\cftappendixname{\appendixname~}

\begin{document}
\begin{appendices}
\chapter{First Appendix}
\section{Section}
\subsection{Subsection}

\chapter{Second Appendix}
\section{Section}
\subsection{Subsection}
\end{appendices}
\end{document}


I want to include numbered sections and subsections in each appendix, which I can label and cross-reference. When I use \section{sec: Appendix1 Section1}, or \subsection{sec: Appendix1 Subsection1}, only the sections are numbered; the subsection are not, they are merely titled.

• Can you please make your code compilable. There's no need to refer to \input which we can't reproduce. Just put some text there and a \section{} command. And add \documentclass{memoir} etc. If you do that, you will get sections numbered A.1 etc. but subsections will not be numbered. If you're getting no numbers at all, then you have done something to change that which you're not showing us. What do you want the numbers for appendices to look like? – Alan Munn May 4 '20 at 15:51
• The question was unclear on this: I want subsections to be numbered as well. – bozidarka May 4 '20 at 15:56
• The sections are labeled A.1, A.2, etc. The subsections remain unlabeled. – bozidarka May 4 '20 at 16:06

You can number subsections by using \setsecnumdepth{subsection} inside the appendices environment:

\documentclass{memoir}
\renewcommand\cftappendixname{\appendixname~}
\begin{document}
\begin{appendices}
\setsecnumdepth{subsection}
\chapter{First Appendix}
First appendix.
\section{A section}
\subsection{A subsection}
\chapter{Second Appendix}
\section{Another section}
\subsection{A subsection}
Second appendix
\end{appendices}
\end{document}


• @Bernard Indeed. Thanks for the edit. – Alan Munn May 4 '20 at 16:58