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.

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
1  
Please, try showing a minimal example: are you using the setspace package or the \linespread command? –  egreg Jul 31 '12 at 14:57
1  
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
1  
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 20 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

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
\usepackage{setspace}
\setstretch{1.15}

\setlength{\dimen0}{\textheight}
\addtolength{\dimen0}{-\topskip}
\divide\dimen0\baselineskip
\setlength{\textheight}{\number\dimen0 \baselineskip}
\addtolength{\textheight}{\topskip}

\usepackage{lipsum}

\begin{document}
\lipsum
\end{document}

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

 
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.