\leftskip=0pt plus.5fil
\rightskip=0pt plus-.5fil
\parfillskip=0pt plus1fil
The reason this works is that for all lines except for the last, the amount of stretch in the line is 0, so no skips are inserted. In the last line, the addition of the \parfillskip
gives a skip of .5fil
on the left and right so the line is centered.
Well, things like that can be seen on the back of some books, lecture posters etc. Plus, it's yet another example of something TeX can do and Word can't;). And a nice trick with TeX's line-breaking stuff.
ReplyDeleteIt is neat. I don't think I've ever seen it used before though.
ReplyDeleteIt is used by caption and ccaption packages to center the last line of the captions
ReplyDelete