This is Info file dvips.info, produced by Makeinfo version 1.68 from the input file dvips.texi. INFO-DIR-SECTION TeX START-INFO-DIR-ENTRY * DVI-to-Postscript: (dvips). Translating TeX DVI files to PostScript. * afm2tfm: (dvips)Invoking afm2tfm. Making Type 1 fonts available to TeX. * dvips: (dvips)Invoking Dvips. DVI-to-PostScript translator. END-INFO-DIR-ENTRY  File: dvips.info, Node: Top, Next: Why Dvips, Up: (dir) Dvips ***** This manual documents Dvips, a program to translate a DVI file into PostScript. It corresponds to version 5.66a (February 1997) of the Dvipsk distribution, a slightly modified variant of the original Dvips program with path searching rules consistent with the Web2c TeX implementation, the GNU font utilities, Xdvik, and Dviljk. * Menu: * Why Dvips:: Why use Dvips? * Installation:: How to compile and install Dvips. * Invoking Dvips:: Command-line options, configuration files, etc. * Paper size and landscape:: Changing the paper dimensions. * Interaction with PostScript:: TeX meets Dvips meets PostScript. * PostScript fonts:: Installing and using PostScript fonts. * Color:: Using color with Dvips. * Index:: General index.  File: dvips.info, Node: Why Dvips, Next: Installation, Prev: Top, Up: Top Why use Dvips? ************** The Dvips program has a number of features that set it apart from other PostScript drivers for TeX. This rather long section describes the advantages of using Dvips, and may be skipped if you are just interested in learning how to use the program. *Note Installation::, for details of compilation and installation. The Dvips driver generates excellent, standard PostScript, that can be included in other documents as figures or printed through a variety of spoolers. The generated PostScript requires very little printer memory, so very complex documents with a lot of fonts can easily be printed even on PostScript printers without much memory, such as the original Apple LaserWriter. The PostScript output is also compact, requiring less disk space to store and making it feasible as a transfer format. Even those documents that are too complex to print in their entirety on a particular printer can be printed, since Dvips will automatically split such documents into pieces, reclaiming the printer memory between each piece. The Dvips program supports graphics in a natural way, allowing PostScript graphics to be included and automatically scaled and positioned in a variety of ways. Printers with any resolution are supported, even if they have different resolutions in the horizontal and vertical directions. High resolution output is supported for typesetters, including an option that compresses the bitmap fonts so that typesetter virtual memory is not exhausted. This option also significantly reduces the size of the PostScript file and decoding in the printer is very fast. Missing fonts can be automatically generated if Metafont exists on the system, or fonts can be converted from GF to PK format on demand. If a font cannot be generated, a scaled version of the same font at a different size can be used instead, although Dvips will complain loudly about the poor aesthetics of the resulting output. Users will appreciate features such as collated copies and support for `tpic', `psfig', `emtex', and `METAPOST'; system administrators will love the support for multiple printers, each with their own configuration file, and the ability to pipe the output directly to a program such as `lpr'. Support for MS-DOS, OS/2, and VMS in addition to Unix is provided in the standard distribution, and porting to other systems is easy. One of the most important features is the support of virtual fonts, which add an entirely new level of flexibility to TeX. Virtual fonts are used to give Dvips its excellent PostScript font support, handling all the font remapping in a natural, portable, elegant, and extensible way. Dvips even comes with its own Afm2tfm program that creates the necessary virtual fonts and TeX font metric files automatically from the Adobe font metric files. Source is provided and freely distributable, so adding a site-specific feature is possible. Adding such features is made easier by the highly modular structure of the program. There is really no reason to use another driver, and the more people use Dvips, the less time will be spent fighting with PostScript and the more time will be available to create beautiful documents. So if you don't use Dvips on your system, get it today. Tom Rokicki wrote and maintains the original Dvips program.  File: dvips.info, Node: Installation, Next: Invoking Dvips, Prev: Why Dvips, Up: Top Installation ************ (A copy of this chapter is in the distribution file `dvipsk/INSTALL'.) Installing Dvips is mostly the same as installing any Kpathsea-using program. Therefore, for the basic steps involved, *note Installation: (kpathsea)Installation.. (A copy is in the file `kpathsea/INSTALL'.) For solutions to common installation problems and information on how to report a bug, see the file `kpathsea/BUGS' (*note Bugs: (kpathsea)Bugs.). For solutions to Dvips-specific problems, *note Debug options::.. Also see the Dvips home page at `http://www.radicaleye.com/dvips'. Dvips does require some additional installation, detailed in the sections below. Also, to configure color devices, *note Color device configuration::.. * Menu: * config.ps installation:: Printer and site Dvips configuration. * PostScript font installation:: Many PostScript fonts are freely available. * Ghostscript installation:: A free PostScript interpreter. * Diagnosing problems:: Some common runtime difficulties.  File: dvips.info, Node: config.ps installation, Next: PostScript font installation, Up: Installation `config.ps' installation ======================== Dvips has its own configuration files: a file `config.ps' for sitewide defaults, and a file `config.PRINTER' for each printer (output device). Since these are site-specific, `make install' does not create them; you must create them yourself. (These Dvips configuration files are independent of the Kpathsea onfiguration file `texmf.cnf' (*note Config files: (kpathsea)Config files.). Dvips configuration files contents and searching are described fully in *Note Config files::. The simplest way to create a new configuration file is to copy and modify the file `dvipsk/contrib/config.proto', seasoning with options to your taste from *Note Config files::. Here is `config.proto' for your reading pleasure: % Prototype Dvips configuration file. % How to print, maybe with lp instead lpr, etc. o |lpr % Default resolution of this device, in dots per inch. D 600 % Metafont mode. (This is completely different from the -M command-line % option, which controls whether MakeTeXPK is invoked.) Get % `ftp://ftp.tug.org/tex/modes.mf' for a list of mode names. This mode % and the D number above must agree, or MakeTeXPK will get confused. M ljfour % Memory available. Download the three-line PostScript file: % %! Hey, we're PostScript % /Times-Roman findfont 30 scalefont setfont 144 432 moveto % vmstatus exch sub 40 string cvs show pop showpage % to determine this number. (It will be the only thing printed.) m 3500000 % Correct printer offset. You can use testpage.tex from the LaTeX % distribution to find these numbers. Print testpage.dvi more than once. O 0pt,0pt % Partially download Type 1 fonts by default. Only reason not to do % this is if you encounter bugs. (Please report them to % if you do.) j % Also look for fonts at these resolutions. R 300 600 % With a high resolution and a RISC cpu, better to compress the bitmaps. Z % Uncomment these if you have and want to use PostScript versions of the % fonts. %p +cmfonts.map %p +lafonts.map %p +cyrfonts.map %p +eufonts.map % You will also want definitions for alternative paper sizes -- A4, % legal, and such. Examples in `contrib/papersize.level2' and % `contrib/papersize.simple'.  File: dvips.info, Node: PostScript font installation, Next: Ghostscript installation, Prev: config.ps installation, Up: Installation PostScript font installation ============================ To use PostScript fonts with TeX and Dvips, you need both metric files (`.tfm' and `.vf') and the outlines (`.pfa' or `.pfb'). *Note Font concepts::. To support the basic PostScript font set, the recommended (and simplest) approach is to retrieve `ftp://ftp.tug.org/tex/psfonts.tar.gz' and unpack it in your `$(fontdir)' directory (`/usr/local/share/texmf/fonts' by default). This archive contains metrics, outlines, and bitmaps (for previewing) for the 35 de facto standard fonts donated by URW and the additional high-quality freely available PostScript fonts donated by Adobe, Bitstream, and URW, including geometrically-created variants such as oblique and small caps. `CTAN:/fonts/psfonts' contains support for many additional fonts for which you must buy outlines (Adobe, Bigelow & Holmes, Monotype, Softkey, Y&Y). `psfonts.tar.gz' is a small extract from this directory. (For CTAN info, *note unixtex.ftp: (kpathsea)unixtex.ftp.; a copy is in the top-level file `INSTALL'.) If you have additional PostScript fonts, you can make them available to Dvips by (1) giving them with appropriate filenames; and (2) running Afm2tfm (*note Making a font available::.) to make TFM and VF metrics for TeX and Dvips to use. Also add them to `psfonts.map' if necessary (*note psfonts.map::.); it contains everything contained in `psfonts.tar.gz' and most fonts that come with Unix systems. Following are locations for vendor-supplied fonts. Please mail if you find fonts elsewhere on your system. DEC Ultrix /usr/lib/DPS/outline/decwin DEC Digital Unix /usr/lib/X11/fonts/Type1Adobe HP HP-UX 9, 10 /usr/lib/X11/fonts/type1.st/typefaces IBM AIX /usr/lpp/DPS/fonts/outlines /usr/lpp/X11/lib/X11/fonts/Type1 /usr/lpp/X11/lib/X11/fonts/Type1/DPS NeXT /NextLibrary/Fonts/outline SGI IRIX /usr/lib/DPS/outline/base /usr/lib/X11/fonts/Type1 Sun SunOS 4.x (NeWSprint only) newsprint_2.5/SUNWsteNP/reloc/$BASEDIR/ NeWSprint/small_openwin/lib/fonts /usr/openwin/lib/X11/fonts/Type1/outline Sun Solaris 2 /usr/openwin/lib/X11/fonts/Type1/outline VMS SYS$COMMON:[SYSFONT.XDPS.OUTLINE] The NeXT system supplies more fonts than any others, but there's a lot of overlap. Finally, if you have an Hewlett-Packard printer, you should be able to get Type 1 font files for the standard 35 fonts from HP, if the freely available URW Type 1's do not satisfy for whatever reason. The phone number for HP Printer Drivers is (in the United States) 303-339-7009. The driver set to ask for is Adobe Type Manager 2.51, and the disk set number is `MP210en3'. Mentioning anything other than Microsoft Windows when you ask for the driver set will likely lead to great confusion on the other end.  File: dvips.info, Node: Ghostscript installation, Next: Diagnosing problems, Prev: PostScript font installation, Up: Installation Ghostscript installation ======================== Ghostscript is a PostScript interpreter freely available to end-users, written by Peter Deutsch. It can read the PostScript produced by Dvips and render it on your monitor, or for another device (e.g., an Epson printer) that does not support PostScript, or in PDF format. The latest version is available via `http://www.cs.wisc.edu/~ghost/index.html' and `ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/'. A somewhat older version of Ghostscript is available under the GNU General Public License, free to everyone. You can get that from `ftp://prep.ai.mit.edu/pub/gnu/'. The program Ghostview, written by Tim Theisen, provides typical previewing capabilities (next page/previous page, magnification, etc.). It requires Ghostscript to run, and files in structured Postscript, specifically with `%%Page' comments (no `N' in `config.ps'). You can get Ghostview from the same places as Ghostscript.  File: dvips.info, Node: Diagnosing problems, Prev: Ghostscript installation, Up: Installation Diagnosing problems =================== You've gone through all the trouble of installing Dvips, carefully read all the instructions in this manual, and still can't get something to work. The following sections provide some helpful hints if you find yourself in such a situation. For details on effective bug reporting, common installation problems, and `mktexpk' problems, *note Bugs: (kpathsea)Bugs.. * Menu: * Debug options:: Getting diagnostics. * No output:: No output at all. * Small or inverted:: Output too small or inverted. * Printer errors:: The printer sends back errors. * Long documents fail:: Long documents fail to print. * Including graphics fails:: Figures don't work.  File: dvips.info, Node: Debug options, Next: No output, Up: Diagnosing problems Debug options ------------- The `-d' flag to Dvips helps in tracking down certain errors. The parameter to this flag is an integer that tells what errors are currently being tracked. To track a certain class of debug messages, simply provide the appropriate number given below; if you wish to track multiple classes, sum the numbers of the classes you wish to track. To track all classes, you can use `-1'. Another useful value is `3650', which tracks everything having to do with file searching and opening. Some of these debugging options are actually provided by Kpathsea (*note Debugging: (kpathsea)Debugging.). The classes are: 1 specials 2 paths 4 fonts 8 pages 16 headers 32 font compression 64 files 128 config files 256 Partial Type 1 font encoding vectors 512 Partial Type 1 subr calls 1024 Kpathsea `stat' calls 2048 Kpathsea hash table lookups 4096 Kpathsea path element expansion 8192 Kpathsea path searches  File: dvips.info, Node: No output, Next: Small or inverted, Prev: Debug options, Up: Diagnosing problems No output at all ---------------- If you are not getting any output at all, even from the simplest one-character file (for instance, `\ \bye'), then something is very wrong. Practically any file sent to a PostScript laser printer should generate some output, at the very least a page detailing what error occurred, if any. Talk to your system administrator about downloading a PostScript error handler. (Adobe distributes a good one called `ehandler.ps'.) It is possible, especially if you are using non-Adobe PostScript, that your PostScript interpreter is broken. Even then it should generate an error message. Dvips tries to work around as many bugs as possible in common non-Adobe PostScript interpreters, but doubtless it misses a few. PowerPage Revision 1, Interpreter Version 20001.001, on a Mitsubishi Shinko CHC-S446i color thermal dye sublimation printer is known to be unable to print with any but builtin fonts. If Dvips gives any strange error messages, or compilation on your machine generated a lot of warnings, perhaps the Dvips program itself is broken. Try using the debug options to determine where the error occurred (*note Debug options::.). It is possible your spooler is broken and is misinterpreting the structured comments. Try the `-N' flag to turn off structured comments and see what happens.  File: dvips.info, Node: Small or inverted, Next: Printer errors, Prev: No output, Up: Diagnosing problems Output too small or inverted ---------------------------- If some documents come out inverted or too small, probably your spooler is not supplying an end of job indicator at the end of each file. (This commonly happens on small machines that don't have spoolers.) You can force Dvips to do this with the `-F' flag (or `F' config file option), but this generates files with a terminating binary character (control-D). You can also try using the `-s' flag (or `s' config file option) to enclose the entire job in a save/restore pair. *Note Command-line options::, and *Note Config files::.  File: dvips.info, Node: Printer errors, Next: Long documents fail, Prev: Small or inverted, Up: Diagnosing problems Error messages from printer --------------------------- If your printer returns error messages, the error message gives very good information on what might be going wrong. One of the most common error messages is `bop undefined'. This is caused by old versions of Transcript and other spoolers that do not properly parse the setup section of the PostScript. To fix this, turn off structured comments with the `-N' option, but it'd be best to get your spooling software updated. Another error message is `VM exhausted'. Some printers indicate this error by locking up, others quietly reset. This is caused by Dvips thinking that the printer has more memory than it actually does, and then printing a complicated document. To fix this, try lowering the `m' parameter in the configuration file; use the debug option to make sure you adjust the correct file. Other errors may indicate you are trying to include graphics that don't nest properly in other PostScript documents, among other things. Try the PostScript file on a QMS PS-810 or other Adobe PostScript printer if you have one, or Ghostscript (*note Ghostscript installation::.); it might be a problem with the printer itself.  File: dvips.info, Node: Long documents fail, Next: Including graphics fails, Prev: Printer errors, Up: Diagnosing problems Long documents fail to print ---------------------------- This is usually caused by incorrectly specifying the amount of memory the printer has in the configuration file; see the previous section.  File: dvips.info, Node: Including graphics fails, Prev: Long documents fail, Up: Diagnosing problems Including graphics fails ------------------------ The most common problem with including graphics is an incorrect bounding box (*note Bounding box::.). Complain to whoever wrote the software that generated the file if the bounding box is indeed incorrect. Another possible problem is that the figure you are trying to include does not nest properly; there are certain rules PostScript applications must follow when generating files to be included. The Dvips program includes work-arounds for such errors in Adobe Illustrator and other programs, but there are certainly applications that haven't been tested. One possible thing to try is the `-K' flag which strips the comments from an included figure. This might be necessary if the PostScript spooling software does not read the structured comments correctly. Use of this flag will break graphics from some applications, though, since some applications read the PostScript file from the input stream, looking for a particular comment. Any application which generates graphics output containing raw binary (not ASCII hex) will probably fail with Dvips.  File: dvips.info, Node: Invoking Dvips, Next: Paper size and landscape, Prev: Installation, Up: Top Invoking Dvips ************** Dvips reads a DVI file as output by (for example) TeX, and converts it to PostScript, taking care of builtin or downloaded PostScript fonts, font reencoding, color, etc. These features are described in other chapters in this document. There many ways to control Dvips' behavior: configuration files, environment variables, and command-line options. * Menu: * Basic usage:: * Command-line options:: * Environment variables:: * Config files::  File: dvips.info, Node: Basic usage, Next: Command-line options, Up: Invoking Dvips Basic usage of Dvips ==================== To use Dvips at its simplest, simply type dvips foo where `foo.dvi' is the output of TeX that you want to print. If Dvips has been installed correctly, the document will probably roll out of your default printer. If you use fonts that have not been used on your system before, they may be automatically generated; this process can take a few minutes, so progress reports appear by default. The next time that document is printed, these fonts will have been saved in the proper directories, so printing will go much faster. (If Dvips tries to endlessly generate the same fonts over and over again, it hasn't been installed properly. *Note Unable to generate fonts: (kpathsea)Unable to generate fonts.) Many options are available (see the next section). For a brief summary of available options, just type dvips --help  File: dvips.info, Node: Command-line options, Next: Environment variables, Prev: Basic usage, Up: Invoking Dvips Command-line options ==================== Dvips has a plethora of command line options. Reading through this section will give a good idea of the capabilities of the driver. * Menu: * Option summary:: Quick listing, from Dvips -help. * Option details:: More information about each option.  File: dvips.info, Node: Option summary, Next: Option details, Up: Command-line options Option summary -------------- Here is a handy summary of the options; it is printed out when you run Dvips with no arguments or with the standard `--help' option. Usage: dvips [OPTION]... FILENAME[.dvi] Translate the given DVI file to PostScript. a* Conserve memory, not time A Print only odd (TeX) pages b # Page copies, e.g., for posters B Print only even (TeX) pages c # Uncollated copies C # Collated copies d # Debugging D # Resolution e # Maxdrift value E* Create minimal EPSF f* Run as filter F* Send control-D at end h f Add header file f H f Same as h i* Separate file per section j* Partially download Type 1's k* Print crop marks K* Pull comments from inclusions l # Last page m* Manual feed M* Don't make fonts n # Maximum number of pages N* No structured comments o f Output file O c Set/change paper offset p # First page P s Load config.$s q* Run quietly r* Reverse order of pages R Run securely s* Enclose output in save/restore S # Max section size in pages t s Paper format T c Specify desired page size U* Disable string param trick V* Send downloadable PS fonts as PK x # Override dvi magnification X # Horizontal resolution y # Multiply by dvi magnification Y # Vertical resolution z* Hyperdvi to HyperPostScript Z* Compress bitmap fonts - Query interactively for options pp #-# First-last page mode s Set mode to s # = number f = file s = string * = suffix, 0 to turn off c = comma-separated dimension pair (e.g., 3.1in,-41.5cm) Email bug reports to tex-k@mail.tug.org.  File: dvips.info, Node: Option details, Prev: Option summary, Up: Command-line options Option details -------------- Many of the parameterless options listed here can be turned off by suffixing the option with a zero (`0'); for instance, to turn off page reversal, use `-r0'. Such options are marked with a trailing `*'. `-' Read additional options from standard input after processing the command line. `--help' Print a usage message and exit. `--version' Print the version number and exit. `-a*' Conserve memory by making three passes over the DVI file instead of two and only loading those characters actually used. Generally only useful on machines with a very limited amount of memory, like some PCs. `-A' Print only the odd pages. This option uses TeX page numbers, not physical page numbers. `-b NUM' Generate NUM copies of each page, but duplicating the page body rather than using the `/#copies' PostScript variable. This can be useful in conjunction with a header file setting `bop-hook' to do color separations or other neat tricks. `-B' Print only the even pages. This option uses TeX page numbers, not physical page numbers. `-c NUM' Generate NUM consecutive copies of every page, i.e., the output is uncollated. This merely sets the builtin PostScript variable `/#copies'. `-C NUM' Generate NUM copies, but collated (by replicating the data in the PostScript file). Slower than the `-c' option, but easier on the hands, and faster than resubmitting the same PostScript file multiple times. `-d NUM' Set the debug flags, showing what Dvips (thinks it) is doing. This will work unless Dvips has been compiled without the `DEBUG' option (not recommended). *Note Debug options::, for the possible values of NUM. Use `-d -1' as the first option for maximum output. `-D NUM' Set both the horizontal and vertical resolution to NUM, given in dpi (dots per inch). This affects the choice of bitmap fonts that are loaded and also the positioning of letters in resident PostScript fonts. Must be between 10 and 10000. This affects both the horizontal and vertical resolution. If a high resolution (something greater than 400 dpi, say) is selected, the `-Z' flag should probably also be used. If you are using fonts made with Metafont, such as Computer Modern, `mktexpk' needs to know about the value for NUM that you use or Metafont will fail. See the file `ftp://ftp.tug.org/tex/modes.mf' for a list of resolutions and mode names for most devices. `-e NUM' Maximum drift in pixels of each character from its `true' resolution-independent position on the page. The default value of this parameter is resolution dependent (it is the number of entries in the list [100, 200, 300, 400, 500, 600, 800, 1000, 1200, 1600, 2000, 2400, 2800, 3200, ...] that are less than or equal to the resolution in dots per inch). Allowing individual characters to `drift' from their correctly rounded positions by a few pixels, while regaining the true position at the beginning of each new word, improves the spacing of letters in words. `-E*' Generate an EPSF file with a tight bounding box. This only looks at marks made by characters and rules, not by any included graphics. In addition, it gets the glyph metrics from the TFM file, so characters that print outside their enclosing TFM box may confuse it. In addition, the bounding box might be a bit too loose if the character glyph has significant left or right side bearings. Nonetheless, this option works well enough for creating small EPSF files for equations or tables or the like. (Of course, Dvips output, especially when using bitmap fonts, is resolution-dependent and thus does not make very good EPSF files, especially if the images are to be scaled; use these EPSF files with care.) For multiple page input files, also specify `-i' to get each page as a separate EPSF file; otherwise, all the pages are overlaid in the single output file. `-f*' Run as a filter. Read the DVI file from standard input and write the PostScript to standard output. The standard input must be seekable, so it cannot be a pipe. If your input must be a pipe, write a shell script that copies the pipe output to a temporary file and then points Dvips at this file. This option also disables the automatic reading of the `PRINTER' environment variable; use `-P$PRINTER' after the `-f' to read it anyway. It also turns off the automatic sending of control-D if it was turned on with the `-F' option or in the configuration file; use `-F' after the `-f' to send it anyway. `-F*' Write control-D (ASCII code 4) as the very last character of the PostScript file. This is useful when Dvips is driving the printer directly instead of working through a spooler, as is common on personal systems. On systems shared by more than one person, this is not recommended. `-h NAME' Prepend NAME as an additional header file, or, if NAME is `-', suppress all header files. Any definitions in the header file get added to the PostScript `userdict'. `-i*' Make each section be a separate file; a "section" is a part of the document processed independently, most often created to avoid memory overflow. The filenames are created replacing the suffix of the supplied output file name by a three-digit sequence number. This option is most often used in conjunction with the `-S' option which sets the maximum section length in pages; if `-i' is specified and `-S' is not, each page is output as a separate file. For instance, some phototypesetters cannot print more than ten or so consecutive pages before running out of steam; these options can be used to automatically split a book into ten-page sections, each to its own file. `-j*' Download only needed characters from Type 1 fonts. This is the default in the current release. Some debugging flags trace this operation (*note Debug options::.). You can also control partial downloading on a per-font basis (*note psfonts.map::.). `-k*' Print crop marks. This option increases the paper size (which should be specified, either with a paper size special or with the `-T' option) by a half inch in each dimension. It translates each page by a quarter inch and draws cross-style crop marks. It is mostly useful with typesetters that can set the page size automatically. This works by downloading `crop.pro'. `-K*' Remove comments in included PostScript graphics, font files, and headers; only necessary to get around bugs in spoolers or PostScript post-processing programs. Specifically, the `%%Page' comments, when left in, often cause difficulties. Use of this flag can cause other graphics to fail, however, since the PostScript header macros from some software packages read portion the input stream line by line, searching for a particular comment. `-l [=]NUM' The last page printed will be the first one numbered NUM. Default is the last page in the document. If NUM is prefixed by an equals sign, then it (and the argument to the `-p' option, if specified) is treated as a physical (absolute) page number, rather than a value to compare with the TeX `\count0' values stored in the DVI file. Thus, using `-l =9' will end with the ninth page of the document, no matter what the pages are actually numbered. `-m*' Specify manual feed, if supported by the output device. `-mode MODE' Use MODE as 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 are in a subdirectory named MODE. *Note TeX directory structure: (kpathsea)TeX directory structure. If Metafont does not understand the MODE name, see *Note Unable to generate fonts: (kpathsea)Unable to generate fonts. `-M*' Turns off automatic font generation (`mktexpk'). If `mktexpk', the invocation is appended to a file `missfont.log' (by default) in the current directory. You can then execute the log file to create the missing files after fixing the problem. If the current directory is not writable and the environment variable or configuration file value `TEXMFOUTPUT' is set, its value is used. Otherwise, nothing is written. The name `missfont.log' is overridden by the `MISSFONT_LOG' environment variable or configuration file value. `-n NUM' Print at most NUM pages. Default is 100000. `-N*' Turns off generation of structured comments such as `%%Page'; this may be necessary on some systems that try to interpret PostScript comments in weird ways, or on some PostScript printers. Old versions of TranScript in particular cannot handle modern Encapsulated PostScript. Beware: This also disables page movement, etc., in PostScript viewers such as Ghostview. `-o NAME' Send output to the file NAME. If `-o' is specified without NAME, the default is `FILE.ps' where the input DVI file was `FILE.dvi'. If `-o' isn't given at all, the configuration file default is used. If NAME is `-', output goes to standard output. If the first character of NAME is `!' or `|', then the remainder will be used as an argument to `popen'; thus, specifying `|lpr' as the output file will automatically queue the file for printing as usual. (The MS-DOS version will print to the local printer device `PRN' when NAME is `|lpr' and a program by that name cannot be found.) `-o' disables the automatic reading of the `PRINTER' environment variable, and turns off the automatic sending of control-D. See the `-f' option for how to override this. `-O X-OFFSET,Y-OFFSET' Move the origin by X-OFFSET,Y-OFFSET, a comma-separated pair of dimensions such as `.1in,-.3cm' (*note papersize special::.). The origin of the page is shifted from the default position (of one inch down, one inch to the right from the upper left corner of the paper) by this amount. This is usually best specified in the printer-specific configuration file. This is useful for a printer that consistently offsets output pages by a certain amount. You can use the file `testpage.tex' to determine the correct value for your printer. Be sure to do several runs with the same `O' value--some printers vary widely from run to run. If your printer offsets every other page consistently, instead of every page, your best recourse is to use `bop-hook' (*note PostScript hooks::.). `-p [=]NUM' The first page printed will be the first one numbered NUM. Default is the first page in the document. If NUM is prefixed by an equals sign, then it (and the argument to the `-l' option, if specified) is treated as a physical (absolute) page number, rather than a value to compare with the TeX `\count0' values stored in the DVI file. Thus, using `-p =3' will start with the third page of the document, no matter what the pages are actually numbered. `-pp FIRST-LAST' Print pages FIRST through LAST; equivalent to `-p FIRST -l LAST', except that multiple `-pp' options accumulate, unlike `-p' and `-l'. The `-' separator can also be `:'. `-P PRINTER' Read the configuration file `config.PRINTER' (`PRINTER.cfg' on MS-DOS), which can set the output name (most likely `o |lpr -PPRINTER'), resolution, Metafont mode, and perhaps font paths and other printer-specific defaults. It works best to put sitewide defaults in the one master `config.ps' file and only things that vary printer to printer in the `config.PRINTER' files; `config.ps' is read before `config.PRINTER'. If no `-P' or `-o' is given, the environment variable `PRINTER' is checked. If that variable exists, and a corresponding `config.PRINTER' (`PRINTER.cfg' on MS-DOS) file exists, it is read. *Note Configuration file searching::. `-q*' Run quietly. Don't chatter about pages converted, etc. to standard output; report no warnings (only errors) to standard error. `-r*' Output pages in reverse order. By default, page 1 is output first. `-R' Run securely. This disables shell command execution in `\special' (via ``', *note Dynamic creation of graphics::.) and config files (via the `E' option, *note Configuration file commands::.), pipes as output files, and opening of any absolute filenames. `-s*' Enclose the output in a global save/restore pair. This causes the file to not be truly conformant, and is thus not recommended, but is useful if you are driving a deficient printer directly and thus don't care too much about the portability of the output to other environments. `-S NUM' Set the maximum number of pages in each `section'. This option is most commonly used with the `-i' option; see its description above for more information. `-t PAPERTYPE' Set the paper type to PAPERTYPE, usually defined in one of the configuration files, along with the appropriate PostScript code to select it (*note Config file paper sizes::.). You can also specify a PAPERTYPE of `landscape', which rotates a document by 90 degrees. To rotate a document whose paper type is not the default, you can use the `-t' option twice, once for the paper type, and once for `landscape'. `-T HSIZE,VSIZE' Set the paper size to (HSIZE,VSIZE), a comma-separated pair of dimensions such as `.1in,-.3cm' (*note papersize special::.). It overrides any paper size special in the DVI file. `-U*' Disable a PostScript virtual memory-saving optimization that stores the character metric information in the same string that is used to store the bitmap information. This is only necessary when driving the Xerox 4045 PostScript interpreter, which has a bug that puts garbage on the bottom of each character. Not recommended unless you must drive this printer. `-V*' Download non-resident PostScript fonts as bitmaps. This requires use of `mtpk' or `gsftopk' or `pstopk' or some combination thereof to generate the required bitmap fonts; these programs are supplied with Dvips. The bitmap must be put into `psfonts.map' as the downloadable file for that font. This is useful only for those fonts for which you do not have real outlines, being downloaded to printers that have no resident fonts, i.e., very rarely. `-x NUM' Set the x magnification ratio to NUM/1000. Overrides the magnification specified in the DVI file. Must be between 10 and 100000. It is recommended that you use standard magstep values (1095, 1200, 1440, 1728, 2074, 2488, 2986, and so on) to help reduce the total number of PK files generated. NUM may be a real number, not an integer, for increased precision. `-X NUM' Set the horizontal resolution in dots per inch to NUM. `-y NUM' Set the y magnification ratio to NUM/1000. See `-x' above. `-Y NUM' Set the vertical resolution in dots per inch to NUM. `-z*' Pass `html' hyperdvi specials through to the output for eventual distillation into PDF. This is not enabled by default to avoid including the header files unnecessarily, and use of temporary files in creating the output. *Note Hypertext::. `-Z*' Compress bitmap fonts in the output file, thereby reducing the size of what gets downloaded. Especially useful at high resolutions or when very large fonts are used. May slow down printing, especially on early 68000-based PostScript printers. Generally recommend today, and can be enabled in the configuration file (*note Configuration file commands::.).  File: dvips.info, Node: Environment variables, Next: Config files, Prev: Command-line options, Up: Invoking Dvips Environment variables ===================== Dvips looks for many environment variables, to define search paths and other things. The path variables are read as needed, after all configuration files are read, so they override values in the configuration files. (Except for `TEXCONFIG', which defines where the configuration files themselves are found.) *Note Path specifications: (kpathsea)Path specifications, for details of interpretation of path and other environment variables common to all Kpathsea-using programs. Only the environment variables specific to Dvips are mentioned here. `DVIPSFONTS' Default path to search for all fonts. Overrides all the font path config file options and other environment variables (*note Supported file formats: (kpathsea)Supported file formats.). `DVIPSHEADERS' Default path to search for PostScript header files. Overrides the `H' config file option (*note Configuration file commands::.). `DVIPSMAKEPK' Overrides `mktexpk' as the name of the program to invoke to create missing PK fonts. You can change the arguments passed to the `mktexpk' program with the `MAKETEXPK' environment variable; *note MakeTeX script arguments: (kpathsea)MakeTeX script arguments.. `DVIPSRC' Specifies the name of the startup file (*note Configuration file searching::.) which is read after `config.ps' but before any printer-specific configuration files. `DVIPSSIZES' Last-resort sizes for scaling of unfound fonts. Overrides the `R' definition in config files (*note Configuration file commands::.). `PRINTER' Determine the default printer configuration file. (Dvips itself does not use `PRINTER' to determine the output destination in any way.) `TEXCONFIG' Path to search for Dvips' `config.PRINTER' configuration files, including the base `config.ps'. Using this single environment variable, you can override everything else. (The printer-specific configuration files are called `PRINTER.cfg' on MS-DOS, but `config.ps' is called by that name on all platforms.) `TEXPICTS' Path to search for included graphics files. Overrides the `S' config file option (*note Configuration file commands::.). If not set, `TEXINPUTS' is looked for. *Note Supported file formats: (kpathsea)Supported file formats.  File: dvips.info, Node: Config files, Prev: Environment variables, Up: Invoking Dvips Dvips configuration files ========================= This section describes in detail the Dvips-specific `config.*' device configuration files (called `*.cfg' on MS-DOS), which override the `texmf.cnf' configuration files generic to Kpathsea which Dvips also reads (*note Config files: (kpathsea)Config files.). For information about installing these files, including a prototype file you can copy, *note config.ps installation::.. * Menu: * Configuration file searching:: Where config.* files are searched for. * Configuration file commands:: What can go in a config.* file.  File: dvips.info, Node: Configuration file searching, Next: Configuration file commands, Up: Config files Configuration file searching ---------------------------- The Dvips program loads many different configuration files, so that parameters can be set globally across the system, on a per-device basis, or individually by each user. 1. Dvips first reads (if it exists) `config.ps'; it is searched for along the path for Dvips configuration files, as described in *Note Supported file formats: (kpathsea)Supported file formats. 2. A user-specific startup file is loaded, so individual users can override any options set in the global file. The environment variable `DVIPSRC', if defined, is used as the specification of the startup file. If this variable is undefined, Dvips uses a platform-specific default name. On Unix Dvips looks for the default startup file under the name `$HOME/.dvipsrc', which is in the user's home directory. On MS-DOS and MS-Windows, where users generally don't have their private directories, the startup file is called `dvips.ini' and it is searched for along the path for Dvips configuration files (as described in *Note Supported file formats: (kpathsea)Supported file formats.); users are expected to set this path as they see fit for their taste. 3. The command line is read and parsed: if the `-PDEVICE' option is encountered, at that point `config.DEVICE' is loaded. Thus, the printer configuration file can override anything in the site-wide or user configuration file, and it can also override options in the command line up to the point that the `-P' option was encountered. (On MS-DOS, the printer configuration files are called `DEVICE.cfg', since DOS doesn't allow more than 3 characters after the dot in filenames.) 4. If no `-P' option was specified, and also the `-o' and `-f' command line options were not used, Dvips checks the environment variable `PRINTER'. If it exists, then `config.$PRINTER' (`$PRINTER.cfg' on MS-DOS) is loaded (if it exists). Because the `.dvipsrc' file is read before the printer-specific configuration files, individual users cannot override settings in the latter. On the other hand, the `TEXCONFIG' path usually includes the current directory, and can in any case be set to anything, so the users can always define their own printer-specific configuration files to be found before the system's. A few command-line options are treated specially, in that they are not overridden by configuration files: `-D' As well as setting the resolution, this unsets the mode, if the mode was previously set from a configuration file. If `config.$PRINTER' is read, however, any `D' or `M' lines from there will take effect. `-mode' This overrides any mode setting (`M' line) in configuration files. `-mode' does not affect the resolution. `-o' This overrides any output setting (`o' line) in configuration files. The purpose of these special cases is to (1) minimize the chance of having a mismatched mode and resolution (which `mktexpk' cannot resolve), and (2) let command-line options override config files where possible.