# No page number on \appendixpage

I am using the appendix package with the \appendixpage command to insert a "Appendices" title page. However, I was wondering how I could avoid that there is a pagenumber on this inserted page.

MWE:

\documentclass{book}
\usepackage[titletoc]{appendix}
\begin{document}

\tableofcontents

\appendix
\appendixpage
\noappendicestocpagenum

\chapter{Some title}
Some text

\end{document}

Mind that the \noappendicestocpagenum is about a page number in the ToC, not in the text, so this is unrelated to my question.

-

The page style of that appendix page is plain. You could temporarily redefine it to be empty:

\appendix
\begingroup
\makeatletter
\let\ps@plain\ps@empty
\appendixpage
\makeatother
\endgroup
\noappendicestocpagenum


The important line is just

\let\ps@plain\ps@empty


\makeatletter and \makeatletter have been used to be able to work with @ in macro names, \begingroup and \endgroup limit the scope of this redefinition. So afterwards, plain is normal plain again.

Referring to lockstep's comment, you can do this in the preamble instead. Define

\makeatletter
\newcommand*{\myappendixpage}{%
\begingroup
\let\ps@plain\ps@empty
\appendixpage
\endgroup}
\makeatother


and later in the document just use it:

\appendix
\myappendixpage
\noappendicestocpagenum


Or redefine \appendixpage in the preamble:

\let\plainappendixpage\appendixpage
\makeatletter
\renewcommand{\appendixpage}{%
\begingroup
\let\ps@plain\ps@empty
\plainappendixpage
\endgroup}
\makeatother


Note, if you use \let in situations with a macro with optional argument or one made by \DeclareRobustCommand, use \LetLtxMacro of the letltxmacro package instead. Here, \let is sufficient.

-
I prefer "preamble-only" solutions. ;-) –  lockstep Dec 6 '11 at 22:07
Like often, it's directly demonstrated in the body. Of course it can go to the preamble, for example just define \myappendixpage with this code in the preamble and use that instead. –  Stefan Kottwitz Dec 6 '11 at 22:10
@Lockstep: I agree. But on the other hand, Stefan's solution is less dependent on the internals of the appendix package, right? –  Matthias Dec 6 '11 at 22:16
@Stefan: I was about to ask that. Would it also be possible to redefine \appendixpage? –  Matthias Dec 6 '11 at 22:17
@Matthias Yes, I added a version. –  Stefan Kottwitz Dec 6 '11 at 22:26

Use the etoolbox package to patch the \@chap@pppage macro.

\documentclass{book}

\usepackage[titletoc]{appendix}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@chap@pppage}{\thispagestyle{plain}}{\thispagestyle{empty}}{}{}
\makeatother

\begin{document}

\tableofcontents

\appendix
\appendixpage
\noappendicestocpagenum