[comp.text.tex] 'sokay, I don't understand vfill.

phys59@jetson.uh.edu (03/25/91)

In article <1991Mar20.034921.775@ITcorp.com>, geoff@desint.itcorp.com (Geoff Kuenning) writes:
> [...]
> (And while you're at it, why, when I added "\hrule" at the top of the
> file to see how big the margins were, did it swallow my first hbox
> until I also added some dummy text?)
> 
> I love TeX, but boy am I frustrated right now!
> -- 
> 	Geoff Kuenning   geoff@ITcorp.com   uunet!desint!geoff

Yeah, I have the same question (sort of).  Why does this not work:
\vfill\hbox{...}\vfill\eject\end
but this does:
\hbox{}\vfill\hbox{...}\vfill\eject\end
The idea is to vertically center the stuff in the middle \hbox.

Ronald Parker
phys59@jetson.uh.edu
Sources close to the abovesigned have leaked rumors of an upcoming humorous
message in this space for release Real Soon Now.

raymond@math.berkeley.edu (Raymond Chen) (03/25/91)

In article <8888.27ecda55@jetson.uh.edu>, phys59@jetson writes:
>Why does this not work:
>\vfill\hbox{...}\vfill\eject\end ...

Because TeX discards glue at the top of the page. (TeXbook page 110)

The reason for this is so that if you have something like

    [blah blah blah]
    \medskip
    [blee blee blee]

and a page break just happens to occur after the [blah blah blah], the
next page doesn't start with an extra medskip of empty space.  This
behaviour is usually desireable, since the purpose of the medskip was
for separation, and a page break serves to separate the [blah blah blah]
and the [blee blee blee] quite nicely already; no additional space
is necesary.  (This behaviour is not peculiar to TeX; most typesetting
systems have similar rules for discardable whitespace.)

Of course, if you don't want the glue to vanish at the top of the page,
just arrange for it not to be at the top of the page; e.g., stick a
\null in front of it.