Output routine and \box255

TeX makes the assumption that the material that the page builder packages in box 255 is further processed by the output routine before it is either finally shipped out (via \shipout) or returned to the main vertical galley.

It therefore doesn't make much sense to issue a warning for underfull or overfull boxes at that point if the assumption is that the output routine will anyway unbox this material and attach running header and footers etc. As during that process you will get those warnings again.

Furthermore, Don Knuth does give a reason on page 400 why TeX keeps silent at this point:

Sometimes an output routine needs to know why it was invoked, so there's a problem of communicating information from the rest of the program. \TeX\ provides general |\mark| operations, but marks don't always yield the right sorts of clues. Then there's ^|\outputpenalty|, which can be tested to see what penalty occurred at a breakpoint; any penalty of $-10000$, $-10001$, $-10002$, or less, forces the output routine to act, hence different penalty values can be used to pass different messages. \ (When the output routine puts material back on the list of contributions, it need not restore the penalty at the breakpoint.) \ If output has been forced by a highly negative value of/ |\outputpenalty|, the output routine can use |\vbox{\unvcopy255}| to discover how full the page-so-far actually is. Underfull and overfull boxes are not reported when |\box255| is packaged for use by the output routine, so there's no harm in ejecting a page prematurely if you want to pass a signal.

This is, for example what LaTeX is using all the time to manage float material and if that would result in a huge number of spurious warnings otherwise.

Concerning the fact that you might even get "overfull" box messages if you rebox box 255: In a few cases when there are no legal page breaks earlier, box 255 might in fact contain more than its nominal height. In addition one should not forget that reboxing involves parameters like \boxmaxdepth and depending on their setting the final size might vary.


There is nothing very different about box255 here, you can see a similar effect with normal boxes.

\setbox2\vbox{\hbox{}}
\ht2=\vsize


\setbox0=\vbox to \vsize{\copy2}

\setbox0=\vbox to \vsize{\unvbox2}


\bye

The above produces

$ pdftex ufb
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011/Cygwin)
 restricted \write18 enabled.
entering extended mode
(./ufb.tex
Underfull \vbox (badness 10000) detected at line 7
 )
(see the transcript file for additional information)
No pages of output.
Transcript written on ufb.log.

Note how copying the box does not generate underful message but unboxing it does because then the (0 sized) contents are used but the artificially sized height \vsize of the box is lost in the unboxing process. The behaviour of the output routine when packing box 255 is similar, if you unbox 255 you get the natural height of its contents which may not be \vsize.