Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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[hmargin={2.5cm, 2.5cm}, vmargin={3.5cm,3.5cm}, headheight=1.5em]{geometry}
\usepackage{lipsum}
\begin{document}

\chapter{Hello}

\section{Hello1}
\lipsum[2]

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

\section{Hello3}
\lipsum[3]

\end{document}
share|improve this question

2 Answers 2

up vote 9 down vote accepted

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.

Try adding

\raggedbottomsection

to your preamble, that helps

BTW: memoir has its own build in margin interface

share|improve this answer
    
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

\advance\beforesecskip 0pt plus -1fill

which makes the warning go away (and the second section in your example to move down the page)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.