I'm using the scrbook class, which uses flushbottom paragraphs by default.

Usually this is OK, as a book looks better when the bottom part of the pages are aligned. But when a new section starts, a huge amount of space is inserted in the previous page to flush the bottom of the page.

Example:

\documentclass[draft=true,fontsize=10pt,pagesize,paper=148mm:215mm]{scrbook}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\chapter{Chapter 1}

\section{Section 1}

\blindtext[1]

\blindtext[4]

\blindtext[1]

\blindtext[2]

\section{Section 2}

\blindtext[4]
\end{document}


Is there a way to use \flushbottom paragraphs by default, but \raggedbottom on pages preceding a new section?

If you have an individual section that causes problems, you could issue \clearpage before that section. Otherwise one could try something like the plain TeX \filbreak macro. The following will push the section heading to the next page if there is less than 3cm left, and makes the previous page essentially raggedbottom, closing up so that there is at most 3cm gap at the bottom of the page.

Here section 2 causes a new page:

But section 3 is placed as usual:

\documentclass[draft=true,fontsize=10pt,pagesize,paper=148mm:215mm]{scrbook}

\usepackage[english]{babel}
\usepackage{blindtext}

\usepackage{etoolbox}
\newskip\mfilskip
\mfilskip=0pt plus 3cm\relax
\newcommand{\mfilbreak}{\vspace{\mfilskip}\penalty -200%
\ifdim\lastskip<\mfilskip\vspace{-\lastskip}\else\vspace{-\mfilskip}\fi}
\pretocmd{\section}{\mfilbreak}{}{}

\begin{document}

\chapter{Chapter 1}

\section{Section 1}

\blindtext[1]

\blindtext[4]

\blindtext[1]

\blindtext[2]

\section{Section 2}

\blindtext[4]

\section{Section 3}

\blindtext[5]

\end{document}

• @DaniloBargen Thanks for pointing this out. I have now (further) updated the code so this is no longer a problem. Jan 4 '14 at 15:48
• tex.stackexchange is incredible :) Thanks a lot, Andrew. Jan 4 '14 at 22:32