8

I want to create a blank page. I looked up on the web and I tried the code:

\newcommand\blankpage{% comando pagina vuota
    \newpage
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage
}

but it doesn't work. I have also tried this:

\newcommand*\NewPage{\newpage\null\thispagestyle{empty}\newpage}

I am writing in the article mode. Should I use a package?

Matt
  • 267
  • what do you mean by doesn't work? the \blankpage command you defined will force a blank page without increasing the page counter – David Carlisle Sep 23 '16 at 20:25
  • @Werner Why is it that inserting a blank page such an intricate process in LaTeX ? This is a silly thing in GUI systems. I thought \newpage \pagestyle{empty} \clearpage should do the job until I hit the roadblock and came searching here!! – vrgovinda Dec 10 '23 at 15:22
  • @vrgovinda: (La)TeX is not a GUI system; those tend to perform a lot of background legwork automatically, together with assumptions about what the user wants (to see). This is commonly referred to as WYSIWYG, which (La)TeX is not. – Werner Dec 10 '23 at 17:35
  • @Werner: I am a proud (Xe)LaTeX user for the last 10 years [created my dissertation thesis, teaching assignments and 3 books using (Xe)LaTeX. But for me creating a blank page was akin to creating a new line. This should have a much simpler way. That's what I wanted to convey. – vrgovinda Dec 11 '23 at 21:40

1 Answers1

11

A blank page without header, footer or page number and without increasing the page number:

\shipout\null

The page number can be increased by one via:

\stepcounter{page}

The macro of the question has a flaw in twocolumn mode, because \newpage does not end a page, but the current column. \clearpage is the better choice. It also prevents that floating objects are going to the page:

\newcommand\blankpage{% comando pagina vuota
    \clearpage
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \clearpage
}

If package hyperref is used, then the previous page and the empty page share the same page number in violation of unique page anchors. The page anchor can be turned off for the empty page:

\newcommand\blankpage{% comando pagina vuota
    \clearpage
    \begingroup
      \null
      \thispagestyle{empty}%
      \addtocounter{page}{-1}%
      \hypersetup{pageanchor=false}%
      \clearpage
    \endgroup
}
Heiko Oberdiek
  • 271,626
  • 1
    I think that the suggestion of using \shipout\null, although correct in principle, could be confusing to inexperienced users: due to TeX’s asynchronous output mechanism, in practice you need to say something like \clearpage\shipout\null. – GuM Sep 23 '16 at 20:55
  • 1
    @GustavoMezzetti Maybe, or \usepackage{afterpage}...\afterpage{\shipout\null}. Unhappily, the question does not describe the context and purpose of the empty page. – Heiko Oberdiek Sep 23 '16 at 20:57
  • If I want the blank page to not increase the number of total pages detected by zref using \ztotpages, should I remove the second \clearpage before \endgroup? – Diaa Feb 29 '20 at 22:40