# Hide page numbering but retain header/footer

I would like to remove page numbering on a specific page. However, the header and footer should remain intact. If I try:

\thispagestyle{empty}


The header and footer disappear. What is the recommended way of removing just the page number?

• You have to define a new page style with your required properties. Than you can use \thispagestyle{mypagestyle} May 18, 2013 at 8:34
• @MarcoDaniel thanks, I have looked into that. But there is no single command to just remove page numbering then? May 18, 2013 at 8:36
• You can call some commands like cfoot inside the document. E.g. \def\nofoot{\cfoot{}} and \def\withfoot{\cfoot{\thepage}}: Now you can call \nofoot on pages with no footer. But you have to activate the footer on the next page with \withfoot. May 18, 2013 at 8:41
• Great, thanks! I found just using \cfoot{} works for my purpose. Could you provide this as an answer to accept it? May 18, 2013 at 8:47

1. You can define your own page style with the required header and without any footer. This new defined page style can be used with \thispagestyle.
2. On the other hand you can use declaration commands of the footer (e.g. \cfoot) inside the document body. If you want to suppress the footer on a page your can do \cfoot{}. Be aware that you have to activate the footer on the next page with \cfoot{\thepage}. You can simplify the process by definition two new commands: \def\nofoot{\cfoot{}} and \def\withfoot{\cfoot{\thepage}}.
• How to use \cfoot{} for page containing large floating table? Feb 6, 2018 at 19:27
\usepackage{fancyhdr}               % Uses the fancyheadr package

As learned from the documentation of fancyhdr package dated January 31, 2019. I hope this helps.