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