1

I would like to know how to remove the numbering for a specific page. I found several ways to do this, the simplest of which is \thispagestyle{empty} from https://tex.stackexchange.com/a/111570/201720.

Now, this command does indeed hide the number of a given page, however, LaTeX still counts that page. To clarify what I mean, say my document contains 5 pages. What I want to do is to hide the number of page 4 PLUS have LaTeX not counting that page, such that on page 5, the number 4 shows up, not 5.

Put another way, I want the pages to be numbered as:

  • 1
  • 2
  • 3
  • no page number here
  • 4
Aziz
  • 159
  • 3
    Try \addtocounter{page}{-1} – DG' May 25 '20 at 08:33
  • Worked perfectly. Thank you very much! – Aziz May 25 '20 at 08:41
  • Maybe also have a look at the answer at https://tex.stackexchange.com/questions/546044/how-to-change-page-numbers-within-a-latex-document, you could probably define a "switch empty" . Might be that this is also working in case you want a number of pages without number, but you don't know the number of pages. (Note: I didn't test anything, is just a guess) – albert May 25 '20 at 08:47
  • @DG' can you turn your comment into an answer? – Alessandro Cuttin May 25 '20 at 08:54
  • @AlessandroCuttin – done – DG' May 25 '20 at 09:29

2 Answers2

4

You can decrease the page number (in addition to \thispagestyle{empty}) with the following command:

\addtocounter{page}{-1}
DG'
  • 21,727
3

You can automate the process of removing the page on page "four":

enter image description here

\documentclass{article}

\usepackage{lipsum,fancyhdr}

\newcommand{\setpage}{%
  \ifnum\value{page}=4
    \addtocounter{page}{-1}% Reduce page number by 1
    \global\let\setpage\thepage% Update \setpage to be equivalent to \thepage
    % Also, don't print the page number
  \else
    \thepage% Default page number
  \fi
}

\fancypagestyle{skippagefour}{%
  \fancyhf{}% Clear header/footer
  \renewcommand{\headrulewidth}{0pt}% Remove header rule
  \renewcommand{\footrulewidth}{0pt}% Remove footer rule
  \fancyfoot[C]{\setpage}% Centre page footer
}
\pagestyle{skippagefour}

\begin{document}

\sloppy\lipsum[1-50]

\end{document}
Werner
  • 603,163