[comp.lang.postscript] Document structuring conventions V2

stephenf@softway.oz (Stephen Frede) (05/20/88)

In relation to the DocumentNeededFonts and
DocumentSuppliedFonts comments, can "(atend)" be validly
specified?

In regard to the requirement that no executable code appear in
the prologue (ie between EndComments and EndProlog), just what
does "executable" mean? It is ok to use "def" to define
functions, and presumably variables. Is anything else
condidered "non-executable" code?

Where does one put executable code that must appear at the
beginning of your document? Presumably after EndProlog, but
before the first Page comment, though nothing in any of the
documentation that I've seen explicitly says this.


			Regards,

				- Stephen Frede

Softway Pty Ltd, P.O. Box 305, Strawberry Hills, NSW 2012, AUSTRALIA
Phone: +61 2 698 2322; Fax: +61 2 699 9174; Telex: AA27987
ACSnet: stephenf@softway.oz	UUCP: ...!uunet!softway.oz!stephenf

greid@ondine.COM (Glenn Reid) (05/24/88)

This question was posed recently about the Adobe Document Structuring
Conventions.  The questions were good ones, and frequently asked.
There is further discussion of document modularity and structure in
the Green Book, as well ("PostScript Language Program Design",
Addison-Wesley).

>In relation to the DocumentNeededFonts and
>DocumentSuppliedFonts comments, can "(atend)" be validly
>specified?
  Yes.

>In regard to the requirement that no executable code appear in
>the prologue (ie between EndComments and EndProlog), just what
>does "executable" mean? It is ok to use "def" to define
>functions, and presumably variables. Is anything else
>condidered "non-executable" code?
  Yes.  Anything which does not affect the state of the interpreter
  is OK in the prologue.  Changes to VM are not considered changes
  to the state.  For example, it is okay to compute the value of
  some constant and store that value in a dictionary.  It is not
  okay to set the current gray value or the current font, or to
  leave something on the dictionary or operand stacks.

>Where does one put executable code that must appear at the
>beginning of your document? Presumably after EndProlog, but
>before the first Page comment, though nothing in any of the
>documentation that I've seen explicitly says this.
  On page 9 of the structuring conventions document there are
  comments called %%BeginSetup and %%EndSetup which address
  this directly.  This section should be between the %%EndProlog
  and the first %%Page comment, as you point out.  There is also
  a %%BeginPageSetup and %%EndPageSetup pair of comments, for
  page-level setup code.


I hope this helps.

Glenn Reid
Adobe Systems