# Preventing the page number from appearing on the title page of part

Can someone help me to get rid of the page number at the bottom of the \part title page in the book document class?

Using

\renewcommand{\part}{\thispagestyle{empty}}


will change the font and style of the part's title page altogether.

-

The \part command is defined in book.cls with the plain style. You can modify this to empty by inserting the following code in your preamble.

\makeatletter
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{empty}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
\makeatother

-

One way of doing this would be to copy the contents of the empty page style into the plain page style momentarily:

\documentclass{book}
\begin{document}
\begingroup
\makeatletter
\let\ps@plain\ps@empty
\makeatother
\part{foo}
\endgroup

\chapter{A chapter}
\end{document}​


You could also use the etoolbox package to modify (or patch) the \part command to not use the plain page style:

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\patchcmd{\part}{\thispagestyle{plain}}{\thispagestyle{empty}}{}{}% Use empty page style, not plain


The last two arguments of \patchcmd can be used to output something based on a successful patch (second-to-last argument) or not (last argument): \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}

-
Thanks a lot. It worked – Thomas Feb 2 '12 at 20:34
@Thomas: If the answers helped, consider up-voting and selecting one as the answer (whichever helped you most). See How do you accept an answer? – Werner Feb 2 '12 at 20:37