Page LayoutRemove page number from Part (book class)

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Pilot Island
Posts: 2
Joined: Sat Mar 21, 2009 7:45 pm

Remove page number from Part (book class)

Post by Pilot Island »

Hello,

I am using the book class, and I'm quite pleased with the standard headers using the myheadings style and markboth before each chapter. My book is coming along well, but I have one issue.

How do I remove the page number from the bottom of each Part section? I've tried the thispagestyle{empty} code, which works on other pages but not before Part. I know there's a command to turn them off in KOMA-script, but I'm on a roll with the book class and don't wish to change anything else.

Thanks for your time.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Remove page number from Part (book class)

Post by Stefan Kottwitz »

Hi,

this would be a straightforward way:

Code: Select all

Code, edit and compile here:
\makeatletter
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{empty}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
\makeatother
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Stefan
LaTeX.org admin
Pilot Island
Posts: 2
Joined: Sat Mar 21, 2009 7:45 pm

Re: Remove page number from Part (book class)

Post by Pilot Island »

Stefan,

Yes! It worked! Thank you so much. :D
Post Reply