when using an inflexible document class, one is often faced with the warning
Underfull \vbox (badness 10000) has occurred while \output is active []
on pages that contain no display math.
in
underfull
\vbox
[1]
frank mittelbach quotes from the companion (2ed) regarding page
specs that are "too rigid". the recommended (and obvious) approach is to build in
more flexibility.
the same suggestions, to add flexibility, are given in What are underfull hboxes and vboxes and how can I get rid of them? [2].
the document class in question was constructed (intentionally, if
short-sightedly) with no allowance for stretch in the \parskip
,
between chapter title and text, and in a few other locations.
furthermore, an option permits the change from [10pt]
to [11pt]
body text so even if the \textheight
is an integral number of
lines in one size, another size will not meet the criterion.
with \vfuzz
one can specify a small allowance which, if not
exceeded, will suppress overfull box messages. but there isn't
any equivalent for a negative allowance.
i've checked the etex
manual (the latest, dated 1998/03/04) and that for etextools
but
didn't find anything useful. i've looked into the tex.web
code,
but it wasn't obvious how one might work around the problem
without a new primitive.
it's not a good idea to ignore these messages in the log, since the "structural" ones camouflage the ones (usually very few) that do need to be attended to. has anyone come up with a method for suppressing only those underfull vbox messages that are off by only a couple of points?
Adding a finite stretch on the page suppresses warnings so long as the shortfall is within this limit, so at 11pt 1pt suppresses the warning completely .7pt makes it have a "non infinite" badness and anything much less than that has infinite badness.
\documentclass[11pt]{amsart}
\makeatletter
\def\@textbottom{\vskip \z@ \@plus 1pt}
\let\@texttop\relax
\makeatother
\begin{document}
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
aa\\bb\\cc\\dd\\ee\\ff\\gg
\end{document}
\widowpenalty
pulls an extra line over to page 3. but it's headed in the right direction. and adding a title, author, and a footnote or two for the top matter is good on the first page (which will always be true for amsart
since there's stretch with the footnote rule; now to try it with amsbook). - barbara beeton
\raggedbottom
(I just cut and pasted it from latex.ltx) except changing the glue stretch to a finite amount. - David Carlisle
\flushbottom
and really wanted that then of course this is no help at all. - David Carlisle
There is no "negative \vfuzz
". The only way I see is patching the output routine to measure the actual height of the page to be output and, if the difference with the desired height is less than a threshold value, issuing \vbadness10000
when the box is actually built.
Using \raggedbottom
is not an option, I believe, because it can introduce variability that perhaps is difficult to control.
A patch to amsart.cls
that seems to work, in the direction of not having underfull pages, is
\textheight=\dimexpr
\ifcase\@mainsize
\or % 0
\or % 1
\or % 2
\or % 3
\or % 4
\or % 5
\or % 6
\or % 7
57\or % 8
52\or % 9
48\or % 10
44\or % 11
41\fi % 12
\baselineskip+\topskip\relax
instead of setting \textheight=584pt
for all sizes. This gives the following values for \textheight
:
580pt (8pt size)
582pt (9pt size)
586pt (10pt size)
582pt (11pt size)
584pt (12pt size)
It's probably similar for amsbook
.
Of course this would break many existing documents. A difference of two points for the main sizes with respect to the "ideal" height is not noticeable. Of course all the objects that add unstretchable or unshrinkable spaces should occupy an integer number of lines.
One option is to modify output routine so that it includes \vspace
with some plus
at the very end:
\documentclass[a4paper]{amsart}
\usepackage{lipsum}
\usepackage{showframe}
% fixed text size so that paper size has no influence.
\setlength{\textheight}{545pt}
\setlength{\textwidth}{350pt}
\begin{document}
% adjust some lengths to invoke the problem
\parskip0pt
\baselineskip30pt
% this, put at the beginning of the document, solves the problem
% adjust the `plus` part of the `\vspace` to your faviourite value
\makeatletter
\edef\orig@output{\the\output}
\output{\setbox\@cclv\vbox{\unvbox\@cclv\vspace{0pt plus 20pt}}\orig@output}
\makeatother
% the warnings for the pages that are actually full have disappeared
\lipsum
% these `\vbox`es are really short and the warning is there
\vbox{\lipsum[1]}\par
\vbox{\lipsum[1]}\par
\vbox{\lipsum[1]}\par
\vbox{\lipsum[1]}\par
\end{document}
The warnings for pages 2 and 4 are correct, since on page 2, one line is missing because of the widow elimination.
plus 30pt
, only pages 5 and 6 were reported as underfull; changing that to plus 5pt
added page 4, but this isn't adequate. - barbara beeton
\vbox
es. a copyeditor seeing those pages would send them back to the author to be rewritten, or at least unboxed. - barbara beeton
\setlength{\textheight}{500pt}
at a wrong place. I modified the example a bit, see the update. - yo'
amsart
class is known for this "feature". :) - egregvbox
warning you could use thesilence
package. - Jörg\raggedbottom
observation seems promising. yes, a page is definitely allowed to be 2pt short under the action of the current specs. butplus 2pt
of glue can expand to quite a bit more under some situations, so this does need to be examined carefully. - barbara beeton