_Typeset_

This tools provides a typesetting tool embedded into DrScheme. Unlike other
typesetting programs, this one has the full power of a modern programming
language (It only works in DrScheme's Full Scheme / Graphical with
Debugging language level currently).

The typeset menu provides three options. Each inserts a new editor snip
boxes into DrScheme's main window. The first two insert blue boxes that
contain formatted text. The third inserts a red box whose contents are
Scheme text. These boxes can be nested, ala quasiquote.

The blue boxes evaluate to their contents, except that any nested red boxes
are evaluated and their results are placed into the blue box. If the red
box evaluates to a value other than a blue box, the value is display'd into
the blue box.

Technically speaking, the blue boxes evalute to an editor-snip% object, so
any of the methods of an editor snip will work on the objects. Using these
methods is discouraged, except possibly to provide better memory or time
performance. The editor-snip%'s set-tight-text-fit method is called with #t 
and it's set-align-top-line method is called with #t.

The tool also provides several new primitive functions:

 - postscript : (instance editor-snip%) string -> void

   generates postscript for the editor-snip% object and saves it into
   the filename named by the second argument.

 - single-bracket : TST -> snip

   produces a snip that looks like its argument, except with square
   brackets around it.

 - double-bracket : TST -> snip

   produces a snip that looks like its argument, except with double square
   brackets around it.

 - tb-align : ((union 'base 'top 'center 'bottom) TST -> snip)

   if the second argument is not a snip, it just returns the second
   argument. If it is a snip, this produces a new snip identical to the
   second argument, except that it is aligned according to the first
   argument.

 - greek : ((union char string number) -> snip) 

  formats it's input in the symbol font, which contains greek letters and
  mathemtical symbols. Evaluate this loop to see what is available (note
  that the symbol font is the same on all platforms):

  (define (g n) (list n (integer->char n) (greek n)))

  (define (f n)
    (cond
      [(= n 33) null]
      [else
       (cons 
        (g (- n 1))
        (f (- n 1)))]))

  (f 256)

  - sup : (TST TST -> snip)
  - sub : (TST TST -> snip)

    aligns the first two arguments as either base/superscript or
    base/subscript positioning. The first argument is the base in each
    case.

  - ellipses : snip

    This is vertically centered ellipses. It does not really look like
    three periods, tho.

  - drawing : (string
               (dc<%> -> exact-integer exact-integer exact-integer exact-integer)
               (dc<%> exact-integer exact-integer -> void)
               ->
               snip)

    This is used to make snips that encode arbitrary drawing. The first
    argument is name and it must be unique (it is used for copying, pasting
    and saving the snip to disk). 

    The second argument calculates the width, height, descent, space,
    left-hand space and right-hand space of the snip. The last four numbers
    are insets into the width and height. The descent is the bottom inset,
    the space is the top inset and the left-hand and right-hand space are
    the left and right insets. These insets are used when lining up the
    snip with it's horizontal (and possibly vertical) neighbors. The dc<%>
    is provided for size calculations but should not be drawn into.

    The final argument actually draws the snip into the dc<%>. It should be
    drawn at the (x,y) coordinates given by the final argument's second and
    third parameters.

  - typeset-size : (union (-> integer) (integer -> void))

    This is a parameter-like function (not a true parameter) that controls
    the size of the rendered font. It defaults to drscheme's font size, as
    set in the preferences dialog.

  - position : ...
