11

This question is sequel to question

How do I make pages which were "intentionally left blank"?

The accepted solution there

\documentclass[openright]{scrbook}
\newcommand*{\blankpage}{%
\vspace*{\fill}
\centering This page would be intentionally left blank if we would not wish to inform about that.
\vspace{\fill}}
\makeatletter
\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
\blankpage
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
\begin{document}
Text
\chapter{First chapter}
\end{document}

does insert blank page warning, but only \mainmatter. \frontmatter, \appendix and \backmatter do not have blank page warning.

Is there any way to tweak this solution so it would produce blank page warning for the whole document?

13

With scrbook the command to redefine is \cleardoubleoddstandardpage

\documentclass[openright]{scrbook}

\newcommand*{\blankpage}{%
  \par\vspace*{\fill}%
  {\centering This page would be intentionally left blank
   if we would not wish to inform about that.\par}
  \vspace{\fill}%
}
\makeatletter
\renewcommand*{\cleardoubleoddstandardpage}{%
  \clearpage
  \if@twoside
    \ifodd\c@page
    \else
      \blankpage
      \thispagestyle{empty}%
      \newpage
      \if@twocolumn\hbox{}\newpage\fi
    \fi
  \fi
}
\makeatother

\begin{document}

\frontmatter
\tableofcontents

\mainmatter

\chapter{First chapter}

\chapter{Second chapter}

\end{document}
13

You can define a special pagestyle for those pages using the package scrlayer and the KOMA option cleardoublepage=<pagestyle>

\documentclass[open=right]{scrbook}

\newcommand*{\blankpage}{%
  \par\vspace*{\fill}%
  {\centering This page would be intentionally left blank
   if we would not wish to inform about that.\par}
  \vspace{\fill}%
}

\usepackage{scrlayer}
\DeclareNewLayer[
    foreground,
    textarea,
    contents=\blankpage
  ]{blankpage.fg}
\DeclarePageStyleByLayers{blank}{blankpage.fg}
\KOMAoptions{cleardoublepage=blank}

\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{First chapter}
\chapter{Second chapter}
\end{document}

This will also work if a blank page is inserted by a \cleardoubleevenpage command or if you switch to open=left.

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.