DVI2PS(1)

NAME
dvi2ps - convert a DVI file to PostScript (PostScript is a trademark of Adobe Systems, Inc).

SYNOPSIS
dvi2ps [ -a pxldirs ] [ -d ] [ -f n ] [ -h ] [ -i file ] [ -m n ]
[ -o str ] [ -p ] [ -q ] [ -r ] [ -s ] [ -t n ] [ -E ] [ -O ] [ -P pages ] dvifile[.dvi]

DESCRIPTION
This program converts a DVI file to PostScript, and writes the result to standard output. The result requires a small amount of PostScript source to precede it to the printer, before it can be successfully printed. (By default, that PostScript code is prepended to the output).

ARGUMENTS

-a pxldirs	- specify different area for PXL files.
    Specifying "-a pxldirs" causes directory "pxldirs" to be searched for all pxl files, instead of the default directory. A list of directories may be given separated by colons a la PATH. If not given the environment variable TEXFONTS is used (if available), otherwise the standard directory.

-d	- select debugging output (you probably don't want to).

-f n	- specify a starting page number.
    (this is a TeX page number -- \count0).

-h	- do not copy the standard header file.
    This option prevents the standard PostScript header file being prepended to the output.

-i file	- copy the named file to the output
    The contents of the file named will be copied to the output after the standard header file has been copied.

-m0 | -mh | -m1 | -m2 | -m3 | -m4
    specify a magstep to use to print the document. This overrides whatever might be in the DVI file.

-m n	- specify a magnification to use to print the document.
    This should probably be one of the magic numbers 1000, 1095, 1200, 1440, 1728, but no checking is done. Note: if your site does not have the complete set of 300 dpi fonts, this option might be disabled.

-n n	- specify the number of copies to print

-o str	- specify an printing option.
    valid options are “a4”, “letter”, “note”, “legal”, “landscape” and “manualfeed” (without the quotes). This argument may be repeated several times.

-p	- do not preload font information.
    Occasionally there may be insufficent memory to hold the information about all of the fonts in the system. Portions of the document may be converted by including the -p option on the command line. This will prevent the preloading of all fonts into the system and instead use demand loading of the font tables. This also implies -r.

-q	- be quiet.
    Don't chatter about pages converted, etc.

-r	- stack pages in reverse order.
    Normally, the DVI pages are processed in reverse order, with the result that they are stacked in the correct order in the output tray. This option reverses that.

-s	- turn on printing of statistics.
    Some versions of dvi2ps will optionally print statistics about font usage and some other information that is generally only interesting to developers. On these systems, -s turns on the statistics printing.

-t n	- specify an ending page number.

-w	- Don't print out warnings.

-P pages	- print the specified pages.
    A comma-separated list of numbers and ranges (a-b) may be given. This comes besides -f and -t.

-E 	- print only even numbered pages.

-O 	- print only odd numbered pages.

NOTES
This is a `bare bones' DVI-to-PostScript program.  Minimal error
    checking is done.

Not all fonts are available in the resolution needed to display on the laser printer; when a missing font is encountered, dvi2ps will log a warning message, try to substitute another font and continue to process your dvi file.

It can take up to 60 seconds for the first page to be output. After a head of steam has been built up, it can roll along at 5-10 seconds per page.

This version gives (limited) support of the builtin postscript fonts. The file /usr/staff/lib/tex/fonts/TeXPSfonts.map contains the mapping of TeX font names to Postscript. Some of the work is done in the Prefix file. Actually the TEXFONTS variable (or the -a switch value) is used to search all TeXPSfonts.map files and these are concatenated.

TeX “\special” command:

This program supports use of the “\special” command in TeX to include special PostScript code for graphics, etc. Specifying “\special{psfile=foo.ps}” in the TeX source will result in the contents of file “foo.ps” (assumed to contain PostScript code) being copied into the output at that point. For most included graphics, the users (0,0) point will be set to the point of the \special command with x and y coordinates increasing up and to the right and in units of PostScript points (72/inch) -- thus you must explicitly leave space above the \special command for most graphics. For graphics produced by Apple Macintoshes (i.e., MacDraw, MacPaint, etc.), the top left corner of the drawing will be at the point of the \special command; in this case you must leave the required space below the \special.

The \special string can contain any number of the following “keyword=value” pairs, seperated by blanks:

Keyword	Value	Type
psfile	string	- specifies a PostScript file to include
hsize	dimension	- specifies maximum horizontal size (for clipping)
vsize	dimension	- specifies maximum vertical size (for clipping)
hoffset	dimension	- specifies amount to shift right
voffset	dimension	- specifies amount to shift up (or down, for MacDrwgs)
hscale	number	- specifies a scale factor in x-dimension
vscale	number	- specifies a scale factor in y-dimension
pstext	string	- include the string as postscript text

		dimensions are given in PostScript points (72 per inch).

THUS:  \special{psfile=foo.ps hoffset=72 hscale=0.9 vscale=0.9}

will shift the graphics produced by file “foo.ps” right by 1", and will draw it at 0.9 normal size.

hsize and vsize are given relative to the (0,0) point of the drwg and are unaffected by offsets and scales.

offsets are given relative to the point of the \special command, and are unaffected by scales.

If Macintosh drawings are to be included, the proper laserprep file must be downloaded to the printer, either permanently or as another header file in addition to the standard “tex.ps” header file.

FILES
*.dvi    TeX DeVice Independent output file

/usr/staff/lib/tex/PK/*/*.*pk TeX default font rasters
/usr/staff/lib/tex/tex.ps    PostScript support code.
/usr/staff/lib/tex/fonts/*.tfm    TFM files for builtin fonts
/usr/staff/lib/tex/TeXPSfonts.map TeX->postscript font map $TEXFONTS/{*.*pk,*.tfm,TeXPSfonts.map} alternative font info

SEE ALSO

tex, dvisel, latex

BUGS
The builtin fonts don't have all characters, so don't use them for math mode. Also some of these have improper mappings (like Courier doesn't have < and >), but this should be corrected shortly.

If the Mac LaserPrep file has been loaded, offsets, sizes and scales in \special{} will not work properly for non-Macintosh graphics (don't ask).

AUTHOR(s)
Mark Senn wrote the early versions of this program for the BBN BitGraph. Stephan Bechtolsheim, Bob Brown, Richard Furuta, James Schaad and Robert Wells improved it. Norm Hutchinson ported the program to the Sun. Neal Holtz ported it to the Apollo, and then to produce PostScript. Piet van Oostrum adapted it for BSD4.1, changed to pk file format and made several enhancements.