2

I am trying to insert a blank page in a article class document, and I want it to have the same headers and footers as the rest of the document (which I have already set up using fancyhdr). However, when I insert the blank page, both its header and its footer change to what I assume is the default for this type of document (page number on the top left, section name on the top right, and nothing on the bottom), whereas the rest of the document has my customized headings (constant text on the top left and right and page number at the bottom).

I have this code on the preamble:

\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{this is left}
\rhead{this is right}

And I am inserting the blank page using \newpage, as follows:

\newpage\null\thispagestyle{myheadings}\newpage

Thanks!!

FGS
  • 21

1 Answers1

1

So, you should actually be specifying the pagestyle as fancy if you want to retain the same header and footer as the rest of the document. By assigning it to be \thispagestyle{myheadings}, you have inadvertantly made it different than you desire.

This example code should do what you are asking for, making all three pages have the same header specified:

\documentclass[]{article}

\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{this is left}
\rhead{this is right}

\begin{document}

Page 1

\newpage\null\newpage

Page 3

\end{document}

Note: You may want to consider whether you should use \clearpage instead of \newpage. See this answer for a good explanation of the difference.

cslstr
  • 6,545