# Prevent cleardoublepage in scrbook between chapters

For a new term paper i want to try out a template of our university which is based on scrbook. However, my first chapter is to short (1/2 page) that the second chapter follows after a \cleardoublepage (it looks like this) but that is not what i want it to do. I would appreciate if is just puts the second chapter right after the first one. Any idea how i can achieve this?

-
Are you using a \cleardoublepage or is it a result of using the university template? In the second case it would seem this is desired behaviour, so you would have to stick with it? – Carsten Thiel Jul 12 '11 at 9:12
It comes from the template, however this is a template for a Bachelor Thesis which i want to use for a longer term paper of mine. Therefore i am not bound to the "rules" in the template. – Christian Ivicevic Jul 12 '11 at 9:15

make \cleardoublepage temporarely to \relax

\documentclass{scrbook}
\def\SpecialChap#1{{\let\cleardoublepage\relax\chapter{#1}}}
\begin{document}
\tableofcontents
\chapter{foo}
\SpecialChap{bar}% no \cleardoublepage
\chapter{baz}

\end{document}


If you want it also for starred chapters, then use:

\documentclass{scrbook}
\makeatletter
\def\SpecialChap{\@ifnextchar*\SpecialChap@i\SpecialChap@ii}
\def\SpecialChap@i*#1{{\let\cleardoublepage\relax\chapter*{#1}}}
\def\SpecialChap@ii{\@ifnextchar[\SpecialChap@iii\SpecialChap@iv}
\def\SpecialChap@iii[#1]#2{{\let\cleardoublepage\relax\chapter[#1]{#2}}}
\def\SpecialChap@iv#1{{\let\cleardoublepage\relax\chapter{#1}}}
\makeatletter
\begin{document}
\tableofcontents
\chapter{foo}
\SpecialChap{bar}% no \cleardoublepage
\chapter{baz}
\SpecialChap*{foobar}% no \cleardoublepage

\end{document}


It now also allows \SpecialChap[foo]{bar}

-
It works! However i've read that i might get problems with headers which might disappear? Any idea whether this can happen? – Christian Ivicevic Jul 12 '11 at 9:13
why should they disappear? – Herbert Jul 12 '11 at 9:24
I don't know but people complained about such a behaviour, but i will ask how to fix the problem if it really happens. For now i am satisfied :D Thanks! – Christian Ivicevic Jul 12 '11 at 9:34
Would be interesting to know how this could be change to support the starred version as well \chapter*{Title}. Cheers. – PLG Oct 26 '15 at 12:08
see edited answer – Herbert Oct 26 '15 at 16:20