How to get rid of page numbers

Very occasionally, one wants a document with no page numbers. For such occasions, the package nopageno will make \pagestyle{plain} have the same effect as \pagestyle{empty}; in simple documents, this will suppress all page numbering (it will not work, of course, if the document uses some other pagestyle than plain).

To suppress page numbers from a sequence of pages, you may use \pagestyle{empty} at the start of the sequence, and restore the original page style at the end. Unfortunately, you still have to deal with the page numbers on pages containing a \maketitle, \part or \chapter command, since the standard classes; deal with those separately, as described below.

To suppress page numbers on a single page, use \thispagestyle{empty} somewhere within the text of the page. Note that, in the standard classes, \maketitle and \chapter use \thispagestyle internally, so your call must be after those commands.

Unfortunately, \thispagestyle doesn’t work for book or report \part commands: they set the page style (as do \chapter commands), but then they advance to the next page so that you have no opportunity to change the style using \thispagestyle. The present author has proposed solving the problem with the following “grubby little patch”, on comp.text.tex:


Fortunately, that patch has now been incorporated in a small package nonumonpart (a difficult name\dots)

Both the KOMA-script classes and memoir have separate page styles for the styles of various “special” pages, so, in a KOMA class document one might say:


while memoir will do the job with


An alternative (in all classes) is to use the rather delightful \pagenumbering{gobble}; this has the simple effect that any attempt to print a page number produces nothing, so there’s no issue about preventing any part of LaTeX from printing the number. However, the \pagenumbering command does have the side effect that it resets the page number (to 1), so it is unlikely to be helpful other than at the beginning of a document.

The scrpage2 package separates out the representation of the page number (it typesets the number using the \pagemark command) from the construction of the page header and footer; so one can say


which will also suppress the printing of the page number.

Neither of these “suppress the page number” techniques touches the page style in use; in practice this means they don’t make sense unless you are using \pagestyle{plain}

macros/latex/contrib/fancyhdr (or browse the directory); catalogue entry
KOMA script bundle
macros/latex/contrib/koma-script (or browse the directory); catalogue entry
macros/latex/contrib/memoir (or browse the directory); catalogue entry
macros/latex/contrib/nonumonpart (or browse the directory); catalogue entry
macros/latex/contrib/nopageno (or browse the directory); catalogue entry
Distributed as part of macros/latex/contrib/koma-script (or browse the directory); catalogue entry

This answer last edited: 2011-04-16

This question on the Web: