Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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
share|improve this answer

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>}

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.