[comp.text.tex] Okay, I admit it, I don't understand hfill

geoff@desint.itcorp.com (Geoff Kuenning) (03/20/91)

While trying to get my \special of an EPS file to be centered in LaTeX, I
eventually came up with the following test case in plain TeX:

\hfil\hbox to 200pt{\vrule width 200pt height0.01in}\hfil

\hfil\hbox to 317pt{\hfil\vrule width 200pt height0.01in\hfil}

\hfill\hbox to 200pt{\vrule width 200pt height0.01in}\hfill

\hfill\hbox to 317pt{\hfil\vrule width 200pt height0.01in\hfill}

This produces two centered 200-pt lines, followed by a right-justified
200-pt line, followed by a 200-pt line which is *almost*, but not
quite, right-justified.  Can somebody please explain this to my poor
confused little brain?

(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