Sign up ×
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.

I use \documentclass{book}.

  • If I use \flushbottom, I get messages of the sort Underfull \vbox (badness 10000) has occurred while \output is active []. See question.
  • These messages disappear when I use \raggedbottom but then of course the height of page content varies form page to page.

So there seems to be no optimal solution but a trade off between to "evils" ... What is the point of view of LaTeX pros on this matter? Which option should be chosen in this situation?

share|improve this question
Please, try showing a minimal example: are you using the setspace package or the \linespread command? – egreg Jul 31 '12 at 14:57
Yes I use \usepackage[onehalfspacing]{setspace}\setstretch{1,15}. No I don't think I ever used \linespread. Difficult to produce a minimal example, since with \blindtext LaTeX will have no problems with either option, I suppose. And actually I do not really know from the log file to which pages of my text these badness messages refer (and it's a long document, the PDF having >250 pages). So it's not easy to reproduce the problems. Sorry. – lpdbw Jul 31 '12 at 15:25
Look in the log file: tex puts out a number in brackets for each page [1][2][3].... underfull box.... [4]... means the warning is about the stuff that appears on page 4. – David Carlisle Jul 31 '12 at 16:02

2 Answers 2

up vote 22 down vote accepted

There isn't a universal right answer.

\raggedbottom is of course an easier format to achieve as you lose the constraint on equalising page content.

If however you want \flushbottom then you have to ensure that the page content fits in the specified size. For example if you content consists entirely of lines of text on a 15pt baseline with no stretchy white space between lines or paragraphs, and your text body height is not a multiple of that baselineskip, then every page will be underfull as TeX can not achieve the specified size so has to break a line short. The solution there is to adjust the baselineskip and/or the textheight to be compatible, or, if typesetting on a grid is not an absolute requirement, add some vertical stretch glue between lines (by giving \baselinestretch a plus component) or between paragraphs (by giving \parskip a plus component).

In the final editing stages using either you may want to adjust page size on a per-page (or per-spread) basis using \enlargethispage.

See also

Do I have to care about bad boxes?

share|improve this answer
I am afraid, my LaTeX as well as editing capabilities are not such that interfering manually with LaTeX would make things look any better ... Therefore I rather tend to trust in LaTeX and only make rough global adjustments (such as switching between \raggedbotoom and \flushbottom). – lpdbw Jul 31 '12 at 15:32
Is there a trick of enabling \raggedbottom only on pages with extremely bad underfull vboxes (with a given threshold for badness)? I generally want flush bottoms but I’d prefer having a ragged bottom on pages where I’d otherwise have three short paragraphs with huge, ugly spaces between them. – Konrad Rudolph Nov 1 at 19:39
just add \newpage at the point you want it to break it is the vertical analogue of \\ or \newline which breaks a line leaving it short in an otherwise justified paragraph @KonradRudolph – David Carlisle Nov 1 at 21:16
@DavidCarlisle Hmm, I’d have preferred a solution which does that automatically without me having to manually insert non-semantic control code into my document. – Konrad Rudolph Nov 1 at 21:39
@KonradRudolph if you want it to be automatic then you need to say when it should do something, and what that thing is. \flushbottom says to stretch any glue on the page to make the bottom line come to the bottom. Now you can't just tell TeX don't always do that, do something else, sometimes, if it looks nicer... You can of course adjust the amount of stretch between paragraphs and at the bottom of the page to achieve various effects, it may be that some of those effects are desirable... – David Carlisle Nov 1 at 21:45

With this trick you'll get a \textheight so that each page contains an integer number of lines (equal to what you'd get without the trick)

\documentclass[12pt]{book} % or 10pt or 11 pt

\setlength{\textheight}{\number\dimen0 \baselineskip}



Alternatively, you can load the geometry package and use its option heightrounded (but this would change also other page parameters).

share|improve this answer
What do youn mean with "equal to what you'd get without the trick"? – lpdbw Jul 31 '12 at 16:48
@lpdbw The same number of lines. – egreg Jul 31 '12 at 19:32

Your Answer


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.