2

This is a followup question to How to add cover pages to appendices? . This screenshot shows the school requirements.

enter image description here

This minimal example comes from Ruben's solution to the previous problem:

\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
        \MakeUppercase \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
      \fi
    \fi
    \interlinepenalty\@M
    #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} 

From Ruben's solution, the only thing missing is that the main APPENDICES heading (page 29 in screenshot) should be Uppercase and in normal size font (instead of huge and bold, as it is right now.)

What I understand so far:

The appendix package manual, page 7, shows this bit of code that seems to be formatting appendixpagename ,

\newcommand{\@chap@pppage}{%
\clear@ppage
\thispagestyle{plain}%
\if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
\null\vfil
\markboth{}{}%
{\centering
\interlinepenalty \@M
\normalfont
\Huge \bfseries \appendixpagename\par}%

This last line seems to do the formatting. It would seem that deleting the \Huge \bfseries and adding \MakeUpperCase should do it, but how do I wrap the code to add it to the tex document?

Or perhaps this whole approach is wrong. Please advise!

1
  • 1
    If you want to use that code on your document, insert it in your preamble surrounded by \makeatletter <insert here> \makeatother and use \renewcommand.
    – Sigur
    Jan 6, 2014 at 21:38

1 Answer 1

3

What you need is \renewcommand. As the name implies this is for redefining an existing macro, in this case \@chap@pppage. Add to your preamble, between the \makeatletter and \makeatother

\renewcommand{\@chap@pppage}{%
  \clear@ppage
  \thispagestyle{plain}%
  \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
  \null\vfil
  \markboth{}{}%
  {\centering
   \interlinepenalty \@M
   \normalfont
   \MakeUppercase \appendixpagename\par}%
  \if@dotoc@pp
    \addappheadtotoc
  \fi
  \vfil\newpage
  \if@twoside
    \if@openright
      \null
      \thispagestyle{empty}%
      \newpage
    \fi
  \fi
  \if@tempswa
    \twocolumn
  \fi
}

This is the complete (you had only included part of it in your question), old definition of \@chap@pppage, except that \Huge \bfseries is swapped with \MakeUppercase, as you yourself said.

If you don't want the start page for the appendices to appear in the table of contents, remove the toc option from the appendix package. If you want the ToC entry but you don't want the page number, add \noappendicestocpagenum to the preamble, after loading appendix. Complete code:

\documentclass[12pt,letterpaper,oneside]{book}

\usepackage[toc,page]{appendix}
\noappendicestocpagenum

\usepackage{lipsum}

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

\renewcommand{\@chap@pppage}{%
  \clear@ppage
  \thispagestyle{plain}%
  \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
  \null\vfil
  \markboth{}{}%
  {\centering
   \interlinepenalty \@M
   \normalfont
   \MakeUppercase \appendixpagename\par}%
  \if@dotoc@pp
    \addappheadtotoc
  \fi
  \vfil\newpage
  \if@twoside
    \if@openright
      \null
      \thispagestyle{empty}%
      \newpage
    \fi
  \fi
  \if@tempswa
    \twocolumn
  \fi
}
\makeatother


\begin{document}
\tableofcontents
\chapter{No Appendix}
\lipsum

%\addtocontents{toc}{\bigskip\scshape Appendices \hfill \par} 
\begin{appendices}
\chapter{One}
\lipsum
\end{appendices}
\end{document} 
2
  • Thank you Torbjørn, but something suprising (and even desirable) happened -- the main "Appendices" is now gone from the Table of Contents. (appendices A B are still there). As a workaround, I now added a \addtocontents{toc}{\scshape Appendices \hfill \par} line right before \begin{appendices}. I say desirable because in fact I did not want that particular "Appendices" to be followed by dots or a page number. Jan 6, 2014 at 22:07
  • @JuanZuluaga See my updated answer about the ToC entry. Jan 6, 2014 at 22:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .