[Tex/LaTex] How to add cover pages to appendices

appendiceschapterssectioningtable of contents

For my thesis, I need to have appendices preceded by a cover page.

From school manual:

enter image description here

As of now, I have

\documentclass[12pt,letterpaper,oneside]{book}
\usepackage[toc,page]{appendix}
...
\begin{appendices}
\input{appendix.parallel.tex}
\input{appendixdistortioncheck.tex}
\input{appendix.code.tex}
\end{appendices}

Each file starts with a \chapter{Blah} line.

The appendices themselves don't show up too well,

enter image description here

perhaps because I needed to reformat the chapter headings. The TOC shows up well.

(I tried using \part{...} instead of \chapter{...}, and it does create a cover page for each appendix,

enter image description here

but now the TOC is messed up.)

enter image description here

What would you advise? Thank you!

Best Answer

You can simply add a patched version of the \@makechapterhead macro (which is responsable for creating the chapter headings) to the \appendices macro which will be called when using the appendices environment via \g@addto@macro. This patch is locally bounded because it will be applied inside the environment.

Complete Code

\documentclass[12pt,letterpaper,oneside]{book}
\usepackage[toc,page]{appendix}
\usepackage{lipsum}

\makeatletter
\def\@makeappendixhead#1{%
  \null\vfill%
  {\parindent \z@ \centering \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
      \fi
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vfill
    \clearpage
  }}
\g@addto@macro\appendices{\let\@makechapterhead\@makeappendixhead}
\makeatother

\begin{document}
\tableofcontents
\chapter{No Appendix}
\lipsum
\begin{appendices}
\chapter{One}
\lipsum
\end{appendices}
\end{document}

Original version of \@makechapterhead

\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
      \fi
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}

(From latex.ltx)