Re: a DSSSL typesetter

Subject: Re: a DSSSL typesetter
From: Gregg Reynolds <greyno@xxxxxxx>
Date: Sun, 10 May 1998 07:15:39 -0400
Brandon Ibach wrote:
>    Actually, I'm not so convinced that TeX and PostScript are that far
> apart.  It's true that TeX knows far more (as PostScript, by it's
> essential nature, knows basically nothing) about typesetting, but
> that's simply because it was programmed with that knowledge.  

Well, yes.  More accurately, the TeX language was designed specifically
to support typesetting.  PS was designed specifically to support page

> question is really whether PostScript has the guts to elegantly and
> efficiently handle the processing tasks needed to implement the
> typesetting process.  

No.  Using PS to do general typesetting would be like using TeX to do
page description.  You probably could do it, but why would you?  Both
systems are written in high-level _general_ languages, TeX in Pascal, PS
probably in C.  There's a reason for that.  

>I've looked a bit at TeX's general strategy for
> typesetting (the "box and glue" idea), and I can't see implementing
> something like that in PostScript as being that difficult.  Of course,
> there's got to be more to it than that, but...

Boxes and glue are _used_ by TeX, but they don't begin to tell the whole
story.  They're part of the metalanguage you need to do typesetting.

> TeX is an excellent tool for typesetting
> *documents*.  What I'm looking to create with PostScript is a good
> tool for typesetting a flow object tree.  I really think a reasonable
> amount of the work that TeX has to do is already done by the time we
> have a flow object tree.  All that needs to be done at that point is
> determine the best way to lay the flow objects on the page.  Not that
> this isn't probably the hardest part, but how much of that knowledge
> of typesetting that TeX is loaded with is used in laying out objects
> on the page, and how much is used in determining the characteristics
> of those objects to start with?

The flow object tree *is* the document.  As I understand the flow object
metaphor in DSSSL, it's the stylesheet that specifies what
characteristics attach to what flow objects.  The work of formatting or
typesetting the flow objects is what happens in the backend.  Generating
that set of postscript instructions that will result in a page layout
that matches the stylesheet specification is exactly the problem, and it
is decidedly non-trivial - after all, if it were easy somebody surely
would have implemented it by now.  Essentially the flow objects say
things like, here's some content from the document, and we want it to
flow into an area or areas that look like this, which can stretch and
shrink by some amount (depending on how much other areas on the page
stretch and shrink); and (perhaps) a certain item within the content
should, once it has been placed into the area, align horizontally with a
certain item in another area that is controlled by a different flow
object altogether; and don't forget to balance the columns on the last
page; etc, etc.  You could throw out about 90% of Postscript as useless
for such tasks; the remaining 10% would assist you only with great
reluctance.  It simply isn't the right tool for the job.

For a good look at the arcana of such stuff I recommend "The Advance
Texbook", by David Salomon; take a look at the chapters on OTRs in
particular.  And of course there's always "TeX, the Program". 
Personally, the more I learn about electronic page composition etc the
more astounded I am by Knuth's accomplishment and generosity.

 DSSSList info and archive:

Current Thread
  • Re: a DSSSL typesetter, (continued)
        • Sebastian Rahtz - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id EAA24139Mon, 11 May 1998 04:54:04 -0400 (EDT)
      • Sebastian Rahtz - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id EAA24128Mon, 11 May 1998 04:54:02 -0400 (EDT)
    • Reynolds, Gregg - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id SAA22173Fri, 8 May 1998 18:40:48 -0400 (EDT)
      • Brandon Ibach - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id RAA13180Sat, 9 May 1998 17:20:53 -0400 (EDT)
        • Gregg Reynolds - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id IAA27439Sun, 10 May 1998 08:19:21 -0400 (EDT) <=
        • Gregg Reynolds - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id PAA08528Sun, 10 May 1998 15:57:18 -0400 (EDT)
    • Frank A. Christoph - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id EAA24961Sun, 10 May 1998 04:12:20 -0400 (EDT)
      • Gregg Reynolds - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id HAA26749Sun, 10 May 1998 07:24:38 -0400 (EDT)
    • Frank A. Christoph - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id EAA25341Sun, 10 May 1998 04:33:47 -0400 (EDT)