Go to the first, previous, next, last section, table of contents.

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 section `Supported file formats' in Kpathsea.
  2. `$HOME/.dvipsrc' is loaded, so individual users can override any options set in the global file.
  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.
  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' 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 `MakeTeXPK' cannot resolve), and (2) let command-line options override config files where possible.


Go to the first, previous, next, last section, table of contents.