# Remove showing page numbering from ToC and Part pages

I searched for a solution and found some of them but they didn't work for me. I don't know why. I have multimapge ToC and want to remove showing the page numbers on them. I also would like to remove pages numbers on the pages where the \part name is showed. My MWE:

\documentclass[12pt,a4paper,twoside]{report}
\usepackage[top=25mm, bottom=25mm, outer=15mm, inner=35mm]{geometry}
\renewcommand{\baselinestretch}{1.15}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{polski}
\usepackage[polish]{babel}
\usepackage{lipsum}

\begin{document}

\tableofcontents

\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]
\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]
\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]
\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]
\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]
\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]
\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]
\part{XXX}
\lipsum[1]
\chapter{xxx}
\lipsum[1]
\section{1234}
\lipsum[1]

\end{document}

• Have you tried \thispagestyle{empty}? Also, have a look at this page: tex.stackexchange.com/questions/191181/…. – AML May 11 '18 at 10:25
• yes, I tried, but on multipage ToC it removes page numbering just only on the one page of ToC, and do not remove pages from /part pages – Emil Kob May 11 '18 at 10:49

OPTION #1 (ToC only): Instead of:

\tableofcontents
\thispagestyle{empty}


you can use:

\pagestyle{empty}
{
\renewcommand{\thispagestyle}[1]{}
\tableofcontents
}
\clearpage
\pagestyle{plain}


This eliminates page numbers from both pages of your ToC and starts your Chapter 1 at page 3 (includes invisible ToC pages). See this answer for explanation.

OPTION #2 (ToC only):

Another option that works, from here, is to use:

\cleardoublepage
\pagenumbering{gobble}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}


This starts your Chapter 1 at page 1.

OPTION #3 (ToC and Part): And of course you can include \part in the page gobbling party like so:

\cleardoublepage
\pagenumbering{gobble}
\tableofcontents

\part{XXX}
\lipsum[1]
\cleardoublepage
\pagenumbering{arabic}

• Thank you, it works. I used 1'st option for ToC only, and another solution to remove page numbering from \part, because your require (option 3) adding text before all \part declarations. Thank you! P.S. I think, used wrong words to search for this solution – Emil Kob May 11 '18 at 12:28
• I don't think that the third solution is a good one for two reasons. The first is that OP has to type \pagenumbering{gobble}\part{..}\pagenumbering{arabic} for each \part, the second is that gobble reset the counter of the pages and I don't think that this is what OP wants. – gvgramazio May 11 '18 at 12:29
• @EmilKob The fact that his third solution required adding text before and after each part could be avoided redefining \part. – gvgramazio May 11 '18 at 12:34

In order to have part pages empy you can add in your preamble

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


That is simply the definition of part made in report.cls but with \thispagestyle{plain} changed to \thispagestyle{empty}

• Nothe that this resolve only the second part of your question. I suggest you to take a look at the answer by AML. But pay attention to the page numbering. I think that his first option combined with mine is what you are looking for but maybe I'm wrong. – gvgramazio May 11 '18 at 12:32
• Yes I know, i used 1'st option from AML's answer for ToC. Thanks! – Emil Kob May 11 '18 at 12:39