# How do I make pages which were “intentionally left blank”?

I have a scrbook document with an openright option, i.e. every once in a while a blank left page appears in the document. Not that I really want to do this, but how could I include the infamous "This page has been intentionally left blank" in those blank pages cleanly, i.e. without too many hacks?

Bonus points for including a different famous quote on each blank page instead of the dull default ;)

-
Well this is like the paradox of the liar from Crete... :) –  Count Zero Jun 22 '12 at 13:03
This is an answer only to the extra question about the text that should appear on a blank page (instead of the boring default): :) > This page is intentionally left blank; but this text is printed here, therefore this is not a blank page. > Regards, > Epimenides –  Count Zero Jun 23 '12 at 7:30
To avoid the paradox, use "This page is intentionally printed only with this statement." –  Please don't touch Jun 27 '12 at 18:22
I am using "This page is filler so that important sections start on the right hand side of the book." –  Eponymous May 13 at 16:14

You could redefine \cleardoublepage. Here's an example:

\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}


\blankpage just prints what you like, both vertically and horizontally centered.

-
I guess the downside of this is that if \cleardoublepage changes at upgrade time, evil things could happen. Oh well, this is TeX, I don't expect much in terms of inheritance ;) –  Nikolai Prokoschenko Aug 15 '10 at 1:46
KOMA-Script and so scrbook define 14 such commands, from \clearpage to \cleardoubleevenstandardpage, so it could be further customized. ;) –  Stefan Kottwitz Aug 15 '10 at 1:51

memoir has \cleartooddpage (and \cleartoevenpage) which do just this. Paraphrased from the manual:

A likely example for the optional argument is

\cleartooddpage[\vspace*{\fill}
THIS
PAGE ACCIDENTALLY PRINTED
ON
\vspace*{\fill}]


which will put ‘THIS PAGE ACCIDENTALLY PRINTED ON’ in the centre of any potential skipped (empty) even numbered page.

-

I haven't seen an answer that handles correct centering in both horizontal and vertical direction. For analysis the answer of Stefan Kottwitz is taken:

% Set parameters for analyzing/debugging
\showboxdepth=\maxdimen
\tracingonline=1

\documentclass[openright]{scrbook}
\newcommand*{\blankpage}{%
\vspace*{\fill}
\centering
This page would be intentionally left blank if we would not wish
\vspace{\fill}%

\showlists
}
\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}


\showlists stops the TeX run and displays the current vertical list. This is written into the .log file and, if \tracingonline is set to a positive number, it is also printed on the terminal.

Excerpt from the .log file:

### vertical mode entered at line 0
### current page:
\write-{}
\glue(\topskip) 11.0
\rule(0.0+0.0)x*
\penalty 10000
\glue 0.0 plus 1.0fill
\glue 0.0
\glue(\parskip) 0.0 plus 1.0
\glue(\baselineskip) 5.99585
\hbox(7.60416+2.12917)x418.25555, glue set - 0.1209
.\glue(\leftskip) 0.0 plus 1.0fil
.\hbox(0.0+0.0)x0.0
.\OT1/cmr/m/n/10.95 T
.\OT1/cmr/m/n/10.95 h
.\OT1/cmr/m/n/10.95 i
.\OT1/cmr/m/n/10.95 s
.\glue 3.65 plus 1.825 minus 1.21666
.\OT1/cmr/m/n/10.95 p
.\OT1/cmr/m/n/10.95 a
.\OT1/cmr/m/n/10.95 g
.\OT1/cmr/m/n/10.95 e
...
.\OT1/cmr/m/n/10.95 t
.\OT1/cmr/m/n/10.95 h
.\OT1/cmr/m/n/10.95 a
.\OT1/cmr/m/n/10.95 t
.\OT1/cmr/m/n/10.95 .
.\glue 4.86665 plus 5.47499 minus 0.40555
.\penalty 10000
.\glue(\parfillskip) 0.0
.\glue(\rightskip) 0.0 plus 1.0fil
\glue 0.0 plus 1.0fill
\glue 0.0
total height 26.72917 plus 1.0 plus 2.0fill
goal height 595.80026
prevdepth 2.12917, prevgraf 1 line

! OK.


## Horizontal centering

The \hbox with the text starts with:

\hbox(7.60416+2.12917)x418.25555, glue set - 0.1209
.\glue(\leftskip) 0.0 plus 1.0fil
.\hbox(0.0+0.0)x0.0
.\OT1/cmr/m/n/10.95 T


That means the left space is 0pt plus 1fil. \leftskip is set by \centering and the stretch componentplus 1.0fil is needed for centering.

The box ends with:

.\OT1/cmr/m/n/10.95 t
.\OT1/cmr/m/n/10.95 .
.\glue 4.86665 plus 5.47499 minus 0.40555
.\penalty 10000
.\glue(\parfillskip) 0.0
.\glue(\rightskip) 0.0 plus 1.0fil


Again the stretch component plus 1.0fil of \rightskip comes from \centering and is needed for centering. But there is a glue after the final dot:

.\glue 4.86665 plus 5.47499 minus 0.40555


That means there is extra white space at the end of the line. It comes from the space after the final dot before \vspace:

... that.
\vspace{\fill}


The paragraph has not yet ended, when \vspace is called. Therefore the space is not added directly, but via \vadjust. The following paragraph end usually removes the latest whitespace, thus that the latest line or white space before an emtpy line or \par does not need to be removed. However, the space before \vadjust is not seen by the paragraph end and appears in the output. This can be fixed by explicitely ending the paragraph:

... that.\par
\vspace{\fill}


## Vertical centering

The bottom end looks fine:

\glue 0.0 plus 1.0fill
\glue 0.0


Just the fill component is present. But at the upper part we can find some additional contributions to the vertical space:

\glue(\topskip) 11.0
\rule(0.0+0.0)x*
\penalty 10000
\glue 0.0 plus 1.0fill
\glue 0.0
\glue(\parskip) 0.0 plus 1.0
\glue(\baselineskip) 5.99585

1. Full \topskip is inserted at the top of a page because of the following invisible rule, added by the star form \vspace*. Setting it to 0pt locally fixes this.

2. When a new paragraph starts \parskip is added that might have larger values than shown here. Because we have just one paragraph here, setting it to zero is the easiest way.

3. The value for \baselineskip comes from the line breaking algorithm. The value is calculated from the setting of \baselineskip (13.6pt) minus the height of the line (7.6pt). This can be suppressed by \nointerlineskip.


New definition of \blankpage:

\newcommand*{\blankpage}{%
\begingroup
\setlength{\topskip}{0pt}%
\setlength{\parskip}{0pt}%
\vspace*{\fill}%
\centering
\nointerlineskip % suppresses partial \baselineskip above text
This page would be intentionally left blank if we would not wish
\vspace{\fill}%
\endgroup
% \showlists
}


Excerpt from the .log file with \showlists for new \blankpage:

### vertical mode entered at line 0
### current page:
\write-{}
\glue(\topskip) 0.0
\rule(0.0+0.0)x*
\penalty 10000
\glue 0.0 plus 1.0fill
\glue 0.0
\glue(\parskip) 0.0
\hbox(7.60416+2.12917)x418.25555, glue set 1.30571fil
.\glue(\leftskip) 0.0 plus 1.0fil
.\hbox(0.0+0.0)x0.0
.\OT1/cmr/m/n/10.95 T
.\OT1/cmr/m/n/10.95 h
.\OT1/cmr/m/n/10.95 i
.\OT1/cmr/m/n/10.95 s
.\glue 3.65 plus 1.825 minus 1.21666
.\OT1/cmr/m/n/10.95 p
.\OT1/cmr/m/n/10.95 a
.\OT1/cmr/m/n/10.95 g
.\OT1/cmr/m/n/10.95 e
...
.\OT1/cmr/m/n/10.95 t
.\OT1/cmr/m/n/10.95 h
.\OT1/cmr/m/n/10.95 a
.\OT1/cmr/m/n/10.95 t
.\OT1/cmr/m/n/10.95 .
.\penalty 10000
.\glue(\parfillskip) 0.0
.\glue(\rightskip) 0.0 plus 1.0fil
total height 7.60416 plus 1.0fill
goal height 595.80026
### recent contributions:
\glue 0.0 plus 1.0fill
\glue 0.0
prevdepth 2.12917, prevgraf 1 line

! OK.


## Support of twocolumn

With a small modification \blankpage will also work with twocolumn, when the text is put in the left column, but should be centered in the whole text area:

\newcommand*{\blankpage}{%
\begingroup
\setlength{\topskip}{0pt}%
\vspace*{\fill}%
\nointerlineskip % suppresses partial \baselineskip above text
\hbox to \linewidth{%
\hbox to \textwidth{%
\hfill
This page would be intentionally left blank if we would not wish