# A cleardoublepage variant to always insert an empty left page (KOMA)

In KOMA Script we can find commands to modify the way empty pages are inserted, so that, e.g., chapters will always start on the right page.

The different commands can be found in scrguide.pdf in section 3.13.

Many might know

\cleardoublepage


which ends the current section/chapter and inserts an empty left page if needed. No extra page is inserted if the chapter ends on a left page. There are situations however, in which I want the new chapter to start on the right, with an empty left page. I found the following combination of commands to do the job:

\cleardoubleevenpage
\cleardoubleoddpage


Is there a better way to do that? I am basically looking for a command that

• finishes the current section/chapter, and
• inserts an empty page if on the right page, or
• inserts two empty pages if on the left page.
• Welcome to TeX.SX! No, basically the cleardoublepage-commands are what you want. But what would you understand as "better way"? Apr 19 '18 at 5:16
• My solution does the job but it seemed like misuse of the two commands. I guess I was more curious if I overlooked a single command dedicated to that functionality... Apr 19 '18 at 11:15
• AFAIK KOMA-Script does not provide such a single command. But you can define a new command which uses the combination of the two macros.
– esdd
Apr 19 '18 at 19:36
• Okay thanks guys. Maybe this thread will at least help others willing to achieve the same result. Apr 19 '18 at 20:32

Although a combination of \cleardoubleevenpage and \cleardoubleoddpage does what you want, here is another way to achieve this.

It uses the notespages package and its command \nppatchchapter. This redefines \chapter so it works as if you write

\notespages[minoneempty]
\chapter...


With \npunpatchchapter the original definition of \chapter can be restored, and you may get no empty pages again.

With \nppatchchapter{...} and \npunpatchchapter you can switch this on and off several times in the document. The commands work from the next \chapter after these commands on.

If you want to have the minimum of one empty page only for a few chapters, instaed of using \nppatchchapter you can use \notepages directly before \chapter (as shown above).

Example code:

\documentclass[a4paper]{scrbook}
\usepackage{notespages}
\usepackage{lipsum}

% define a new option as abbreviation for the necessary option
\definenotesoption{minoneempty}{empty,multiple=2,minpages=1}
% for all chapters (would produce at least one empty page
% before first chapter in this example)
%\nppatchchapter{minoneempty}

\begin{document}
\chapter{A Chapter}
\section{A Section}
\lipsum[1-4]

\section{Another Section}
\lipsum[5-7]

% put command here to start later
\nppatchchapter{minoneempty}
\chapter{Another Chapter}
\section{A Section}
\lipsum[1-4]

\chapter{A third Chapter}
\section{A Section}
\lipsum[1-4]

\section{Another Section}
\lipsum[5-7]

\appendix
\chapter{First Appendix}
\lipsum

% disable it
\npunpatchchapter
\chapter{Second Appendix}
\lipsum
\end{document}


The result: