[texhax] filling all the way down

Heiko Oberdiek heiko.oberdiek at googlemail.com
Sun Dec 19 23:49:26 CET 2010

On Sun, Dec 19, 2010 at 06:06:31PM +0000, Philip Taylor (Webmaster, Ret'd) wrote:

> Tom Sgouros wrote:
> >
> >I want to create a single long paragraph of shrinking font sizes all the way down to the illegible.  (It's a spoof of the fine print on contracts and copyright notices.)  I can shrink the font in the middle of a paragraph, but I can't shrink the \baselineskip, and if I arrange it as consecutive paragraphs run together, the last line of each paragraph isn't filled.
> >
> >I thought I remembered an example of this somewhere in my TeX library, but my hunting hasn't turned it up yet.
> >
> >How can I:
> >
> >   - Fill the last line of a paragraph (or at least dictate that TeX make a stab at doing so), or
> \parfillskip = 0 pt
> >   - Change the \baselineskip while a paragraph is underway.
> one \vadjust per line, but this will need some empirical
> fine tuning.
> >
> >Is either of these possible, or can someone suggest a third way to do this?
> Yes and maybe, respectively.

Yes and yes.

a) TeX can be forced to use \lineskip between the lines instead
    of the \baselineskip algorithm.

    \lineskiplimit=\maxdimen % turn off \baselineskip
    \lineskip=2pt % put 2pt between two lines

b) If whatsits are not used (color, \index, ...) then
   the paragraph can be put in a \parbox (or environment
     \Huge ...
     \tiny ...
     % Box with wrong line skips.
     % Now the lines can be put into boxes using \lastbox.
     % The interline glue is available via \lastskip
     % and the last node type can be inspected by \lastnodetype.
     % Then put the together with better interline glue
     % For example by inspecting the height of the lines.

Yours sincerely
  Heiko Oberdiek

More information about the texhax mailing list