1

How do I suppress formatting on a \cleardoublepage?

\documentclass[a5paper,10pt, twoside]{book}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[RO]{The College Savings Factor}  %title of the book
\fancyhead[LE]{\chaptername \ \thechapter}
%\fancyfoot{} % clear all footer fields
%\fancyfoot[LC,RC]{\thepage}
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.0pt}    % 0.0 makes line dissapear
%\fancyfoot[LE, RO]{\thepage}   
\usepackage{nextpage}

\begin{document}
Chapter 1
text
\cleardoublepage
Chapter 2
text
\end{document}

The header formating and page numbers surface on those chapters where the extra page is constructed to push the beginning of the chapter to the odd number page. How can I suppress the formatting and keep the page blank?
I have tried \thispagestyle{empty} with no success. My final solution will be to finish the book, and manually insert the blank page via \afterpage{\null \thispagestyle{empty} \newpage } where it is necessary.

  • I'm sure, I'm missing something very obvious here, but why don't you just use \chapter{Chapter 1} text \chapter{Chapter 2} text? – moewe Sep 16 '15 at 15:23
  • I use \include{./chapters/chapter0x} to bring in each chapter from other files, but I want the beginning of each chapter to be on right hand side (odd numbered) pages. That sometimes means that the opposing page should be blank if the previous chapter ends on on an odd numbered page. hence the use of \cleardoublepage. was trying to be succinct but I guess it was more confusing. – Serge Garcia Sep 16 '15 at 15:24
2

Use emptypage package.

\documentclass[a5paper,10pt, twoside]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[RO]{The College Savings Factor}  %title of the book
\fancyhead[LE]{\chaptername \ \thechapter}
%\fancyfoot{} % clear all footer fields
%\fancyfoot[LC,RC]{\thepage}
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.0pt}    % 0.0 makes line dissapear
%\fancyfoot[LE, RO]{\thepage}
\usepackage{nextpage}

\usepackage{emptypage}   %%<--- add this line

\begin{document}
Chapter 1
text
\cleardoublepage
Chapter 2
text
\end{document}
|improve this answer|||||
1

Two responses, here.

Since nextpage.sty is already loaded, one could just use that multi-feature package. In the following, the original “add this line” line is commented and the nextpage.sty \cleartooddpage command is added, as indicated.

\documentclass[a5paper,10pt, twoside]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\fancyhead[RO]{The College Savings Factor}  %title of the book
\fancyhead[LE]{\chaptername \ \thechapter}
%\fancyfoot{} % clear all footer fields
%\fancyfoot[LC,RC]{\thepage}
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.0pt}    % 0.0 makes line dissapear
\fancyfoot[LE, RO]{\thepage}
\usepackage{nextpage}

%%%\usepackage{emptypage}   %%<--- add this line

\begin{document}
Chapter 1
text
%%%\cleardoublepage
\cleartooddpage[\thispagestyle{empty}]  %%% <-- this line added
Chapter 2
text
\end{document}

Since what’s addressed in both the MWE and the original (2015) Answer are simulated chapters, and since actual chapters have unique features to handle sometimes, an example of actual chapters using nextpage.sty with the book class is also included. Some designs call for “no formatting,” as is the case with the OP. Some designs call for “page number only;” some, “This page intentionally blank,” with or without page numbering. nextpage handles all of these options, as illustrated in the following. Various options are retained as comments that illustrate further customization options.

\documentclass[a5paper,10pt, twoside]{book}
\usepackage{tocloft}

%https://tex.stackexchange.com/questions/142871/how-to-customize-a-brief-table-of-contents-generated-from-tocloft-and-shorttoc-i
%https://tex.stackexchange.com/a/250822/170846
\setlength\cftbeforetoctitleskip{0pt} % change space before TOC title
\setlength\cftaftertoctitleskip{20pt}  % change space after  TOC title

\usepackage[latin,english]{babel}
\usepackage{csquotes} % smart quotes

\usepackage{fancyhdr}
\pagestyle{fancy}

\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}

\newcommand{\resetHRule}[1]{\renewcommand\headrulewidth{#1}}

\newcommand{\setHdrFtr}[0]{%
    \fancyhf{}%
    \fancyhead[RO]{The College Savings Factor}%
    \fancyhead[LE]{\leftmark}%
    \renewcommand\footrulewidth{0.2pt}
    \fancyfoot[LE, RO]{\thepage}%
    }

\fancypagestyle{plain}{%
    \fancyhf{}
    \renewcommand\headrulewidth{0pt}
    \fancyfoot[LE, RO]{\thepage}
    \renewcommand\footrulewidth{0pt}
    }

\newcommand{\clrHdr}[0]{
    \thispagestyle{plain}
}

\usepackage{nextpage}

%%% minor modification to nextpage for even-to-even clearing
\makeatletter
\renewcommand{\cleartoevenpage}[2]{%
    \ifodd\c@page\clearpage%
    \else\newpage\thispagestyle{#2}\hbox{}#1
    \newpage\hbox{}
    \fi}
\makeatother

\usepackage[texcoord]{eso-pic}
\usepackage{graphicx}
\usepackage{url}
\usepackage{lipsum}
\usepackage[pagebackref=true]{hyperref}

\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=blue,      
    urlcolor=blue,
}

\setcounter{tocdepth}{1} % -1, 0, 1    

\begin{document}
\clrHdr
\renewcommand{\contentsname}{Contents}
\phantomsection
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents

% odd to odd -- blank
\cleartooddpage[\thispagestyle{empty}]%  <--- square

% odd to odd -- blank (w/ pg no.)
%\cleartooddpage[\thispagestyle{plain}]

\phantomsection
\addcontentsline{toc}{chapter}{Chapter 1}
\chapter*{Chapter 1}
\chaptermark{Chapter 1}
\setHdrFtr

\lipsum[44-48]

% odd to odd -- skipped pg filled (no page number)
\cleartooddpage[{\vspace*{\fill}\begin{center}THIS PAGE LEFT BLANK\end{center}\vspace*{\fill}}\thispagestyle{empty}]

% odd to odd -- skipped pg filled (with page number)
%\cleartooddpage[{\vspace*{\fill}\begin{center}THIS PAGE LEFT BLANK\end{center}\vspace*{\fill}}\thispagestyle{plain}]

% odd to odd -- just page number
%\cleartooddpage[\thispagestyle{plain}]

\phantomsection
\addcontentsline{toc}{chapter}{Chapter 2}
\chapter*{Chapter 2}
\chaptermark{Chapter 2}

\lipsum[49-51]

% even to odd -- blank    and
% even to odd -- filled 
% are the same -- there is no blank page to handle
\cleartooddpage[{\vspace*{\fill}\begin{center}THIS PAGE LEFT BLANK\end{center}\vspace*{\fill}}\thispagestyle{plain}]

\phantomsection
\addcontentsline{toc}{chapter}{Chapter 3}
\chapter*{Chapter 3}
\chaptermark{Chapter 3}

\lipsum[52]

% odd to even -- blank    and
% odd to even -- filled 
% are the same -- there is no blank page to handle
\cleartoevenpage{some text that won't ever show up}{plain}

\phantomsection
\addcontentsline{toc}{chapter}{A plain PreChap page}
% for no page number
%\thispagestyle{empty}
% for page number
\thispagestyle{plain}
This is the recto page that was advanced/cleared to.  Typically, there'll be pre-chapter text or graphics on this page.

\clearpage

\phantomsection
\addcontentsline{toc}{chapter}{Chapter 4}
\chapter*{Chapter 4}
\chaptermark{Chapter 4}

\lipsum[53-56]

% even to even -- blank (w/ pg no)
\cleartoevenpage{}{plain}

% even to even -- blank (w/o pg no)
%\cleartoevenpage{}{empty}

\phantomsection
\addcontentsline{toc}{chapter}{PreChap Graphics with preceding blank page with page no}
\thispagestyle{plain}

%adapted from https://tex.stackexchange.com/a/248829/170846
\begin{minipage}[c]{\textwidth}
    \href{https://ctan.org/lion/files/ctan_lion_350x350.png}{\includegraphics[scale=0.75]{ctan_lion_350x350.png}{}}\\
\end{minipage}

\clearpage

\phantomsection
\addcontentsline{toc}{chapter}{Chapter 5}
\chapter*{Chapter 5}
\chaptermark{Chapter 5}

\lipsum[57-60]

% even to even -- skipped pg filled (w/ page no)
\cleartoevenpage{\vspace*{\fill}\begin{center}THIS PAGE LEFT BLANK\end{center}\vspace*{\fill}}{plain}

% even to even -- skipped pg filled (no page number)
%\cleartoevenpage{\vspace*{\fill}\begin{center}THIS PAGE LEFT BLANK\end{center}\vspace*{\fill}}{empty}

% even to even -- skipped pg w/ page number only
%\cleartoevenpage{}{plain}

\phantomsection
\addcontentsline{toc}{chapter}{The \enquote{cleared-to} verso page, ready for pre-Chap content, with preceding Notice of deliberate blankness}
\thispagestyle{plain}

% or, for no page no.
%\thispagestyle{empty}

Here is a famous quote by a famous author.

{\textit{Famous Author}}

\clearpage

\phantomsection
\addcontentsline{toc}{chapter}{Chapter 6}
\chapter*{Chapter 6}
\chaptermark{Chapter 6}

\lipsum[70-73]

\end{document}
|improve this answer|||||
  • It is not necessary to add the current date in the body of your answer, it will automatically shown beneath the post. – samcarter_is_at_topanswers.xyz Dec 12 '18 at 10:17

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.