# underfull vbox (badness 10000) with memoir

Sorry if this question has been asked very often, but I can't easily find an answer to my specific question.

I am using XeLaTeX and the memoir class to produce a rather long document (100 pages) with many sections, some of them less than a page. I get very many underfull vbox errors:

Underfull \vbox (badness 10000) has occurred while \output is active [1]

because the section title sometimes fall on page boundary. This forces XeLaTeX to insert ugly whitespace before section titles (see MWE below). I have seen many tutorials on how to manually fix this, but due to the length of the document and the fact that it is changing often, this is not very productive.

So my question is: Is there a way to tell XeLaTeX to automatically increase interline spacing (or do other tricks) to automatically fix the underfull vbox errors?

MWE below:

\documentclass[a4paper,12pt]{memoir}
\usepackage{lipsum}
\begin{document}

\chapter{Hello}

\section{Hello1}
\lipsum[2]

\section{Hello2}
\lipsum[3-4]

\section{Hello3}
\lipsum[3]

\end{document}
-

This is beause memoir runs under \flushbottom and since the Hello3 header is moved to the next page, memoir finds it ideal to do a massive stretch. It has nothing to do with xelatex does the same under pdflatex.

\raggedbottomsection

BTW: memoir has its own build in margin interface

-
Indeed, overfull vbox-es go away and the documents seems somewhat prettier, since all whitespace is put at the bottom of the pages. Thanks! –  user1202136 Aug 3 '12 at 14:17
Presumably, if I'm already running with a general \raggedbottom, this has no additional effect, right? –  Brent.Longborough Aug 3 '12 at 16:17
I don't think so, you can have a look at the implementation. it is a vskip, a zero penalty, a negative vskip –  daleif Aug 6 '12 at 8:27

It really depends where you want to allow flexibility. I wouldn't ever fill a page by increasing line spacing. Leaving a page short with white space at the end would be preferable to doing that and making text hard to read.

If you want to allow the space before section heads to increase arbitrarily you could do