Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Document Structuring Conventions
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==DSC at a glance== The basic premise of DSC is the separation of ''prolog'' (static definitions) and ''script'' ([[source code|code]] that affects job-specific printed output), plus the disallowing of certain PostScript [[operator (programming)|operator]]s deemed inappropriate for [[page description]]s. This ensures a basic level of predictability in the PostScript code, thus forming the basis of document manageability. An optional, additional layer of document manageability is provided by separating the script into a ''document setup'' section, zero or more functionally independent ''pages'', and an optional ''trailer'' (cleanup code). (“Zero pages” in DSC usually means “one page without the use of the PostScript ‘showpage’ operator.”) The functional independence between pages, plus the disallowing of more PostScript operators in the pages section, form the basis for ''page independence'', which allows pages to be reordered, and independently and randomly accessed. This imposed structure is then exposed by delimiting the PostScript file with ''DSC comments'', which normally begin with two percent signs followed by a keyword. Some keywords need to be followed by a colon, an optional space character, and then a series of [[argument (computer science)|argument]]s. Finally, the document is marked as conforming by starting it with a comment starting with “%!PS-Adobe-” followed by the DSC version number. Sections of reusable PostScript code can be modularized into ''procsets'' (procedure sets, corresponding to [[library (computing)|function libraries]] in other programming languages), in order to ease the generation of PostScript code. Procsets and other PostScript resources (for example, fonts) can be omitted from the PostScript file itself, and externally referenced by a directive-like DSC comment; such external referencing, however, can only work with a document manager that understands such DSC comments. DSC version 3.0 was released on September 25, 1992. The specification states, "Even though the DSC comments are a layer of communication beyond the PostScript language and do not affect the final output, their use is considered to be good PostScript language programming style." Thus, most PostScript-producing programs output DSC-conformant comments along with the code, although some such programs do not actually produce conforming documents.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)