1DVIPS(1) General Commands Manual DVIPS(1)
2
3
4
6 dvips - convert a TeX DVI file to PostScript
7
9 dvips [ options ] file[.dvi]
10
12 THIS MAN PAGE IS OBSOLETE! See the Texinfo documentation instead. You
13 can read it either in Emacs or with the standalone info program which
14 comes with the GNU texinfo distribution as prep.ai.mit.edu:pub/gnu/tex‐
15 info*.tar.gz.
16
17 The program dvips takes a DVI file file[.dvi] produced by TeX (or by
18 some other processor such as GFtoDVI) and converts it to PostScript,
19 normally sending the result directly to the (laser)printer. The DVI
20 file may be specified without the .dvi extension. Fonts used may
21 either be resident in the printer or defined as bitmaps in PK files, or
22 a `virtual' combination of both. If the mktexpk program is installed,
23 dvips will automatically invoke METAFONT to generate fonts that don't
24 already exist.
25
26 For more information, see the Texinfo manual dvips.texi, which should
27 be installed somewhere on your system, hopefully accessible through the
28 standard Info tree.
29
31 -a Conserve memory by making three passes over the .dvi file
32 instead of two and only loading those characters actually used.
33 Generally only useful on machines with a very limited amount of
34 memory, like some PCs.
35
36 -A Print only odd pages (TeX pages, not sequence pages).
37
38 -b num Generate num copies of each page, but duplicating the page body
39 rather than using the #numcopies option. This can be useful in
40 conjunction with a header file setting \bop-hook to do color
41 separations or other neat tricks.
42
43 -B Print only even pages (TeX pages, not sequence pages).
44
45 -c num Generate num copies of every page. Default is 1. (For collated
46 copies, see the -C option below.)
47
48 -C num Create num copies, but collated (by replicating the data in the
49 PostScript file). Slower than the -c option, but easier on the
50 hands, and faster than resubmitting the same PostScript file
51 multiple times.
52
53 -d num Set the debug flags. This is intended only for emergencies or
54 for unusual fact-finding expeditions; it will work only if dvips
55 has been compiled with the DEBUG option. If nonzero, prints
56 additional information on standard error. The number is taken
57 as a set of independent bits. The meaning of each bit follows.
58 1=specials; 2=paths; 4=fonts; 8=pages; 16=headers; 32=font com‐
59 pression; 64=files; 128=memory; 256=Kpathsea stat(2) calls;
60 512=Kpathsea hash table lookups; 1024=Kpathsea path element
61 expansion; 2048=Kpathsea searches. To trace everything having
62 to do with file searching and opening, use 3650 (2048 + 1024 +
63 512 + 64 + 2). To track all classes, you can use `-1' (output is
64 extremely voluminous).
65
66 -D num Set the resolution in dpi (dots per inch) to num. This affects
67 the choice of bitmap fonts that are loaded and also the posi‐
68 tioning of letters in resident PostScript fonts. Must be between
69 10 and 10000. This affects both the horizontal and vertical
70 resolution. If a high resolution (something greater than 400
71 dpi, say) is selected, the -Z flag should probably also be used.
72
73 -e num Make sure that each character is placed at most this many pixels
74 from its `true' resolution-independent position on the page. The
75 default value of this parameter is resolution dependent. Allow‐
76 ing individual characters to `drift' from their correctly
77 rounded positions by a few pixels, while regaining the true
78 position at the beginning of each new word, improves the spacing
79 of letters in words.
80
81 -E makes dvips attempt to generate an EPSF file with a tight bound‐
82 ing box. This only works on one-page files, and it only looks
83 at marks made by characters and rules, not by any included
84 graphics. In addition, it gets the glyph metrics from the tfm
85 file, so characters that lie outside their enclosing tfm box may
86 confuse it. In addition, the bounding box might be a bit too
87 loose if the character glyph has significant left or right side
88 bearings. Nonetheless, this option works well for creating
89 small EPSF files for equations or tables or the like. (Note, of
90 course, that dvips output is resolution dependent and thus does
91 not make very good EPSF files, especially if the images are to
92 be scaled; use these EPSF files with a great deal of care.)
93
94 -f Run as a filter. Read the .dvi file from standard input and
95 write the PostScript to standard output. The standard input
96 must be seekable, so it cannot be a pipe. If you must use a
97 pipe, write a shell script that copies the pipe output to a tem‐
98 porary file and then points dvips at this file. This option
99 also disables the automatic reading of the PRINTER environment
100 variable, and turns off the automatic sending of control D if it
101 was turned on with the -F option or in the configuration file;
102 use -F after this option if you want both.
103
104 -F Causes Control-D (ASCII code 4) to be appended as the very last
105 character of the PostScript file. This is useful when dvips is
106 driving the printer directly instead of working through a
107 spooler, as is common on extremely small systems. NOTE! DO NOT
108 USE THIS OPTION!
109
110 -G Causes dvips to shift non-printing characters to higher-numbered
111 positions. This may be useful sometimes.
112
113 -h name
114 Prepend file name as an additional header file. (However, if the
115 name is simply `-' suppress all header files from the output.)
116 This header file gets added to the PostScript userdict.
117
118 -i Make each section be a separate file. Under certain circum‐
119 stances, dvips will split the document up into `sections' to be
120 processed independently; this is most often done for memory rea‐
121 sons. Using this option tells dvips to place each section into
122 a separate file; the new file names are created replacing the
123 suffix of the supplied output file name by a three-digit
124 sequence number. This option is most often used in conjunction
125 with the -S option which sets the maximum section length in
126 pages. For instance, some phototypesetters cannot print more
127 than ten or so consecutive pages before running out of steam;
128 these options can be used to automatically split a book into
129 ten-page sections, each to its own file.
130
131 -j Download only needed characters from Type 1 fonts. This is the
132 default in the current release. Some debugging flags trace this
133 operation. You can also control partial downloading on a per-
134 font basis, via the psfonts.map file.
135
136 -k Print crop marks. This option increases the paper size (which
137 should be specified, either with a paper size special or with
138 the -T option) by a half inch in each dimension. It translates
139 each page by a quarter inch and draws cross-style crop marks.
140 It is mostly useful with typesetters that can set the page size
141 automatically.
142
143 -K This option causes comments in included PostScript graphics,
144 font files, and headers to be removed. This is sometimes neces‐
145 sary to get around bugs in spoolers or PostScript post-process‐
146 ing programs. Specifically, the %%Page comments, when left in,
147 often cause difficulties. Use of this flag can cause some
148 included graphics to fail, since the PostScript header macros
149 from some software packages read portions of the input stream
150 line by line, searching for a particular comment. This option
151 has been turned off by default because PostScript previewers and
152 spoolers have been getting better.
153
154 -l num The last page printed will be the first one numbered num Default
155 is the last page in the document. If the num is prefixed by an
156 equals sign, then it (and any argument to the -p option) is
157 treated as a sequence number, rather than a value to compare
158 with \count0 values. Thus, using -l =9 will end with the ninth
159 page of the document, no matter what the pages are actually num‐
160 bered.
161
162 -m Specify manual feed for printer.
163
164 -mode mode
165 Use mode as the Metafont device name for path searching and font
166 generation. This overrides any value from configuration files.
167 With the default paths, explicitly specifying the mode also
168 makes the program assume the fonts are in a subdirectory named
169 mode.
170
171 -M Turns off the automatic font generation facility. If any fonts
172 are missing, commands to generate the fonts are appended to the
173 file missfont.log in the current directory; this file can then
174 be executed and deleted to create the missing fonts.
175
176 -n num At most num pages will be printed. Default is 100000.
177
178 -N Turns off structured comments; this might be necessary on some
179 systems that try to interpret PostScript comments in weird ways,
180 or on some PostScript printers. Old versions of TranScript in
181 particular cannot handle modern Encapsulated PostScript.
182
183 -noomega
184 This will disable the use of Omega extensions when interpreting
185 DVI files. By default, the additional opcodes 129 and 134 are
186 recognized by dvips as Omega extensions and interpreted as
187 requests to set 2-byte characters. The only drawback is that the
188 virtual font array will (at least temporarily) require 65536
189 positions instead of the default 256 positions, i.e. the memory
190 requirements of dvips will be slightly larger. If you find this
191 unacceptable or encounter another problem with the Omega exten‐
192 sions, you can switch this extension off by using -noomega (but
193 please do send a bug report if you find such problems - see the
194 bug address in the AUTHORS section below).
195
196 -o name
197 The output will be sent to file name If no file name is given
198 (i.e., -o is last on the command line), the default name is
199 file.ps where the .dvi file was called file.dvi; if this option
200 isn't given, any default in the configuration file is used. If
201 the first character of the supplied output file name is an
202 exclamation mark, then the remainder will be used as an argument
203 to popen; thus, specifying !lpr as the output file will automat‐
204 ically queue the file for printing. This option also disables
205 the automatic reading of the PRINTER environment variable, and
206 turns off the automatic sending of control D if it was turned on
207 with the -F option or in the configuration file; use -F after
208 this option if you want both.
209
210 -O offset
211 Move the origin by a certain amount. The offset is a comma-sep‐
212 arated pair of dimensions, such as .1in,-.3cm (in the same syn‐
213 tax used in the papersize special). The origin of the page is
214 shifted from the default position (of one inch down, one inch to
215 the right from the upper left corner of the paper) by this
216 amount.
217
218 -p num The first page printed will be the first one numbered num.
219 Default is the first page in the document. If the num is pre‐
220 fixed by an equals sign, then it (and any argument to the -l
221 option) is treated as a sequence number, rather than a value to
222 compare with \count0 values. Thus, using -p =3 will start with
223 the third page of the document, no matter what the pages are
224 actually numbered.
225
226 -pp pagelist
227 A comma-separated list of pages and ranges (a-b) may be given,
228 which will be interpreted as \count0 values. Pages not speci‐
229 fied will not be printed. Multiple -pp options may be specified
230 or all pages and page ranges can be specified with one -pp
231 option.
232
233 -P printername
234 Sets up the output for the appropriate printer. This is imple‐
235 mented by reading in config.printername , which can then set the
236 output pipe (as in, !lpr -Pprintername as well as the font paths
237 and any other config.ps defaults for that printer only. Note
238 that config.ps is read before config.printername In addition,
239 another file called ~/.dvipsrc is searched for immediately after
240 config.ps; this file is intended for user defaults. If no -P
241 command is given, the environment variable PRINTER is checked.
242 If that variable exists, and a corresponding configuration file
243 exists, that configuration file is read in.
244
245 -q Run in quiet mode. Don't chatter about pages converted, etc.;
246 report nothing but errors to standard error.
247
248 -r Stack pages in reverse order. Normally, page 1 will be printed
249 first.
250
251 -R[0|1|2]
252 Run securely. -R2 disables both shell command execution in
253 \special'{} (via backticks ` ) and config files (via the E
254 option), and opening of any absolute filenames. -R1 , the
255 default, forbids shell escapes but allows absolute filenames.
256 -R0 allows both. The config file option is z
257
258 -s Causes the entire global output to be enclosed in a save/restore
259 pair. This causes the file to not be truly conformant, and is
260 thus not recommended, but is useful if you are driving the
261 printer directly and don't care too much about the portability
262 of the output.
263
264 -S num Set the maximum number of pages in each `section'. This option
265 is most commonly used with the -i option; see that documentation
266 above for more information.
267
268 -t papertype
269 This sets the paper type to papertype. The papertype should be
270 defined in one of the configuration files, along with the appro‐
271 priate code to select it. (Currently known types include let‐
272 ter, legal, ledger, a4, a3). You can also specify -t landscape,
273 which rotates a document by 90 degrees. To rotate a document
274 whose size is not letter, you can use the -t option twice, once
275 for the page size, and once for landscape. You should not use
276 any -t option when the DVI file already contains a papersize
277 special, as is done by some LaTeX packages, notably hyper‐
278 ref.sty.
279
280 The upper left corner of each page in the .dvi file is placed
281 one inch from the left and one inch from the top. Use of this
282 option is highly dependent on the configuration file. Note that
283 executing the letter or a4 or other PostScript operators cause
284 the document to be nonconforming and can cause it not to print
285 on certain printers, so the paper size should not execute such
286 an operator if at all possible.
287
288 -T papersize
289 Set the paper size to the given pair of dimensions. This option
290 takes its arguments in the same style as -O. It overrides any
291 paper size special in the dvi file.
292
293 -u psmapfile
294 Set psmapfile to be the file that dvips uses for looking up
295 PostScript font aliases. If psmapfile begins with a + charac‐
296 ter, then the rest of the name is used as the name of the map
297 file, and the map file is appended to the list of map files
298 (instead of replacing the list). In either case, if psmapfile
299 has no extension, then .map is added at the end.
300
301 -U Disable a PostScript virtual memory saving optimization that
302 stores the character metric information in the same string that
303 is used to store the bitmap information. This is only necessary
304 when driving the Xerox 4045 PostScript interpreter. It is
305 caused by a bug in that interpreter that results in `garbage' on
306 the bottom of each character. Not recommended unless you must
307 drive this printer.
308
309 -v Print the dvips version number and exit.
310
311 -V Download non-resident PostScript fonts as bitmaps. This
312 requires use of `gsftopk' or `pstopk' or some other such pro‐
313 gram(s) in order to generate the required bitmap fonts; these
314 programs are supplied with dvips.
315
316 -x num Set the magnification ratio to num/1000. Overrides the magnifi‐
317 cation specified in the .dvi file. Must be between 10 and
318 100000. Instead of an integer, num may be a real number for
319 increased precision.
320
321 -X num Set the horizontal resolution in dots per inch to num.
322
323 -y num Set the magnification ratio to num/1000 times the magnification
324 specified in the .dvi file. See -x above.
325
326 -Y num Set the vertical resolution in dots per inch to num.
327
328 -z Pass html hyperdvi specials through to the output for eventual
329 distillation into PDF. This is not enabled by default to avoid
330 including the header files unnecessarily, and use of temporary
331 files in creating the output.
332
333 -Z Causes bitmapped fonts to be compressed before they are down‐
334 loaded, thereby reducing the size of the PostScript font-down‐
335 loading information. Especially useful at high resolutions or
336 when very large fonts are used. Will slow down printing some‐
337 what, especially on early 68000-based PostScript printers.
338
340 mf(1), afm2tfm(1), tex(1), latex(1), lpr(1), dvips.texi.
341
343 Dvipsk uses the same environment variables and algorithms for finding
344 font files as TeX and its friends do. See the documentation for the
345 Kpathsea library for details. (Repeating it here is too cumbersome.)
346
347 KPATHSEA_DEBUG: Trace Kpathsea lookups; set to -1 for complete tracing.
348
349 PRINTER: see above.
350
352 PostScript is a registered trademark of Adobe Systems Incorporated.
353
355 Tomas Rokicki <rokicki@cs.stanford.edu>; extended to virtual fonts by
356 Don Knuth. Path searching and configuration modifications by
357 kb@mail.tug.org.
358
359
360
361 27 May 2004 DVIPS(1)