6

In the front matter, is there any way to show blank pages without any headings or page numbers?

For example, if I have a preface which just fits in one odd page, I don't want the follwing blank even page to show anything.

I am using the book class.

Thanks.

  • 1
    memoir and KOMA-script classes have a simple interface for that. I think it is the default behaviour for KOMA. – Johannes_B Jan 14 '15 at 15:54
  • 3
    Add \usepackage{afterpage} to your preamble and try with \afterpage{\thispagestyle{empty}}\cleardoublepage. – Werner Jan 14 '15 at 15:59
  • 3
    The titlesec/titleps package has a clearempty option that does exactly that in every empty page. – Bernard Jan 14 '15 at 16:00
  • 1
    Try the emptypage package. – karlkoeller Jan 14 '15 at 16:10
  • @Werner Where should I put the \afterpage{\thispagestyle{empty}}\cleardoublepage command? – baister Jan 14 '15 at 18:54
3

If you want that behavior in the whole document, simply load the package emptypage.

MWE

\documentclass{book}
\usepackage{emptypage}
\usepackage{lipsum}

\begin{document}

\frontmatter
\chapter*{Preface}
\lipsum[1]

\mainmatter
\chapter{1}
\lipsum[1]
\chapter{2}
\lipsum[1]

\backmatter
\chapter*{Conclusions}
\lipsum[1]
\chapter*{At the end}
\lipsum[1]

\end{document} 

If instead, you want that behavior in the frontmatter, but not in the mainmatter, you can do the following.

Using the code from the emptypage package we define two commands, \setempty to print blank empty pages, and \setnonempty to print normal empty pages.

\makeatletter
\def\emptypage@emptypage{%
    \hbox{}%
    \thispagestyle{empty}%
    \newpage%
    \if@twocolumn%
        \hbox{}%
        \newpage%
    \fi%
}
\let\oldcleardoublepage\cleardoublepage
\newcommand{\setempty}{%
  \def\cleardoublepage{%
      \clearpage%
      \if@twoside%
          \ifodd\c@page%
              % do nothing
          \else%
              \emptypage@emptypage%
          \fi%
      \fi%
  }%
}
\newcommand{\setnonempty}{%
  \let\cleardoublepage\oldcleardoublepage%
}
\makeatother

Here is a MWE that shows how it works.

\documentclass{book}
\makeatletter
\def\emptypage@emptypage{%
    \hbox{}%
    \thispagestyle{empty}%
    \newpage%
    \if@twocolumn%
        \hbox{}%
        \newpage%
    \fi%
}
\let\oldcleardoublepage\cleardoublepage
\newcommand{\setempty}{%
  \def\cleardoublepage{%
      \clearpage%
      \if@twoside%
          \ifodd\c@page%
              % do nothing
          \else%
              \emptypage@emptypage%
          \fi%
      \fi%
  }%
}
\newcommand{\setnonempty}{%
  \let\cleardoublepage\oldcleardoublepage%
}
\makeatother
\usepackage{lipsum}

\begin{document}

\frontmatter
\setempty
\chapter*{Preface}
\lipsum[1]

\mainmatter
\setnonempty
\chapter{1}
\lipsum[1]
\chapter{2}
\lipsum[1]

\backmatter
\setempty
\chapter*{Conclusions}
\lipsum[1]
\chapter*{At the end}
\lipsum[1]

\end{document} 
3

You can load the package scrextend. Then it is the default behaviour.

\documentclass{book}
\usepackage{scrextend}
\usepackage{blindtext}
\begin{document}
\frontmatter
\chapter{preface}
\blindtext
\mainmatter
\blinddocument
\end{document}

It is also possible to choose an other style for such pages using the package option cleardoublepage=<pagestyle> or using the macro

\KOMAoptions{cleardoublepage=<pagestyle>}

So you can use plain in the \mainmatter if you want:

\documentclass{book}
\usepackage{scrextend}
\usepackage{blindtext}
\begin{document}
\frontmatter
\chapter{preface}
\blindtext
\mainmatter
\KOMAoptions{cleardoublepage=plain}
\chapter{Start}
\blindtext
\blinddocument
\end{document}
2

I had the same problem and I found this to be the simplest solution:

\usepackage[clearempty]{titlesec}

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.