Converts troff intermediate format to PostScript format.
{ psc | psdit } [ -f1 CodeSet:Font ] [ -FFontDirectory ] [ -MMediaName ] [ -pPrologue ] [ -oList ] [ File ]
The psc and psdit commands translate a file created by device-independent troff to PostScript format for printing with a PostScript printer. If no file is specified, the standard input is used. The PostScript file is sent to the standard output.
Note: The input for the psc and psdit commands should be prepared with the corresponding -Tpsc option, such as the troff or pic command.
The psc and psdit commands can handle extended characters created by modifying the printer code field in the font file (/usr/lib/font/devpsc/R). The modified field contains a string surrounded by double quotes. The string contains a \b (backslash b) followed by a sequence of characters from the standard font that is composed into a new character by overstriking.
The psc and psdit commands allow users to cause the troff command to include arbitrary PostScript code in the generated PostScript file. The psc and psdit commands recognize the undefined % (percent) command in the troff intermediate file format to signal the start of raw PostScript code to be placed as is in the output file. Everything between (but not including) the % (percent sign) and a line containing a . (period) will be placed in the generated PostScript output.
This PostScript output is not insulated from the troff command coordinate system or the state of the generated PostScript output. However, two functions are defined in the prologue so that users can insulate themselves if so desired. The PB (picture begin) function performs a PostScript save operation, translates the PostScript coordinate system to troff's idea of the current position on the page, and changes the scale and orientation of the coordinate system axes to the standard PostScript 72 units per inch. The PE (picture end) macro ends this protected environment.
Several methods can be used to incorporate such included PostScript code into the troff intermediate file. For example, the .sy, \!, and .cf subcommands of the troff command use the following example to include the PostScript language description of a completely separate, printable document. In this example, the showpage operator is redefined to include mypic.ps as an illustration:
standard troff input \& .fl \!%PB \!/showpage{}def .fl .sy cat mypic.ps \!PE \!. more standard troff input
Information containing various media sizes for the psdit command and the enscript command are contained in the file /usr/lib/ps/MediaSizes.
The information required for each entry in the MediaSizes file can be obtained from the PostScript Printer Description, or PPD, file that matches the PostScript printer used with TranScript. The PPD files are available from Adobe Systems Incorporated. The measurements extracted form the PPD files are in points. A printer's point is 1/72 of an inch.
Any line in the MediaSizes file beginning with an ASCII * (asterisk) is ignored when matching media size names provided on the command line to the enscript command and the psdit command.
Each entry in the MediaSizes file contains either eight or nine fields. The first eight fields are required for all entries. The ninth field is optional. Fields are separated by white space. The fields for each entry are as follows:
Note: The sequence can be multiple PostScript operators or words for both the PageRegionName field and the PaperTrayName field. To specify such a sequence, use the ASCII " (double quote character) to delimit the entire sequence.
The following are examples of field entries in the MediaSizes file:
Name | Width | Depth | llx | lly | urx | ury | Page- Region- Name | Paper- Tray- Name |
Letter | 612 | 792 | 18 | 17 | 597 | 776 | Letter | |
Legal | 612 | 1008 | 18 | 17 | 597 | 992 | Legal |
The following statements are equivalent:
pic -Tpsc File | troff -Tpsc | psc pic -Tpsc File | troff -Tpsc | psdit
The enscript command, managefonts command, qprt command, pic command, psroff command, troff command.
The PE macro.
me Macro Package for the nroff and troff Commands.