1 PSPRINT

USAGE:   PSPRINT file [qualifiers]

The PSPRINT command can be used to print a DVI file produced by
TeX (or LaTeX), a raw PostScript file, or an ordinary text file,
on a variety of PostScript printers.
The currently supported devices include the Apple LaserWriter,
the Linotronic 300 and DEC's PrintServer 40.

To print your own copy of the "PSPRINT User Guide" just type:

   $ PSPRINT TEX_PS:USERGUIDE

2 TeX_Output

PSPRINT looks for a DVI file by default.  To print FOO.DVI, simply type:

   $ PSPRINT FOO

PSPRINT first translates FOO.DVI into a temporary PostScript file called
FOO.TMP.  The order in which pages are translated depends on the printer
(the default order can be overridden by the /REVERSE or /NOREVERSE options).
If no errors are found, FOO.TMP is sent to an appropriate queue
where it is printed (and then deleted).

2 PostScript_Output

PostScript is a complete programming language with a powerful set of
operators for manipulating text and graphics.  A PostScript program is an
ordinary text file.  If you give it a name like FOO.PS then sending it to
the printer is simple:

   $ PSPRINT FOO.PS

If you decide to use some other file extension you'll have to add the /PS
qualifier.  The PSPRINT User Guide explains how to include PostScript
graphics in a TeX or LaTeX document.

People who want to write PostScript programs will need to get the
PostScript Language Reference Manual and PostScript Language Tutorial
and Cookbook.  Both books are by Adobe Systems Incorporated and
published by Addison-Wesley.

2 Text_Output

To print a normal text file, just use any file type except DVI or PS:

   $ PSPRINT FOO.LIS

Your output will have 66 lines per page, and any lines more than 80
characters long will be truncated.  Use the /LANDSCAPE qualifier to
rotate the paper so that you can have lines up to 132 characters long
(but only 50 lines per page).

Type `PSPRINT FOO.PS /TEXT' if you want to print a PostScript program
rather than have it interpreted.

The /TWO and /WIDE qualifiers also print text files but format the
output so that two "pages" appear on each sheet of paper; each page
has a header line showing the file name and page number.
In both cases there will be 60 lines per page, but for /TWO each line
can be up to 80 characters long, or up to 132 characters for /WIDE.

These text file facilities may not be available on all types of
printers, especially the Linotronic.

2 Errors

If PSPRINT detects one or more errors while translating a DVI file then
the temporary PostScript file is automatically deleted and nothing
is printed --- not even a banner page.
The sort of errors you are most likely to see include:

   Page off paper (paper is ...
      The current page contains material beyond one or more paper edges.
      Use DVItoVDU to see where the problem lies.

   Couldn't open font file: ...
      Your DVI file uses a font at a non-existent magnification.
      Try a different font magnification in your source file.

   Couldn't open \special file: ...
      PSPRINT could not locate the given \special file.
      Check the file's spelling and/or directory location.

Error messages apply to the most recently displayed DVI/TeX page.
Any message that does not make sense probably indicates some sort of bug.
Please save a copy of the input file and report the problem to your
local TeXnician.

If a DVI file uses a large number of fonts (or a few very large fonts)
then you might get an error page with the message "VMerror".
This indicates that PostScript's "virtual memory" has been exhausted,
and the rest of your job will be flushed.
This problem is unlikely to worry most people, particularly on the
PrintServer 40 which has much more VM than the LaserWriter or Linotronic.
If the problem does occur, there are a few things you can try:

 - On a LaserWriter or PrintServer 40, try printing a few pages
   at a time, or use /CONSERVE_VM.
 - On a Linotronic, try using /LOWRES.
   (Note that /CONSERVE_VM is the default for this device.)

If you are sending your own PostScript program then an error should
produce some sort of message on the printed output.
If you are using a PrintServer 40 then specify /NOTIFY to get all
PostScript messages sent back to your terminal.

2 PostScript_Fonts

PSPRINT allows the use of PostScript fonts in a TeX or LaTeX document.
Such fonts can be used at any desired size and no character bitmaps need
to be downloaded since the shape information is resident in the printer.
The necessary typesetting information required by PSPRINT is extracted
from TFM files (TeX Font Metric files).  A TFM file name beginning
with "ps-" is used to indicate a resident PostScript font.

Each type of PostScript printer provides a different set of fonts.
To be able to use a particular PostScript font you need to know the
name of its corresponding TFM file and whether it actually exists in
the printer you want to use.  For each PostScript printer currently
supported there exists a file containing just such information:

   TEX_PS:LW_FONTS.PS   - converts TFM names into LaserWriter fonts
   TEX_PS:LINO_FONTS.PS - converts TFM names into Linotronic 300 fonts
   TEX_PS:PS40_FONTS.PS - converts TFM names into PrintServer 40 fonts

PSPRINT also uses these files, so you can be reasonably confident
about the validity of their contents.

There are some important differences between PostScript fonts and
the Computer Modern fonts normally used with TeX:

 - PostScript fonts usually contain up to 256 characters, with many
   empty locations.  Computer Modern fonts also have up to 256 characters
   but typically use only the first 128 locations (with very few empty).
 - When a PostScript font is scaled to the same design size as a CM font
   it tends to look darker and larger.  You need to be a bit careful
   when mixing the two font designs.
 - The standard TeX commands for accents and foreign letters need to be
   redefined for a PostScript text font.  The file TEX_PS:PSTEXT.TEX
   contains the required macro definitions; note that a few commands
   (\j, \aa, \AA, \t) cannot be used at all.  Another file,
   TEX_PS:PSFONTS.TEX, inputs these macros and illustrates the use
   (and abuse) of PostScript fonts in a TeX document.

2 PostScript_Graphics

PSPRINT allows the inclusion of PostScript graphics using TeX's \special
command.  The \special argument is interpreted as a file name, possibly
followed by a space and additional PostScript text that will be treated
as a separate line at the start of the given file.
For example, "\special{figure.ps 2 1 scale}" will cause PSPRINT to write
a line containing "2 1 scale" to the temporary output file, followed by
the contents of FIGURE.PS, a file assumed to be in your current directory
and containing some sort of PostScript program.  (The figure will be
twice as wide as one included by \special{figure.ps}.)
The PSPRINT User Guide has more details.

2 Qualifiers

/DEVICE=printer_type

This qualifier tells PSPRINT which type of PostScript printer is to be
used.  The currently supported devices are:

   LW   - for an Apple LaserWriter (the default)
   LINO - for a Linotronic 300
   PS40 - for DEC's PrintServer 40

/DVI

Force PSPRINT to assume the input file is a DVI file.

/PS

Force PSPRINT to assume the input file is a PostScript program.

/TEXT

Force PSPRINT to assume the input file is an ordinary text file.

/TWO

Like /TEXT but the output is formatted so that two "pages"
(both 60 lines by 80 columns) appear on each sheet of paper,
along with a header line showing the file name and page number.

/WIDE

Like /TEXT but the output is formatted so that two wide "pages"
(both 60 lines by 132 columns) appear on each sheet of paper,
along with a header line showing the file name and page number.

/BANNER
(only if /DEVICE=LW or LINO)

By default PSPRINT produces a banner page for each job sent to
a LaserWriter or Linotronic.  Use /NOBANNER if you don't want such a page.

/MANUALFEED
(only if /DEVICE=LW)

Use this qualifier if you want to manually feed paper into the LaserWriter.
As soon as the printer sees your job it will wait for you to feed in each
sheet of paper (it will normally wait up to a minute).

/LOWRES
(only for a DVI file and /DEVICE=LINO)

By default, TeX output on the Linotronic is printed at 1270 dots per inch.
The temporary file created by PSPRINT will typically be very large.
If /LOWRES is given then 635 dots per inch will be used, reducing both the
size of the temporary file (by roughly three quarters) and the likelihood
of memory problems.  The print quality will of course be poorer but you'll
probably need a magnifying glass to clearly see the difference.

/SIZE=page_size
(only if /DEVICE=LINO)

This qualifier specifies the page image size and orientation.
Possible values are A4P (the default), A4L, A5P, A5L, B5P, B5L and A3L.
The P stands for portrait and the L for landscape.
(Don't confuse the landscape orientation with /LANDSCAPE which rotates
the output within the page image, regardless of the /SIZE value.)

/CUTMARKS
(only if /DEVICE=LINO)

This qualifier controls the appearance of cut marks on Linotronic output.
These marks define the edges of the page image.  /CUTMARKS is the default;
use /NOCUTMARKS to suppress them.

/CONSERVE_VM
(only for a DVI file)

Use /CONSERVE_VM to force PSPRINT to conserve the printer's virtual memory
at the expense of creating a larger output file (character bitmaps will be
downloaded more often).  If /DEVICE=LINO then /CONSERVE_VM is the default;
if /DEVICE=LW or PS40 then /NOCONSERVE_VM is the default.

/PAGES=first:final
(only for a DVI file)

Print a selected subrange from the DVI file.  "first" and "final" can
select either DVI page numbers (positive integers) or TeX page numbers.
Assuming TeX generated the 5 pages `[0] [1] [2.1] [2.2] [3]', here are some
examples of how you could use /PAGES:

   $ PSPRINT FOO /PAGES=2      --- prints the 2nd DVI page (as would [1])
   $ PSPRINT FOO /PAGES=4:     --- prints the last two pages
   $ PSPRINT FOO /PAGES=:4     --- prints the first four pages
   $ PSPRINT FOO /PAGES=[2]    --- prints [2.1] and [2.2]
   $ PSPRINT FOO /PAGES=1:[2]  --- prints the first four pages
   $ PSPRINT FOO /PAGES=[2.2]: --- prints the last two pages

Note that "first" and "final" are optional; they default to the first and
last DVI pages respectively.  Omitting ":final" entirely sets "final" equal
to "first".

A TeX page specification is of the form [i0.i1...i9].  i0 to i9 are
integers separated by periods and represent the 10 counter values that
TeX stores with each DVI page.  Any number of these integers may be absent
and trailing periods may be omitted.  An absent integer will match any value
in the corresponding counter.  Many DVI pages may match a particular TeX page
specification; if "first" is a TeX page then the LOWEST matching DVI page is
selected, and if "final" then the HIGHEST matching page is selected.

/INCREMENT=i
(only for a DVI file)

Assuming f is the first DVI page selected (where f is either 1 or the start
of a /PAGES subrange) then an increment of i tells PSPRINT to print pages
f, f+i, f+2i, f+3i, ... , f+ni, where f+ni is <= the final DVI page selected.
The primary use of /INCREMENT is to simplify the printing of a document on
both sides of the paper.  For example, if FOO.DVI has 8 pages then the
following steps will produce a two-sided document on a LaserWriter:

   1. $ PSPRINT FOO /INC=2 /REV /NOBANNER    ! prints DVI pages 7, 5, 3, 1

   2. Remove the 4 pages from the output tray and carefully put them back
      into the input cassette so that page 1 remains face up and its
      top edge goes into the printer first.  (If FOO.DVI had 7 pages then
      you would only need to remove the top 3 pages from the output tray.)

   3. $ PSPRINT FOO /INC=2 /PAG=2: /NOREV    ! prints DVI pages 2, 4, 6, 8

Note that the use of /REVERSE with /INCREMENT has no effect on WHICH pages
are printed; it simply changes the ORDER in which they are done.

If you intend doing a lot of two-sided printing then it is a good idea to
define some symbols in your LOGIN.COM file to avoid making mistakes:

   $ ODDPAGES  :== PSPRINT/PAG=1:/INC=2/REV/NOBANNER
   $ EVENPAGES :== PSPRINT/PAG=2:/INC=2/NOREV

/REVERSE
(only for a DVI file)

Use /REVERSE to force PSPRINT to print pages in descending order,
or /NOREVERSE to force PSPRINT to print pages in ascending order.
By default PSPRINT prints DVI pages in an order determined by the type of
printer you are using.  /NOREVERSE is the default for all devices
currently supported by PSPRINT.

/MAGNIFICATION=number
(only for a DVI file)

Override the DVI magnification with a number 1000 times the desired
magnification.  The given number should correspond to one of
TeX's \magstep values; see chapter 4 of The TeXbook.

/UNITS=xx
(only for a DVI file)

Set the units of dimensions displayed in some PSPRINT messages
(e.g., if the page is off the paper).  "xx" can be one of:

   IN for inches      (the default)
   CM for centimetres (2.54cm = 1in)
   MM for millimetres (25.4mm = 1in)
   PT for points      (72.27pt = 1in)
   PC for picas       (12pc = 1pt)
   BP for big points  (72bp = 1in)
   PX for pixels      (depends on resolution of printer)

/STATS
(only for a DVI file)

Display statistics on the rules, fonts, characters and \special commands
used on each page.

/RESOLUTION=i
(only for a DVI file)

i is a positive integer specifying the resolution of your printer
in pixels per inch (horizontally and vertically).

/HOFFSET=dimension
/VOFFSET=dimension
(only for a DVI file)

These qualifiers allow you to shift the printed location of each page
according to the given dimensions.  For example, "/hoffset=-0.5in" would
move each printed page half an inch to the left.
A "dimension" is any integer or real number (possibly negative) followed
by a two-letter unit: IN,CM,MM,PC,PT,BP,PX (same as those for /UNITS).

/XSIZE=posdimen
/YSIZE=posdimen
(only for a DVI file)

PSPRINT will automatically check each DVI page to make sure it fits
within the given paper dimensions.
A "posdimen" is any positive integer or real number followed by a
two-letter unit: IN,CM,MM,PC,PT,BP,PX (same as those for /UNITS).

/PSPREFIX=string
(only for a DVI file)

PSPRINT needs to read TFM files if your DVI file uses printer-resident
PostScript fonts (for which bitmapped information does not exist).
All such fonts must have names beginning with the given prefix.

/TFM_DIRECTORY=directory
(only for a DVI file)

Specifies the location of TFM files for printer-resident PostScript fonts.

/DUMMY_FONT=file
(only for a DVI file)

This qualifier indicates the naming convention and format of all font files.
The given file must represent an unmagnified font.

/FONT_DIRECTORY=directory
(only for a DVI file)

Use this qualifier to override the default directory from which PSPRINT
gets all its character bitmap information.  You'll probably never need to
use this facility, but it might come in handy if you are using Metafont
to create your own fonts or modify existing ones.  The following commands
tell PSPRINT to first search for fonts in the current directory ([]) before
looking in the default directory (assumed to be TEX_DISK:[TEX.PK]):

   $ DEFINE DIRLIST [],TEX_DISK:[TEX.PK]
   $ PSPRINT FOO.DVI /FONT="DIRLIST:"

Use /STATS to see the default font directory at your site.

/LANDSCAPE

To get "landscaped" output.
(Normal output is said to have a "portrait" orientation.)
If given a DVI file, PSPRINT will check each page to make sure it fits
within the rotated paper.

/DELETE

To delete the input file after printing.

/NOTIFY

To be notified when the print job has finished.
On the PrintServer 40 you'll also see any PostScript messages,
a particularly useful feature when debugging a PostScript program.

/COPIES=number

To specify up to 100 copies.
Use of this facility is not encouraged.  Note in particular that
copies of a multiple-page document will NOT be collated.

/NOTE=string

To include a note on your banner page.  For example, to get your output
put in box 99, just type `PSPRINT /NOTE="BOX 99" ...'.

/QUEUE=string

To override the default queue used by PSPRINT.
(Some sites may have more than one printer of the same type.)

/OUTPUT=file

To send the PostScript code generated by PSPRINT to a file rather than
to a printer.  Since PSPRINT generates device-specific PostScript code
you should only send this file to a PostScript printer of the type
that PSPRINT intended to use.

/PREP=file
(only for a DVI or PS file)

To include a modified Laser Prep file that will allow you to send
PostScript files created on a Macintosh by the Command-F method.
If you just type /PREP then a default file (TEX_PS:LASERPREP70.PS) will
be used.
