tags:

views:

336

answers:

3

I have a report in LaTeX, and i have used the following commands to create my Appendix, however, my lecturer states that any divider pages should be unnumbered.

\documentclass{report}
   \usepackage{appendix}
   \begin{document}
       \include{chap1}
       \include{appendix}
   \end{document}

Then in appendix.tex

\appendix
\pagestyle{empty}
\appendixpage
\noappendicestocpagenum
\addappheadtotoc

This creates the Appendices divider page, but still puts a page number on it in the footer. There is no page number in the TOC, as expected.

How can i remove it from the footer?

Thanks

A: 

The TeX FAQ might come in handy here:

I asked for “empty”, but the page is numbered

If you use \pagestyle{empty} and you find some pages are numbered anyway, you are probably encountering one of the style decisions built into the standard LaTeX classes: that certain special pages should always appear with \pagestyle{plain}, with a page number at the centre of the page foot. The special pages in question are those (in article class) containing a \maketitle, or (in book and report classes) \chapter or \part commands.

The simple solution is to reissue the page style after the command, with effect for a single page, as, for example (in article):

\maketitle
\thispagestyle{empty}

So give adding \thispagestyle{empty} after your \appendix a try.

Sebastian P.
Just tried that, with no success. I put it after `\appendix` and tried it after `\appendixpage` too. Thanks.
joec
A: 

try changing \pagestyle{empty} to \thispagestyle{empty} and put it after \addappheadtotoc.

Mica
Tried, didn't change anything. thanks
joec
+4  A: 

I looked at the appendix.sty source, and I see the problem: line 74, in the definition of \@chap@pppage, issues a \thispagestyle{plain} command, thus overriding your \pagestyle{empty} for this page. The inelegant but direct way to fix this is to redefine the command without this line - issue the following code after importing the package.

Revised, tested version

\documentclass{report}
   \usepackage{appendix}
%==== The action ================
\makeatletter
\def\@chap@pppage{%
  \clear@ppage
  \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
  \null\vfil
  \markboth{}{}%
  { \centering \interlinepenalty \@M
    \normalfont \Huge \bfseries \appendixpagename\par}%
  \if@dotoc@pp\addappheadtotoc\fi
  \vfil\newpage
  \if@twoside
    \if@openright \null \thispagestyle{empty}\newpage\fi
  \fi
  \if@tempswa \twocolumn\fi
}
\makeatother
%==== Back to the document ========
   \begin{document}
\tableofcontents
\chapter{Blah}
Rhubarb, rhubarb, rhubarb.

\appendix
\pagestyle{empty}
\appendixpage
\noappendicestocpagenum
\addappheadtotoc
\chapter{Boff}
Cabbages, cabbages, cabbages.

   \end{document}
Charles Stewart
Thanks for that, but it still has page numbers on it. I can see the logic of the code, but can't understand why it doesnt work. Thanks.
joec
Charles Stewart