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!!

  • \newpage \cleardoublepage \null \newpage – user48210 Apr 4 '14 at 16:50
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Apr 4 '14 at 19:12
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.

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.