12

I've started to use Latex to create a book. I feel like I've gotten the basics down, but I am still very much at the beginning of my learning curve. Google has been a great resource, but I have not been able to find the answer to this question.

I would like my chapter to always begin on an odd page, and I would like the even page just before it to be totally blank. No headers on either of these two pages. This seems to be a common format in most books I've looked at.

I am using fancy headers.

So far the best resource I've found is this:

http://www.markschenk.com/tensegrity/latexexplanation.html

The author suggests the following.

% Code for creating empty pages
% No headers on empty pages before new chapter
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
    \hbox{}
    \thispagestyle{plain}
    \newpage
    \if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother \clearpage{\pagestyle{plain}\cleardoublepage}

This works just fine if the previous chapter ends on an odd page, it inserts a blank just like I want. But if the previous chapter ends on an even page, then it simply begins the chapter on the next page(which is odd).

I've tried making a few changes to the above, with limited success. It feels like I am doing a hack to do something that should be fairly easy. But perhaps this is necessary.

Any suggestions?

3
  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Sep 21, 2012 at 23:10
  • Looking at the update to Charlie Martin's answer, I was wrong to suggest that this question is a duplicate.
    – lockstep
    Sep 22, 2012 at 12:28
  • Nit-pick: Your question could be read as if you always want a blank page before a new chapter that starts on an odd page. That could imply that, if the previous chapter ended on an even page, you still want a blank page, requiring yet another blank page on the previous odd page. I don't think that's what you really want, but it's not crystal clear. Nov 17, 2019 at 16:12

7 Answers 7

19

Memoir has \cleartorecto and \cleartoverso to insert clear pages until the next recto (or verso) page. It also has the \clearforchapter macro to specify how you want chapters to start.

So I think what you want is provided by Memoir with

\renewcommand{\clearforchapter}{\clearpage~\thispagestyle{cleared}\cleartorecto}
1
  • 1
    In my case, this command works for the second and later chapters after \mainmatter, but after \mainmatter it can create 3 empty pages (the one created by \mainmatter to ensure the next page is odd, plus two created by this command). So I needed a particuliar case for the first chapter: \newpage ~\thispagestyle{cleared}\mainmatter. Then I write my first chapter, and then I use your command for the subsequent chapters. Not really elegant, but can't find a better approach.
    – tobiasBora
    Mar 14, 2022 at 8:25
7
\clearpage\null\thispagestyle{empty}

The \clearpage command flushes all floats that have appeared in the input, causing them to be printed, and begins a new page. The \null command inserts something (in this case, actually nothing) on that new page, so that subsequent calls of \clearpage will not be ignored. The '\thispagestyle{empty}` command suppresses headers and footers on your new page. If, assuming the book documentclass, you subsequently begin a new chapter, like so:

\chapter{My Chapter}

Then that will begin on the next right-page. The effect is that there will always be at least an empty left-page, and possibly an additional empty right-page before that.

2
  • Hello! Please, how do you know that you are not adding an odd page? Could you please show a minimal document that performs the solution?
    – yo'
    Sep 7, 2015 at 12:58
  • Sorry, did not see that I had comments. In general, it may well be that you add an odd page, but in that case the \chapter command will still begin on the next odd page, leaving an additional even page blank.
    – gaston
    Feb 5, 2016 at 10:51
6

I am not sure if this is the most elegant way in the world to accomplish this. But it seems to work great for my book. I used the above code, but then added this in front of each \chapter.

\checkoddpage\ifoddpage\else\newpage\mbox{}\fi

It works great, if I open my book to the start of any chapter, the chapter starts on an odd page, and there is a blank even page just before.

Still curious if there is a more elegant way to do this. Most books (but not all) I've seen do it this way, so I am sure there is a better way.

2

Redefining \clearpage is also work. Page 6 of this MWE is completely blank.

\documentclass[12pt,a4paper]{book}
\usepackage{blindtext}
\usepackage{fancyhdr}
\pagestyle{fancy}
\makeatletter
\def\clearpage{\ifvmode\ifnum\@dbltopnum=\m@ne\ifdim\pagetotal<\topskip\hbox{}\fi\fi\fi\newpage\write\m@ne{}\vbox{}\penalty-\@Mi\thispagestyle{empty}}
\makeatother
\begin{document}
    \blinddocument
    \blindtext
    \blinddocument
\end{document}
1

There's actually a teX/LaTeX SO that might be quicker. But in this case, you can get the effect you want, I believe, with fancyheaders.

Update

But wait a minute. In the situation you describe, where the the text ends on the verso page (the technical term for the even-numbered left-hand page side) if you want a blank verso page, you' will need a blank recto page as well. In other words, you're saying that if the text of a chapter ends partway down a verso page, you want to black pages, one recto and one verso, before your next chapter begins on the next recto page.

Are you sure thats what you mean?

1
  • 1
    Correct, I want a chapter to always begin with an even blank page and the chapter begin on the first odd page. That way you are looking at nothing but material from that chapter.
    – JeffHeaton
    Jun 8, 2011 at 10:49
0
\newpage
\thispagestyle{empty}
\hbox{}

If you put this before the code you posted, you make sure to create at least one empty page. Then, with the code you have, if the chapter starts in an odd page... it's done! And if not... your code adds one more... and you have the two pages you needed!

0
0

It will be added automatically if you specify the twoside option to the document class.

\documentclass[a4paper,twoside]{report}

You must log in to answer this question.