No page number for dividing pages in LaTeX

I have a report in LaTeX and I used the following commands to create my Application, however, my lecturer states that any dividing pages should be numbered.

\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 separator page, but still puts the page number in the footer. There is no page number in TOC as expected.

How to remove it from the footer?

+4
source share
4 answers

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

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}
+4
source

The TeX FAQ may come in handy here:

I asked for "blank", but the page is numbered

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

A simple solution is to republish the page style after the command, with the effect for one page, as for an example (in the article):

  \ maketitle
 \ thispagestyle {empty} 

So add \thispagestyle{empty} after trying \appendix to try.

0
source

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

0
source

Try instead:

 \pagenumbering{gobble} \begin{appendices} \newpage \clearpage \pagenumbering{arabic} \addtocounter{page}{100} \tableofcontents \newpage 

* Special thanks to https://tex.stackexchange.com/questions/6639/removing-page-numbers-but-not-headers !

0
source

Source: https://habr.com/ru/post/1306835/


All Articles