DVIPS(1)
๐ DVIPS(1) ๐
General Commands Manual โจ bestie, this is the dvips page, and it's a whole vibe ๐ธ
โจ NAME โจ
dvips โ convert a TeX DVI file to PostScript ๐ฆ
๐ SYNOPSIS ๐
dvips [OPTIONS] file[.dvi]
๐ DESCRIPTION ๐
๐จ THIS MAN PAGE IS OBSOLETE! ๐จ okay so the page itself is outdated, so go read the Texinfo docs instead ๐ You can read them in Emacs or with the standalone info program ๐ง
okay so dvips takes a DVI file, file[.dvi], that TeX made (or some other processor like GFtoDVI ๐
) and converts it into PostScript ๐ The output can go to a file or get sent straight to a printer โจ You don't have to type the .dvi extension, it's optional ๐ธ The fonts it uses can either live inside the printer already, or be bitmaps stored in PK files, or be a virtual mix of both, which is so iconic ๐
Also, if the mktexpk program is installed, dvips will automatically call on METAFONT to make any fonts that don't exist yet ๐ฅ literally so helpful ๐ญ
For more info, check out the Texinfo manual dvips.texi. It should be installed somewhere on your system, hopefully reachable through the standard Info tree ๐ฆ
๐ OPTIONS ๐
-aโ ๐ง Conserves memory by doing three passes over the.dvifile instead of two, and only loads the characters that actually get used ๐ซถ This is mostly for machines with very little memory, like some PCs ๐-Aโ ๐ Prints only the odd pages (TeX pages, not sequence pages) โจ-b numโ ๐ฏ Generatesnumcopies of each page by duplicating the page body, instead of using the#numcopiesoption ๐ This can be super useful together with a header file that sets\bop-hookfor color separations or other neat tricks ๐-Bโ ๐ค๏ธ Prints only the even pages (TeX pages, not sequence pages) ๐-c numโ ๐จ๏ธ Generatesnumcopies of every page ๐ The default is 1 ๐ธ (For collated copies, check out-Cdown below ๐ซถ)-C numโ ๐ Createsnumcopies, but collated, by replicating the data in the PostScript file ๐ง It's slower than-c, but way easier on the hands, and faster than resubmitting the same PostScript file over and over ๐-d numโ ๐ต๏ธ Sets the debug flags ๐ This is only for emergencies or for super unusual fact-finding missions ๐ญ It only works if dvips was compiled with the DEBUG option ๐ง When it's nonzero, extra info gets printed to standard error ๐งพ For the maximum amount of info, use-1๐ Check the Dvips Texinfo manual for more details ๐-D numโ ๐ Sets the resolution tonumdpi (dots per inch) โจ This changes which bitmap fonts get loaded, and also where the letters go in resident PostScript fonts ๐ It has to be between 10 and 10000 ๐ It affects both horizontal and vertical resolution ๐ฆ If you pick a high resolution (like, above 400 dpi), you should probably use the-Zflag too โ ๏ธ-e numโ ๐ฏ Makes sure each character sits at mostnumpixels away from its true, resolution-independent position on the page ๐ธ The default value depends on the resolution ๐ง Letting characters drift a few pixels from their correctly rounded spots, and then snapping back to the true position at the start of each new word, makes the letter spacing inside words look better โจ-Eโ ๐ฆ Makes dvips try to generate an EPSF file with a tight bounding box ๐ This only works on one-page files ๐ โโ๏ธ and it only looks at marks made by characters and rules, not by any included graphics ๐ผ๏ธ It also grabs the glyph metrics from the tfm file, so characters that hang outside their enclosing tfm box might confuse it ๐ต The bounding box may also be a little too loose if a character glyph has big left or right side bearings ๐ Still, this option is great for making small EPSF files for equations, tables, or things like that ๐ซถ (Heads up though, dvips output depends on resolution, so it's not the best for EPSF files, especially if the images are getting scaled; use these EPSF files with a LOT of care ๐)-fโ ๐ฐ Runs as a filter ๐ It reads the.dvifile from standard input and writes the PostScript to standard output ๐ Standard input has to be seekable, so it can't be a pipe ๐ If you absolutely must use a pipe, write a shell script that copies the pipe output into a temporary file, then points dvips at that file ๐ง This option also turns off the automatic reading of thePRINTERenvironment variable ๐ and disables the automatic sending of Control-D if it was turned on with-For in the configuration file ๐ฅ If you want both, put-Fafter this option ๐-Fโ โ ๏ธ Appends Control-D (ASCII code 4) as the very last character of the PostScript file ๐จ๏ธ This is handy when dvips is driving the printer directly instead of going through a spooler, which is common on super tiny systems ๐ธ > ๐ NOTE! DO NOT USE THIS OPTION! ๐ It's a hard no, bestie ๐ญ-Gโ ๐ค Shifts non-printing characters to higher-numbered positions ๐ This might come in handy sometimes โจ-h nameโ ๐ Prependsnameas an additional header file ๐ (But if the name is just-, all header files get suppressed from the output ๐) This header file gets added to the PostScriptuserdict๐-iโ โ๏ธ Makes each section its own separate file ๐ Sometimes dvips splits the document into "sections" to process them independently, usually for memory reasons ๐ง With this option, each section goes into its own file ๐ The new file names replace the suffix of the output file name with a three-digit sequence number ๐ข This is most often used together with the-Soption, which sets the maximum section length in pages ๐ For example, some phototypesetters can't print more than ten or so consecutive pages before they run out of steam ๐ฉ So you can use these options to automatically split a book into ten-page sections, each in its own file ๐๐ฆ-jโ โฌ๏ธ Downloads only the needed characters from Type 1 fonts ๐ This is the default in the current release โจ Some debugging flags can trace this operation ๐ You can also control partial downloading on a per-font basis, using thepsfonts.mapfile ๐บ๏ธ-kโ โ๏ธ Prints crop marks ๐ This makes the paper size bigger by half an inch in each dimension ๐ (So you should set the paper size, either with a paper size special or the-Toption ๐ธ) It moves each page over by a quarter inch and draws cross-style crop marks โ It's mostly useful with typesetters that can set the page size automatically ๐ค-Kโ ๐งน Removes comments from included PostScript graphics, font files, and headers ๐ซง Sometimes this is necessary to dodge bugs in spoolers or PostScript post-processing programs ๐ The%%Pagecomments, if left in, often cause trouble ๐ญ Using this flag can break some included graphics, though, since the PostScript header macros from some software packages read parts of the input stream line by line, looking for a specific comment ๐ This option is off by default, because PostScript previewers and spoolers have been getting way better ๐-l numโ ๐ The last page printed will be the first one numberednum๐ฏ The default is the last page in the document ๐ Ifnumhas an equals sign in front of it, then it (and any argument to the-poption) is treated as a sequence number, instead of a value to compare with\count0values ๐ง So-l =9will end with the ninth page of the document, no matter what the pages are actually numbered ๐ข On the flip side, ifnumhas.SEQtacked on the end, the SEQth occurrence ofnumis used ๐ For example,-l 99.2says to end processing with the second page numbered 99 in the document ๐ฆ-mโ ๐ฅ Specifies manual feed for the printer ๐จ๏ธโจ-mode modeโ ๐ง Usesmodeas the Metafont device name for path searching and font generation ๐ This overrides any value from configuration files ๐ With the default paths, explicitly specifying the mode also makes the program assume the fonts live in a subdirectory namedmode๐๏ธ-Mโ ๐ซ Turns off the automatic font generation facility ๐ โโ๏ธ If any fonts are missing, commands to generate them get appended to the filemissfont.login the current directory ๐ You can then run that file and delete it to make the missing fonts ๐ง-n numโ ๐ข At mostnumpages will be printed ๐ The default is 100000 ๐ฏ-Nโ ๐ โโ๏ธ Turns off structured comments ๐ This might be needed on some systems that try to interpret PostScript comments in weird ways, or on some PostScript printers ๐จ๏ธ Old versions of TranScript in particular can't handle modern Encapsulated PostScript ๐ญ-noomegaโ ๐ Disables the use of Omega extensions when interpreting DVI files ๐ By default, the extra opcodes 129 and 134 are recognized by dvips as Omega or pTeX extensions, and get interpreted as requests to set 2-byte characters ๐-noptexโ ๐ฏ๐ต Disables the use of pTeX extensions when interpreting DVI files ๐ธ By default, the extra opcodes 130 and 135 are recognized by dvips as pTeX extensions, and get interpreted as requests to set 3-byte characters ๐ฆ The opcode 255 is a request to change the typesetting direction ๐งญ
The only drawback is that the virtual font array will (at least temporarily) need 65536 or more positions, instead of the default 256 positions ๐ฅบ So the memory requirements of dvips will be somewhat larger ๐ง If you find that unacceptable, or you run into another problem with the Omega or pTeX extensions, you can switch off the pTeX extension with -noptex, or both with -noomega ๐ (But please do send a bug report if you find such problems ๐ โ see the bug address in the AUTHORS section below ๐ซถ)
-o nameโ okay so this one sends the output to a file calledname๐ If you don't give it a name (so-ois the last thing on the command line), it defaults tofile.ps, where the input wasfile.dvi๐ฆ If you skip this option, whatever default lives in the config file gets used instead โจ Here's the cute bit: if the first character of the output name is an exclamation mark!, the rest gets handed to popen, so!lprwill just queue the file for printing ๐จ๏ธ This option also turns off the automatic reading of the PRINTER environment variable, and it switches off the automatic sending of control D if you turned that on with-For in the config file ๐ Want both? Put-Fafter this option ๐ซถ-O offsetโ bestie, this one moves the origin by a set amount ๐ธ The offset is a comma-separated pair of dimensions, like.1in,-.3cm, using the same syntax as the papersize special ๐ The default origin sits one inch down and one inch to the right from the upper left corner of the paper, and this shifts it from there by the amount you give ๐-p numโ just like-l, but it only applies to the first page in the document ๐ท-pp pagelistโ this is your page picker ๐ You can give a comma-separated list of pages and ranges (a-b), and those get interpreted as\count0values ๐ Any page you don't list simply won't print ๐ญ You can use multiple-ppoptions, or squish all your pages and ranges into one-ppoption, whatever feels right ๐ซถ-P printernameโ this sets up the output for your chosen printer ๐จ๏ธ It works by reading inconfig.printername, which can set the output pipe (like!lpr -Pprintername), the font paths, and any otherconfig.psdefaults for just that printer ๐ฆ Heads up,config.psgets read beforeconfig.printernameโจ Also, right afterconfig.ps, dvips searches for a file called~/.dvipsrc, which is meant for your personal defaults ๐ If you don't use-P, the PRINTER environment variable gets checked, and if that variable exists and a matching configuration file exists too, that file gets read in ๐-qโ quiet mode, no chatter ๐คซ It won't tell you about pages converted or anything like that, and it only reports errors to standard error ๐-rโ stacks the pages in reverse order ๐ Normally page 1 prints first, so this flips it ๐-R[0|1|2]โ the security settings, bestie, and they matter ๐-R2disables shell command execution inside\special'{}(via backticks`), disables config files (via theEoption), and blocks opening any absolute filenames ๐-R1is the default: it forbids shell escapes but still allows absolute filenames ๐ซถ-R0allows both ๐ฌ The config file option is z-sโ wraps the entire global output in a save/restore pair ๐ > Not truly conformant, so it's not recommended! It's only useful if you're driving the printer directly and don't care too much about the output being portable ๐-S numโ sets the maximum number of pages in eachsection๐ This one is most commonly paired with the-ioption, so check out that documentation for more info ๐ง-t papertypeโ sets the paper type topapertype๐ That papertype should be defined in one of the config files, along with the code that selects it ๐ฆ Known types right now include letter, legal, ledger, a4, and a3 โจ You can also use-t landscapeto rotate the document by 90 degrees ๐ธ If your document isn't letter-sized and you want it rotated, use-ttwice: once for the page size, and once for landscape ๐ Don't use any-toption when the DVI file already has a papersize special, like the ones some LaTeX packages add, notably hyperref.sty ๐ โโ๏ธ
The upper left corner of each page in the .dvi file gets placed one inch from the left and one inch from the top ๐ท How well this option works depends heavily on the config file ๐ Also, running the letter, a4, or other PostScript operators makes the document nonconforming and can stop it from printing on certain printers ๐ญ So the paper size should avoid executing those operators if at all possible ๐
-T papersizeโ sets the paper size to the pair of dimensions you give ๐ It takes its arguments in the same style as-O, and it overrides any paper size special in the dvi file ๐-u psmapfileโ setspsmapfileas the file dvips uses to look up PostScript font aliases ๐บ๏ธ Ifpsmapfilestarts with a+, the rest of the name is the map file's name, and that map file gets added to the list of map files instead of replacing it ๐ Either way, ifpsmapfilehas no extension,.mapgets tacked onto the end ๐ฆ-Uโ disables a PostScript virtual memory saving optimization that stores the character metric info in the same string as the bitmap info ๐ This is only needed when you're driving the Xerox 4045 PostScript interpreter ๐จ๏ธ That interpreter has a bug that leavesgarbageon the bottom of each character ๐ > Not recommended unless you absolutely must drive this printer!-vโ prints the dvips version number and exits ๐ข-Vโ downloads non-resident PostScript fonts as bitmaps ๐ This needsgsftopkorpstopkor some other program like that to generate the required bitmap fonts ๐ง Good news, these programs come with dvips โจ-x numโ sets the magnification ratio tonum/1000๐ It overrides the magnification in the .dvi file ๐ซถnumhas to be between 10 and 100000 ๐ It doesn't have to be a whole number either, you can use a real number for extra precision ๐-X numโ sets the horizontal resolution tonumdots per inch โ๏ธ-y numโ sets the magnification ratio tonum/1000times the magnification in the .dvi file ๐ Check out-xabove for more on this ๐ฆ-Y numโ sets the vertical resolution tonumdots per inch โ๏ธ-zโ passes html hyperdvi specials through to the output so they can eventually get distilled into PDF ๐ This isn't on by default, which avoids including header files unnecessarily and avoids using temporary files when making the output ๐ โโ๏ธ-Zโ compresses bitmapped fonts before they get downloaded, which shrinks the PostScript font-downloading info ๐๏ธ It's especially handy at high resolutions or with really big fonts ๐ Heads up, it'll slow printing down a bit, especially on early 68000-based PostScript printers ๐ข
โจ SEE ALSO โจ
afm2tfm(1), tex(1), mf(1), dvitype(1), lpr(1), dvips.texi, https://tug.org/dvips. ๐
๐ธ ENVIRONMENT ๐ธ
Dvipsk uses the same environment variables and algorithms for finding font files as TeX and its friends do ๐ง For all the details, check out the documentation for the Kpathsea library. (Repeating it here would be way too cumbersome ๐)
KPATHSEA_DEBUGโ traces Kpathsea lookups; set it to-1for complete tracing ๐PRINTERโ see above ๐จ๏ธ
NOTES
PostScript is a registered trademark of Adobe Systems Incorporated. โข๏ธ
AUTHOR
Tomas Rokicki wrote it, and Don Knuth extended it to virtual fonts ๐ Karl Berry handled the path searching and configuration modifications ๐ซถ
Maintained in TeX Live! For bug reports or other correspondence, email tex-k@tug.org (https://lists.tug.org/tex-k) ๐
Okay bestie, that's the whole DVIPS(1) page, last updated 24 October 2021 ๐ฆ๐ Go print something iconic โจ๐จ๏ธ
๐ฆ where this page comes from
- alpine 3.24: texmf-dist-doc 2026.0-r0 ยท LPPL-1.0 AND LPPL-1.1 AND LPPL-1.2 AND LPPL-1.3a AND LPPL-1.3c AND GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms