1

Answers for How to have a blank even page before every chapter didn't work in my case

If the default book class is loaded with the twoside and openright options, a new chapter starts from the first free odd page. These are possible scenarios:

If chapter 1 ends in a odd page (OK, page 4 is empty):

Page        1:                   | BeginOfChapter1 |
Pages 2 and 3: | BodyOfChapter1  | EndOfChapter1   |
Pages 4 and 5: |                 | BeginOfChapter2 |

If chapter 1 ends in an even page (there is no empty page between the chapters):

Page        1:                   | BeginOfChapter1 |
Pages 2 and 3: | EndOfChapter1   | StartOfChapter2 |

How can I automatically insert an empty page if the previous chapter ends on a even page (or make chapter check if there already is one), in order to get the result below?

I would like this behaviour for both \part and \chapter.

The is what the previous scenario would look like like (two empty pages have been added):

Page        1:                   | BeginOfChapter1 |
Pages 2 and 3: | EndOfChapter1   |                 |
Pages 4 and 5: |                 | StartOfChapter2 |

MWE:

\documentclass[a4paper,12pt]{book}
\usepackage{kantlipsum}
\usepackage{emptypage}

\begin{document}

\chapter{First} \kant[1-4]

\chapter{Second} \kant[1-2]

\chapter{Third} \kant[1-2]

\end{document}

MWE output:

enter image description here

Desired output:

enter image description here

Polizi8
  • 311
  • 1
  • 13
  • @DavidCarlisle It kinda works, but it creates two white pages before the first chapter. In a far more complex template (where I am using titlesec, it creates unwanted results, both if I use \cleartoevenpage or \cleartooddpage in \titleformat "format" argument – Polizi8 Mar 31 '21 at 18:15
  • Oh ok, I have updated my answer. However, I would like to keep chapters on odd pages, in my example Chapter 2 should shift from page 3 to 5, and Chapter 3 from page 5 to 7. Using \cleartooddpage outputs almost the same of my first example, except that the emptypage package has no effect – Polizi8 Mar 31 '21 at 22:28
  • Please clarify:

    "How can I automatically insert an empty page if the previous chapter ends on a even page" means "How can I automatically insert an empty physical page if the previous chapter ends on a even page" (two blank pages)

    – Simon Dispa Mar 31 '21 at 22:48
  • Your last edit suggests that a \chapter can start on an even page. Is that correct? – Werner Mar 31 '21 at 23:29
  • I will delete my comments i misunderstood your question (@SimonDispa also my comment on your answer) I still think the question is very hard to understand your ascii art do not seem to correspond to your description – David Carlisle Mar 31 '21 at 23:30
  • @DavidCarlisle sorry if I expressed myself badly, hopefully the new picture of the desired output will make things clearer – Polizi8 Mar 31 '21 at 23:42
  • the image is too fuzzy to see the page numbers but do I assume that all the right hand pages are odd numbers so you want chapter openings on odd pages? (if so my earlier comments were definitely wrong) – David Carlisle Mar 31 '21 at 23:46
  • Exactly, like normal books. I think my document would look better with 1/2 empty pages between each chapter, that should open on odd pages. I have updated the ascii art with proper page numbering – Polizi8 Mar 31 '21 at 23:57

3 Answers3

2

Use the emptypage package.

% emptypageprob.tex  SE 590831
\documentclass[twoside]{book}
\usepackage{emptypage}
\usepackage{lipsum}

\begin{document} \chapter{First} \lipsum \chapter{Second} \lipsum[1] \chapter{Third} \lipsum[1] \chapter{Fourth} \lipsum \end{document}

Peter Wilson
  • 28,066
  • Alone it is not enough: I am already using it to white out numbers in empty pages, but it doesn't add an empty page between chapter 1 and 2, both in your MWE and in mine – Polizi8 Mar 31 '21 at 18:18
2

You can try the following book-modified \chapter command. It looks at the value of the page and accordingly inserts the appropriate number of \clearpages (with an empty page style). It only does this for chapter 2 onward (to avoid issues with \part), but that can be changed.

enter image description here

\documentclass[twoside]{book}

\usepackage{kantlipsum}

\makeatletter % Taken from % https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/base/book.cls?view=co % and modified \renewcommand\chapter{% \if@openright %\cleardoublepage \ifnum\value{chapter}=0 \cleardoublepage \else% \value{chapter}>0 \clearpage \ifodd\value{page} \thispagestyle{empty}% Odd page blank \mbox{}\clearpage \thispagestyle{empty}% Even page blank \mbox{}\clearpage \else% \value{page} is even \thispagestyle{empty}% Even page blank \mbox{}\clearpage \fi \fi \else \clearpage \fi \thispagestyle{plain}% \global@topnum\z@ @afterindentfalse \secdef@chapter@schapter} \makeatother

\begin{document}

\chapter{First} \kant[1-4]

\chapter{Second} \kant[1-2]

\chapter{Third} \kant[1-2]

\end{document}

Werner
  • 603,163
1

This is a simple correction to be considered (i.e. if the book has less than two dozen chapters), and applied as one of the final touches, when all the material of the book is completed, after each chapter that finish on a even page.

It does not affect \part or other packages.

x

\documentclass[12pt,a4paper,twoside,openright]{book}

\usepackage{kantlipsum} \usepackage{emptypage} % cleans blank pages headings

\begin{document}

\tableofcontents

\chapter{One}

  1. \kant[1-4] % ends on even page #4

\newpage\hbox{}\thispagestyle{empty} % adds one blank odd page #5 <<<<<<<<<<<<<<

\chapter{Two} % adds blank even page #6 with heading suppresed by emptypage 2. \kant[2]

\chapter{Three}% adds blank even page #8 with heading suppresed by emptypage 11. \kant[11]

\end{document}

Simon Dispa
  • 39,141
  • @David Carlisle I understood that the OP wanted all chapters to start on odd pages as usual plus add a blank physical page (two blank logical pages) only if the previous chapter ended on a even page. In a open physical book the opposite page of a chapter page will be always blank. – Simon Dispa Mar 31 '21 at 22:40
  • seems like you understood the question better than me:-) I deleted earlier comment. – David Carlisle Mar 31 '21 at 23:46