1

I am using southall chapter style for a book. However, I need to customize it so that it shows "Appendix A", etc for appendices rather than just "A", etc. That is, the chapter numbers for the main chapters should remain as they are, but for appendix, they should be preceded by the label Appendix.

My MWE is as follows:

\documentclass{memoir}
\usepackage{lipsum}
\chapterstyle{southall}
\renewcommand\cftappendixname{\appendixname~}
\begin{document}
\frontmatter

\tableofcontents*

\chapter{Preface}
\lipsum[1]

\mainmatter
\chapter{Introduction}
\lipsum[1]

\begin{appendices}

\chapter{Extra material at the back}
\lipsum[1]

\end{appendices}

\end{document}
  • And where can this style be found? – Bernard Aug 9 '15 at 23:16
  • It is a part of memoir. In memoir.cls. Sorry, stackexchange removed some lines from my MWE. Have added them back. – len71 Aug 9 '15 at 23:17
  • I'm sorry, I don't know memoir at all. You might try looking at the appendix package (same author as memoir, I believe), which has chances to be compatible. – Bernard Aug 9 '15 at 23:22
2

Here's one way to do it: the idea is to define an appsouthall variant of the original southall style and then use the etoolbox package so the new style is used inside the appendices environment.

The code:

\documentclass{memoir}
\usepackage{etoolbox}
\usepackage{lipsum}

\chapterstyle{southall}
\renewcommand\cftappendixname{\appendixname~}

\newlength\AppWd
\settowidth\AppWd{\chapnumfont\appendixname}

\makechapterstyle{appsouthall}{%
  \chapterstyle{southall}
  \addtolength{\midchapskip}{-\AppWd}
  \renewcommand*{\printchapternum}{%
    \begin{minipage}[t][\baselineskip][b]{\dimexpr\beforechapskip+\AppWd\relax}
      {\vspace{0pt}\chapnumfont%%%\figureversion{lining}
                   \appendixname~\thechapter}
    \end{minipage}}%
}
\AtBeginEnvironment{appendices}{\chapterstyle{appsouthall}}

\begin{document}
\frontmatter

\tableofcontents*

\chapter{Preface}
\lipsum[1]

\mainmatter
\chapter{Introduction}
\lipsum[1]

\begin{appendices}

\chapter{Extra material at the back}
\lipsum[1]

\end{appendices}

\end{document}

The result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.