[SUBMISSION] The Quinto Game.

Ian Piumarta ian.piumarta at inria.fr
Fri Aug 16 06:35:27 UTC 2002


On Fri, 16 Aug 2002 goran.hultgren at bluefish.se wrote:

> Ned Konz <ned at bike-nomad.com> wrote:
> [SNIP]
> > And then there's GTK's box and spring method (is this like the Swing 
> > one?): everything is inside (possibly nested) vertical or horizontal 
> > boxes, and spacing inside the boxes is done by various kinds of 
> > spacers, including different kinds of springs and fixed-size spacers.
> 
> That sounds like the TeX model.

Sort of.  TeX just has three things: lists, boxes and glue.  Boxes and
glue have dimensions made from rigid + "rubber" (compressable/expandable
from zero to infinity) length and boxes have a reference point (e.g., on
the baseline for text) used to align them verically and/or horizontally.  
So e.g., a "strut" is just an empty box with zero width and a rigid
height, and any kind of "spacer" can be made from a piece of glue having
some combination of rigid and rubber length.  Lists just serve to collect
boxes together into horizontal or vertical lists, with or without
line/page breaking.  Absolutely _everything_ is expressed in terms of
these three things, plus an alignment primitive (\[hv]align) that lines up
reference points across (and perpendicular to) a sequence of lists
(allowing tables of arbitrary complexity to be constructed).

I recommend to anyone who has a copy of The TeXbook within walking
distance to scan chapters 11 through 13 which explain the above (and maybe
14 and 15 too, to see just how elegant the line/page breaking algorithms
are).

Ian (who will now step down from his TeX soapbox ;)




More information about the Squeak-dev mailing list