[comp.lang.postscript] Want Laser Prep walkthrough

day@grand.UUCP (Dave Yost) (12/12/88)

Can anyone point me to a walkthrough of
"Laser Prep -- The Apple PostScript Dictionary (md)"
or any official Apple documentation on it?

Thanks.

 --dave

edwards@bgsuvax.UUCP (Ken Jenkins) (12/13/88)

In article <456@grand.UUCP>, day@grand.UUCP (Dave Yost) writes:
> Can anyone point me to a walkthrough of
> "Laser Prep -- The Apple PostScript Dictionary (md)"
> or any official Apple documentation on it?
> 
> Thanks.
> 
>  --dave
As far as I know there ain't none, except for the one I've see
from Brian Reid at ADOBE (far from "official" by any
any definition :-) but which I have found somewhat helpful).

If anybody knows of any "walkthrough" originating "officially"
from Apple and can make it known ... speak now or forever ...
And if any body at Apple's listening ... come on guys, this
is hardly "the family jewels" the least you can do if you're
gonna hold out on display PS is make life a little easier on
us poor buggers out here. I know , the author is probably
snickering on some beach in Rio and you don't have his phone
number. :-)
 
-------------------------------------------------------------------------------
Disclaimer: My name is Ken Jenkins and I am here as a guest of Bruce Edwards
            to whom this account belongs. Although he may be interested or even
            amused by my ramblings, he should not be held accountable for them 
            in any way.  
-------------------------------------------------------------------------------
   "Politics is ,in the ultimate analysis, religion applied to economics"
-------------------------------------------------------------------------------
Ken Jenkins (as a guest of Bruce Edwards)    CSNET: edwards@bgsu.edu
                                           ARPANET: edwards@andy.bgsu.edu
                                              UUCP: ..!osu-cis!bgsuvax!edwards
------------------------------------------------------------------------------- 

liam@cs.qmc.ac.uk (William Roberts) (12/16/88)

I have plans to write a paper entitled something like

         A Short History of the Apple LaserPrep:
        The Primrose Path to the Enternal Bonfire

This will demonstrate the way in which the Apple LaserPrep code
has moved further and further away from good taste and decency,
resulting in the current state of affairs in which the code
conforms almost to the letter of the document structuring
conventions whilst being utterly against the spirit!

For example: the "od" routine used during document setup.

DSC2 says that every page should be independent of every other
page: LaserPrep 67 does this by calling od at the start of the
document (in a correctly labelled document setup section) which
includes

 newpath clippath
 mark
  {transform{itransform moveto}}
  {transform{itransform lineto}}
  {6 -2 roll transform 6 -2 roll transform 6 -2 roll transform
    {itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}
  {{closepath}}
  pathforall newpath
 counttomark array astore /gc xdf

What does this do? Answer: it sets the current path to be the
current clipping region, then uses pathforall to walk through
the path, producing for each element of the path the point(s)
involved *IN DEVICE COORDINATES* and an instruction to turn
them back into current coordinates and then execute the
appropriate path constructor. It then puts these instructions
into an array and saves it under the name "gc".

For example, if the clipping path is

        100 100 moveto
        100 200 lineto
        200 200 lineto
        200 100 lineto
        closepath

gc will be

        352 3776 {itransform moveto}
        352 2590 {itransform lineto}
       1552 2590 {itransform lineto}
       1552 3376 {itransform lineto}
       {closepath}

The start of each page involves executing gc to set up the
clipping path for that page.

This is obscene (Apple are you listening?). Why is it necessary
to use device coordinates? If it were not for the cost to me,
I'd buy a copy of the PostScript Green Book and send it to the
LaserPrep writers. There is no justification for the grotesque
code that is contained in current laserprep files.

Incidentally, if anyone out there expects to be able to use
modern Apple PostScript inside things like psfig, then they
might as well forget it now and not waste time trying to
pretend that this stuff can be used in the same way as the
early LaserPreps.

Can anyone suggest a good place to publish such a paper?
-- 

William Roberts         ARPA: liam@cs.qmc.ac.uk  (gw: cs.ucl.edu)
Queen Mary College      UUCP: liam@qmc-cs.UUCP
LONDON, UK              Tel:  01-975 5250

day@grand.UUCP (Dave Yost) (12/17/88)

In article <788@sequent.cs.qmc.ac.uk>
 liam@cs.qmc.ac.uk (William Roberts) writes:
>The Adobe Document Structuring Conventions specs say that every page
>should be independent of every other page: LaserPrep 67 ... conforms almost
>to the letter of the document structuring conventions whilst being utterly
>against the spirit!

The LaserPrep behavior you are complaining about is perhaps not as
bad as another way in which some program-generated PostScript code
violates the notion of page independence.  The violation to which
I refer consists of doing a save before a %%Page comment, and then
doing a matching restore after that %%Page comment.  This makes it
impossible to do some interesting postprocessing of PostScript
document files, such as printing 2 pages of output per sheet.

Please, you PostScript people out there, if you have anything to do
with a program that outputs PostScript, see to it that the output
passes the following acid test of page independence: your page code
should work inside a save-restore pair, like this:

    %%Page:
    /struct_crucible save def       % added to test independence of page code

    [ page code ]

    struct_crucible restore         % added to test independence of page code
    %%Page:

Surprisingly, some very popular, excellent programs from important,
major software vendors do not pass this test.  In all the cases I have
seen, the deficiency would be easy to correct.

 --dave yost

edwards@bgsuvax.UUCP (Ken Jenkins) (12/20/88)

In article <788@sequent.cs.qmc.ac.uk>, liam@cs.qmc.ac.uk (William Roberts) writes:
> I have plans to write a paper entitled something like
> 
>          A Short History of the Apple LaserPrep:
>         The Primrose Path to the Enternal Bonfire
> 
> This will demonstrate the way in which the Apple LaserPrep code
> has moved further and further away from good taste and decency,
> resulting in the current state of affairs in which the code
> conforms almost to the letter of the document structuring
> conventions whilst being utterly against the spirit!
> 
> Incidentally, if anyone out there expects to be able to use
> modern Apple PostScript inside things like psfig, then they
> might as well forget it now and not waste time trying to
> pretend that this stuff can be used in the same way as the
> early LaserPreps.
> 
> Can anyone suggest a good place to publish such a paper?
> -- 
> 
> William Roberts         ARPA: liam@cs.qmc.ac.uk  (gw: cs.ucl.edu)
> Queen Mary College      UUCP: liam@qmc-cs.UUCP
> LONDON, UK              Tel:  01-975 5250

Give 'um hell Bill!!!!! :-)

You might try:

The PostScript Language Journal
P.O.Box 5763
Parsippany, NJ 07054
USA


-------------------------------------------------------------------------------
Disclaimer: My name is Ken Jenkins and I am here as a guest of Bruce Edwards
            to whom this account belongs. Although he may be interested or even
            amused by my ramblings, he should not be held accountable for them 
            in any way.  
-------------------------------------------------------------------------------
   "Politics is ,in the ultimate analysis, religion applied to economics"
-------------------------------------------------------------------------------
Ken Jenkins (as a guest of Bruce Edwards)    CSNET: edwards@bgsu.edu
                                           ARPANET: edwards@andy.bgsu.edu
                                              UUCP: ..!osu-cis!bgsuvax!edwards
-------------------------------------------------------------------------------