Creating LaTeX documents

dvips
Converting from DVI to PostScript

For converting a DVI file to PostScript, you use the Unix command dvips:
unix>   dvips MyDoc.dvi -o
to create the file MyDoc.ps. The ``-o'' option insures that the computer sends the PostScript to a file rather than straight to a printer.

A most important option is -Ppdf, which creates a PostScript file which can later be converted (ps2pdf) to a quality PDF file. Without the -Ppdf option, the fonts in the PDF file will be crummy. Additionally, if your document is formatted for letter-size paper (8½"×11") then it is wise to inform dvips explicitly using the -t letter option, since many computer systems assume the metric A4 paper size by default.

unix>   dvips -Ppdf -t letter MyDoc.dvi -o

Like most Unix commands there are a bunch of options you can use to refine the dvips command. Here are several versions of the basic command shown above.

unix>   dvips -pp7-12 MyDoc.dvi -o

...the -pp option is used to create PostScript document MyDoc.ps containing only pages 7-12 of the original document.

unix>   dvips MyDoc.dvi -o doc17.ps

...creates a PostScript files named ``doc17.ps'' rather than the default name ``MyDoc.ps''

unix>   dvips -t a4 -t landscape MyDoc.dvi -o

...the -t option is used twice, to specify the ``A4'' paper size (instead of the usual ``letter'' size, 8½"×11") and also to specify landscape mode -- rotated 90° on the paper.

unix>   dvips -pp7,9,11-12 -t a4 MyDoc.dvi -o doc19.ps

...combining several options to create file "doc19.ps" containing pages 7, 9, 11, 12 of MyDoc, for printing to A4 paper.

A list of current dvips options is below.
USAGE: dvips [options] filename[.dvi]
OPTIONfunction
-Ppdf include scalable Type-1 fonts, so that the PostScript
file can be converted (ps2pdf) to good-looking PDF
-A Print only odd (TeX) pages
-a Conserve memory, not time
-B Print only even (TeX) pages
-b # Page copies, for posters e.g.
-C # Collated copies
-c # Uncollated copies
-d # Debugging (sum of 1=specials, 2=paths,
4=fonts, etc. See full dvips documentation.)
-D # Resolution (DPI)
-e # Maxdrift value (pixels)
-E Try to create EPSF
-f Run as filter
-F Send control-D at end
-G Shift low chars to higher pos.
-h filename Add header file
-i Make a separate PostScript file for each section
-j Download fonts partially
-k Print crop marks
-K Pull comments from inclusions
-l # Last page to be printed (according to
the document's own page numbering)
-M Don't make fonts
-m Manual feed
-n # Maximum number of pages
-N No structured comments
-O x,y Set/change paper offset;
x,y is a comma-separated dimension pair,
e.g., 3.2in,-32.1cm
-o filename Output file
-p # First page to be printed (according to
the document's own page numbering)
-P string Load config.$string
-pp pages Print only pages listed, e.g.,
-pp13-16 or -pp2,4,8 or -pp2,4-5,8
-q Run quietly
-r Reverse order of pages
-R Run securely
-S # Max section size in pages (see -i)
-s Enclose output in save/restore
-T w,h Specify desired page size;
w,h is a comma-separated dimension pair,
e.g., 8.5in,27.2cm
-t papertype Paper format (letter, a4, legal, ledger, a3)
-u string PS mapfile
-U Disable string param trick
-v Print version number and quit
-V Send downloadable PS fonts as PK
-X # Horizontal resolution (DPI)
-x # Override dvi (horizontal) magnification; set to #/1000,
e.g., -x 800 means horizontal magnification=80%
-y # Override dvi magnification; set to #/1000,
e.g., -y 1200 means vertical magnification=120%
-Y # Vertical resolution (DPI)
-Z Compress bitmap fonts
-z Pass ``Hyper PS'' (html hyperdvi specials)
for eventual distillation into PDF.