9

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?

4
  • 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

2 Answers 2

4

The standard page style doesn't allow disappearing only the footer. However I can imagine two possibilities.

  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}}.
1
  • 1
    How to use \cfoot{} for page containing large floating table? Feb 6, 2018 at 19:27
1
\usepackage{fancyhdr}               % Uses the fancyheadr package
\fancyhf[L]{\underline{MYCONTENT}}  % Above justifies Left in header and footer "MYCONTENT".
\fancyfoot[C]{}                     % Removes the page number from Center of the footer.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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