6

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?

9

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

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.