This is Info file dvips.info, produced by Makeinfo-1.64 from the input file /ade-src/contrib/unixtex/dvipsk/dvips.texi. START-INFO-DIR-ENTRY * DVIps: (dvips). DVI-to-PostScript translator. END-INFO-DIR-ENTRY File: dvips.info, Node: Invoking dvips, Next: Config File, Prev: PostScript fonts, Up: Top Invoking `dvips' **************** The dvips driver has a plethora of command line options. Reading through this section will give a good idea of the capabilities of the driver. Many of the parameterless options listed here can be turned off by immediately suffixing the option with a zero (0); for instance, to turn off page reversal if it is turned on by default, use `-r0'. The options that can be turned off in this way are `a', `f', `k', `i', `m', `q', `r', `s', `E', `F', `K', `M', `N', `U', and `Z'. This is a handy summary of the options; it is printed out when you run dvips with no arguments. This is dvipsk VERSION Copyright 1986, 1993 Radical Eye Software Usage: dvips [options] filename[.dvi] a* Conserve memory, not time y # Multiply by dvi magnification b # Page copies, for posters e.g. A Print only odd (TeX) pages c # Uncollated copies B Print only even (TeX) pages d # Debugging C # Collated copies e # Maxdrift value D # Resolution f* Run as filter E* Try to create EPSF h f Add header file F* Send control-D at end i* Separate file per section K* Pull comments from inclusions k* Print crop marks M* Don't make fonts l # Last page N* No structured comments m* Manual feed O c Set/change paper offset n # Maximum number of pages P s Load config.$s o f Output file R Run securely p # First page S # Max section size in pages q* Run quietly T c Specify desired page size r* Reverse order of pages U* Disable string param trick s* Enclose output in save/restore V* Send downloadable PS fonts as PK t s Paper format X # Horizontal resolution x # Override dvi magnification Y # Vertical resolution Z* Compress bitmap fonts pp #-# First-last page # = number f = file s = string * = suffix, `0' to turn off c = comma-separated dimension pair (e.g., 3.2in,-32.1cm) Ask for additional options from standard input. 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. `-c NUM' Generate NUM copies of every page. Default is 1. (For collated copies, see the `-C' option below.) `-b NUM' Generate NUM copies of each page, but duplicating the page body rather than using the `#numcopies' option. This can be useful in conjunction with a header file setting `\bop-hook' to do color separations or other neat tricks. `-d NUM' Set the debug flags. This is intended only for emergencies or for unusual fact-finding expeditions; it will work only if dvips has been compiled with the `DEBUG' option. *Note Debug Options::, for the possible values of NUM. Use a value of `-1', and specify the option first, for maximum output. `-e NUM' Make sure that each character is placed at most this many pixels 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. 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 you must use 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. `-h NAME' Prepend file NAME as an additional header file. (However, if the name is simply `-', suppress all header files from the output.) This header file gets added to the PostScript `userdict'. Make each section be a separate file. Under certain circumstances, dvips will split the document up into `sections' to be processed independently; this is most often done for memory reasons. Using this option tells dvips to place each section into a separate file; the new file names 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. 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. 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. `-l NUM' The last page printed will be the first one numbered NUM. Default is the last page in the document. If the NUM is prefixed by an equals sign, then it (and any argument to the `-p' option) is treated as a sequence number, rather than a value to compare with `\count0' values. Thus, using `-l =9' will end with the ninth page of the document, no matter what the pages are actually numbered. Specify manual feed for printer. `-mode MODE' Use MODE as the Metafont device name for path searching and generating fonts. 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 seems not to understand the MODE name, see *Note Unable to Generate Fonts::. `-n NUM' At most NUM pages will be printed. Default is 100000. `-o NAME' The output will be sent to file NAME. If no file name is given, the default name is `FILE.ps' where the `dvi' file was called `FILE.dvi'; if this option isn't given, any default in the configuration file is used. If the first character of the supplied output file 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. This option also 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. `-p NUM' The first page printed will be the first one numbered NUM. Default is the first page in the document. If the NUM is prefixed by an equals sign, then it (and any argument to the `-l' option) is treated as a sequence number, rather than a value to compare with `\count0' values. 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'. The `-' range separator can also be a `:'. Run quietly. Don't chatter about pages converted, etc.; report nothing but errors to standard error. Stack pages in reverse order. Normally, page 1 will be printed first. Causes the entire global output to be enclosed in a save/restore pair. This causes the file to not be truly conformant, and is thus not recommended, but is useful if you are driving the printer directly and don't care too much about the portability of the output. `-t PAPERTYPE' This sets the paper type to PAPERTYPE. The PAPERTYPE should be defined in one of the configuration files, along with the appropriate code to select it. See the documentation for `@'in the configuration file option descriptions. You can also specify `-t landscape', which rotates a document by 90 degrees. To rotate a document whose size is not letter, you can use the `-t' option twice, once for the page size, and once for `landscape'. The upper left corner of each page in the `dvi' file is placed one inch from the left and one inch from the top. Use of this option is highly dependent on the configuration file. Note that executing the `letter' or `a4' or other PostScript operators cause the document to be nonconforming and can cause it not to print on certain printers, so the default paper size should not execute such an operator if at all possible. `-x NUM' Set the 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. This option prints only the odd pages. This option uses the \TeX\ page numbering rather than the sequence page numbers. This option prints only the even pages. This option uses the \TeX\ page numbering rather than the sequence page numbers. `-C NUM' Create 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 resolution in dpi (dots per inch) to NUM. 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. Makes dvips attempt 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. In addition, it gets the glyph metrics from the `tfm' file, so characters that lie 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 for creating small EPSF files for equations or tables or the like. (Of course, `dvips' output 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 a great deal of care.) Causes Control-D (ASCII code 4) to be appended 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 extremely small systems. Otherwise, it is not recommended. This option causes comments in included PostScript graphics, font files, and headers to be removed. This is sometimes 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 some included graphics to fail, since the PostScript header macros from some software packages read portions of the input stream line by line, searching for a particular comment. This option has been turned off by default because PostScript previewers and spoolers have been getting better. Turns off the automatic font generation facility. If any fonts are missing, commands to generate the fonts are appended to the file `missfont.log' in the current directory; this file can then be executed to create the missing fonts. Turns off structured comments; this might 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. `-O OFFSET' Move the origin by a certain amount. The OFFSET is a comma-separated pair of dimensions, such as `.1in,-.3cm' (in the same syntax used in the `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. `-P PRINTERNAME' Sets up the output for the appropriate printer. This is implemented by reading in `config.PRINTERNAME', which can then set the output pipe (as in, `o !lpr -Pprintername') as well as the font paths and any other defaults for that printer only. It is recommended that all standard defaults go in the one master `config.ps' file and only things that vary printer to printer go in the `config.PRINTERNAME' files. Note that `config.ps' is read before `config.PRINTERNAME'. In addition, another file called `~/.dvipsrc' is searched for immediately after `config.ps'; this file is intended for user defaults. If no `-P' command is given, the environment variable `PRINTER' is checked. If that variable exists, and a corresponding configuration file exists, that configuration file is read in. Run securely. This disables command execution in `\special' (via ``') and config files (via the `E' option), pipes as output files, and opening of any absolute filenames. `-S NUM' Set the maximum number of pages in each `section'. This option is most commonly used with the `-i' option; see that documentation above for more information. `-T OFFSET' Set the paper size to the given pair of dimensions. This option takes its arguments in the same style as `-O'. It overrides any paper size special in the `dvi' file. 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. It is caused by a bug in that interpreter that results in `garbage' on the bottom of each character. Not recommended unless you must drive this printer. Download non-resident PostScript fonts as bitmaps. This requires use of `mtpk' or `pstopk' or some combination of the two in order to generate the required bitmap fonts; neither of these programs are supplied with Dvips. `-X NUM' Set the horizontal resolution in dots per inch to NUM. `-Y NUM' Set the vertical resolution in dots per inch to NUM. Causes bitmapped fonts to be compressed before they are downloaded, thereby reducing the size of the PostScript font-downloading information. Especially useful at high resolutions or when very large fonts are used. Will slow down printing somewhat, especially on early 68000-based PostScript printers. File: dvips.info, Node: Config File, Next: Font Generation, Prev: Invoking dvips, Up: Top Configuration File Searching **************************** The dvips program has a system of loading configuration files such that parameters can be set globally across the system, on a per-printer basis, or by the user. When dvips starts up, first the global `config.ps' file is searched for and loaded. This file is looked for along the path for configuration files, which is set in the `Makefile' at compilation. After this master configuration file is loaded, a file by the name of `.dvipsrc' is loaded from the current user's home directory, if such a file exists. This file is loaded in exactly the same way as the global configuration file, and it can override any options set in the global file. Then the command line is read and parsed. If the `-P' option is encountered, at that point in the command line a configuration file for that printer is read in. Thus, the printer configuration file can override anything in the global or user configuration file, and it can also override most options in the command line up to the point that the `-P' option was encountered. After the command line has been completely scanned, if there was no `-P' option selected, and also the `-o' and `-f' command line options were not used, a `PRINTER' environment variable is searched for. If this variable exists, and a configuration file for the printer mentioned in it exists, this configuration file is loaded last of all. Because the printer-specific configuration files are read after the user's configuration file, the user cannot override things in the printer configuration files. On the other hand, the configuration path usually includes the current directory, and can be set to include the user's home directory (or any other directory of the user), so the user can always provide his or her own printer-specific configuration files that will be found before the system global ones. A few options are treated specially, in that they are not overridden by configuration files: `-mode' This overrides any mode setting (`M' line) in `config.*'. `-mode' does not affect the resolution, however. This overrides any output setting (`o' line) in `config.*'. As well as setting the current resolution, this unsets the mode if the mode was set from a configuration file. If `config.$PRINTER' is read, however, any `D' or `M' lines from it will take effect. The purpose of these special cases is to (1) minimize the chance of having a mismatched mode and resolution (which `MakeTeXPK' cannot handle), and (2) to let command-line options override config files. * Menu: * Config File Options:: Details of dvips config.* files. File: dvips.info, Node: Config File Options, Up: Config File Configuration File Options ========================== Most of the configuration file options are similar to the command line options, but there are a few new ones. Again, many may be turned off by suffixing the letter with a zero (0). These options are `a', `f', `q', `r', `K', `N', `U', and `Z'. Within a configuration file, any empty line or line starting with a space, asterisk, equal sign, or a pound sign is ignored. `@ NAME HSIZE VSIZE' This option is used to set the paper size defaults and options for the particular printer this configuration file describes. There are three formats for this option. If the option is specified on a line by itself, with no parameters, it instructs dvips to discard all other paper size information (possibly from another configuration file) and start fresh. If three parameters are given, as above, with the first parameter being a name and the second and third being a dimension (as in 8.5in or 3.2cc, just like in the `papersize' special), then the option is interpreted as starting a new paper size description, where NAME is the name and HSIZE and VSIZE describe the horizontal and vertical size of the sheet of paper, respectively. If both HSIZE and VSIZE are equal to zero (although you must still specify units!) then any page size will match it. If the `@' character is immediately followed by a `+' sign, then the remainder of the line (after skipping any leading blanks) is treated as PostScript code to send to the printer to select that particular paper size. After all that, if the first character of the line is an exclamation point, then the line is put in the initial comments section of the final output file; else, it is put in the setup section of the output file. For instance, a subset of the paper size information supplied in the default `config.ps' looks like @ letterSize 8.5in 11in @ letter 8.5in 11in @+ %%BeginPaperSize: Letter @+ letter @+ %%EndPaperSize @ legal 8.5in 14in @+ ! %%DocumentPaperSizes: Legal @+ %%BeginPaperSize: Legal @+ legal @+ %%EndPaperSize Note that you can even include structured comments in the configuration file! When dvips has a paper format name given on the command line, it looks for a match by the NAME; when it has a `papersize' special, it looks for a match by dimensions. The first match found (in the order the paper size information is found in the configuration file) is used. If nothing matches, a warning is printed and the first paper size given is used, so the first paper size should always be the default. The dimensions must match within a quarter of an inch. Landscape mode for all of the paper sizes are automatically supported. If your printer has a command to set a special paper size, then give dimensions of `0in 0in'; the PostScript code that sets the paper size can refer to the dimensions the user requested as `hsize' and `vsize'; these will be macros defined in the PostScript that return the requested size in default PostScript units. Note that virtually all of the PostScript commands you use here are device dependent and degrade the portability of the file; that is why the default first paper size entry should not send any PostScript commands down (although a structured comment or two would be okay). Also, some printers want `BeginPaperSize' comments and paper size setting commands; others (such as the NeXT) want `PaperSize' comments and they will handle setting the paper size. There is no solution I could find that works for both (except maybe specifying both.) See the supplied `config.ps' file for a more realistic example. 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. `b NUM' Generate NUM copies of each page, but duplicating the page body rather than using the `#numcopies' option. This can be useful in conjunction with a header file setting `\bop-hook' to do color separations or other neat tricks. `e NUM' Set the maximum drift parameter to NUM dots (pixels) as explained above. Run as a filter by default. `h NAME' Add NAME as a PostScript header file to be downloaded at the beginning. `i NUM' Make each section be a separate file, and set the maximum number of pages in a given file to NUM. Under certain circumstances, dvips will split the document into `sections' to be processed independently; this is most often done for memory reasons. Using this option tells dvips to place each section into a separate file; the new file names are created by replacing the suffix of the supplied output file name with a three-digit sequence number. This is essentially a combination of the command line options `-i' and `-S'; see the documentation for these options for more information. `m NUM' The value NUM is the virtual memory available for fonts and strings in the printer. Default is 180000. This value must be accurate if memory conservation and document splitting is to work correctly. To determine this value, send the following file to the printer: %! Hey, we're PostScript /Times-Roman findfont 30 scalefont setfont 144 432 moveto vmstatus exch sub 40 string cvs show pop showpage Note that the number returned by this file is the total memory free; it is often a good idea to tell dvips that the printer has somewhat less memory. This is because many programs download permanent macros that can reduce the memory in the printer. In general, a memory size of about `300000' is plenty, since dvips can automatically split a document if required. It is unfortunate that PostScript printers with much less virtual memory still exist. Some systems or printers can dynamically increase the memory available to a PostScript interpreter, in which case this file might return a ridiculously low number; the NeXT computer is such a machine. For these systems, a value of one million works well. `o NAME' The default output file is set to NAME. As above, it can be a pipe. Useful in printer-specific configuration files to redirect the output to a particular printer queue. `p NAME' The file to examine for PostScript font aliases is NAME. It defaults to `psfonts.map'. This option allows different printers to use different resident fonts. If the name starts with a `+' character, then the rest of the name (after any leading spaces) is used as an additional map file; thus, it is possible to have local map files pointed to by local configuration files that append to the global map file. Run quietly by default. Reverse the order of pages by default. Enclose the entire document in a global save/restore pair by default. Not recommended, but useful in some environments; this breaks the conformance of the document to the Adobe PostScript structuring conventions. `D NUM' Set the vertical and horizontal resolution to NUM dots per inch. Useful in printer-specific configuration files. `E COMMAND' Executes the command listed; can be used to get the current date into a header file for inclusion, for instance. Possibly dangerous; in many installations this may be disabled, in which case a warning message will be printed if the option is used. `H PATH' The (colon-separated) path to search for PostScript header files is PATH. The environment variable `DVIPSHEADERS' overrides this. Filter comments out of included PostScript files; see the description above for more information. `M MODE' Set MODE as the METAFONT mode to be used when generating fonts and for path searching. The `-mode' option overrides this. With the default paths, specifying a mode this way also makes the program assume the fonts are in a subdirectory named MODE. *Note TeX directory structure: (kpathsea)TeX directory structure. Disable PostScript comments by default. `O OFFSET' Move the origin by a certain amount. The OFFSET is a comma-separated pair of dimensions, such as `.1in,-.3cm' (in the same syntax as used in the `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 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. `P PATH' The (colon-separated) path to search for bitmap `pk' font files is PATH. The `PKFONTS', `TEXPKS', `GLYPHFONTS', and `TEXFONTS' environment variables override this. *Note TeX environment variables: (kpathsea)TeX environment variables. `R NUM NUM ...' Sets up a list of default resolutions to search for `pk' fonts, if the requested size is not available. The output will then scale the font found using PostScript scaling to the requested size. The resulting output may be ugly, and thus a warning is issued. To turn this off, use a line with just the `R' and no numbers. `S PATH' The path to search for special illustrations (Encapsulated PostScript files or psfiles) is PATH. The `TEXPICTS' and then `TEXINPUTS' environment variables override this. `T PATH' The path to search for the `tfm' files is PATH. The `TFMFONTS' and then `TEXFONTS' environment variables overrides this. This path is used for resident fonts and fonts that can't otherwise be found. Turns off a memory-saving optimization; this is necessary for the Xerox 4045 printer, but not recommended otherwise. See the description above for more information. `V PATH' The path to search for virtual font `vf' files is PATH. This may be device-dependent if you use virtual fonts to simulate actual fonts on different devices. `W STRING' Sends STRING to stderr, if a parameter is given; otherwise it cancels another previous message. This is useful in the default configuration file if you want to require the user to specify a printer, for instance, or if you want to notify the user that the resultant output has special characteristics. `X NUM' Set the horizontal resolution to NUM dots per inch. `Y NUM' Set the vertical resolution to NUM dots per inch. Compress all downloaded fonts by default, as above. File: dvips.info, Node: Font Generation, Next: Environment Variables, Prev: Config File, Up: Top Automatic Font Generation ************************* One major problem with TeX and the Computer Modern fonts is the huge amount of disk space a full set of high resolution fonts can take. Dvips solves this problem by creating fonts on demand, so only those fonts that are actually used are stored on disk. At a typical site, less than one-fifth of the full set of Computer Modern fonts are used over a long period, so this saves a great deal of disk space. Furthermore, the addition of dynamic font generation allows fonts to be used at any size, including typesetter resolutions and extremely huge banner sizes. Nothing special needs to be done; the fonts will be automatically created and installed as needed. The downside is that it does take a certain amount of time to create a new font if it has never been used before. But once a font is created, it will exist on disk, and the next time that document is printed it will print very quickly. It is the `MakeTeXPK' shell script that is responsible for making these fonts. It *must* echo the filename of the new font (and nothing else) to standard output. Use standard error for commentary. `MakeTeXPK' is passed various arguments, the first of which is the font it's supposed to make. You can override the other argument conventions with environment variables or at compilation time; see the Kpathsea documentation. The `MakeTeXPK' script supplied invokes Metafont (using the Sauter scripts first, if necessary and if they are installed) to create the font and then copies the resultant `pk' file to a world-writable font cache area. `MakeTeXPK' can be customized to do other things to get the font. For instance, if you are installing dvips to replace (or run alongside) an existing PostScript driver, and that driver demands `gf' fonts, you can easily modify `MakeTeXPK' to invoke `gftopk' to convert the `gf' files to `pk' files for dvips. This provides the same space savings listed above. Because dvips (and thus `MakeTeXPK') is run by a wide variety of users, there must be a system-wide place to put the cached font files. In order for everyone to be able to supply fonts, the directory must be world writable. If your system administrator considers this a security hole, `MakeTeXPK' can write to `/tmp/pk' or some such directory, and periodically the cached fonts can be moved to a more general system area. The cache directory must exist on the `pk' file search path in order for `MakeTeXPK' to work. File: dvips.info, Node: Environment Variables, Next: Bells and Whistles, Prev: Font Generation, Up: Top Environment Variables ********************* Dvips reads a certain set of environment variables to configure its operation. The path variables are read as needed, after all configuration files are read, so they override values in the configuration files. (Except for the `TEXCONFIG' variable.) *Note Path specifications: (kpathsea)Path specifications, for details of interpretation of environment variable values, and the common environment variables. Only the environment specific to `dvips' are mentioned here. `DVIPSFONTS' Default path to search for all fonts. Overrides all the font-related config file options and other environment variables. `DVIPSHEADERS' Default path to search for PostScript header files. Overrides the `H' config file option. `DVIPSMAKEPK' Overrides `MakeTeXPK' as the name of the program to invoke to create missing PK fonts. You can change the arguments passed to the `MakeTeXPK' program with the `MAKETEXPK' environment variables; see the Kpathsea documentation. `DVIPSSIZES' Last-resort sizes for scaling for unfound fonts. Overrides the `R' definition in config files. `PRINTER' This environment variable is read to determine which default printer configuration file to read in. It is the responsibility of the configuration file to send output to the proper print queue, if such functionality is desired. `TEXCONFIG' This environment variable sets the directories to search for configuration files, including the system-wide one. Using this single environment variable and the appropriate configuration files, it is possible to set up the program for any environment. (The other path environment variables are thus redundant.) `TEXPICTS' Path to search for special illustrations. Overrides the `S' config file option. If not set, `TEXINPUTS' is used. File: dvips.info, Node: Bells and Whistles, Next: MS-DOS, Prev: Environment Variables, Up: Top Other Bells And Whistles ************************ For special effects, if any of the macros `bop-hook', `eop-hook', `start-hook', or `end-hook' are defined in the PostScript `userdict', they will be executed at the beginning of a page, end of a page, start of the document, and end of a document, respectively. When these macros are executed, the default PostScript coordinate system and origin is in effect. Such macros can be defined in headers added by the `-h' option or the `header=' special, and might be useful for writing, for instance, DRAFT across the entire page, or, with the aid of a shell script, dating the document. These macros are executed outside of the save/restore context of the individual pages, so it is possible for them to accumulate information, but if a document must be divided into sections because of memory constraints, such added information will be lost across section breaks. The single argument to `bop-hook' is the sequence number of the page in the file; the first page gets zero, the second one, etc. The procedure must leave this number on the stack. None of the other hooks are (currently) given parameters, although this may change in the future. As an example of what can be done, the following special will write a light DRAFT across each page in the document: \special{!userdict begin /bop-hook{gsave 200 30 translate 65 rotate /Times-Roman findfont 216 scalefont setfont 0 0 moveto 0.7 setgray (DRAFT) show grestore}def end} Note that using `bop-hook' or `eop-hook' in any way that preserves information across pages will break compliance with the Adobe document structuring conventions, so if you use any such tricks, it is recommended that you also use the `-N' option to turn off structured comments. Several of the above tricks can be used nicely together, and it is not necessary that a `printer configuration file' be used only to set printer defaults. For instance, a `-P' file can be set up to print the date on each page; the particular configuration file will execute a command to put the date into a header file, which is then included with a `h' line in the configuration file. Multiple `-P' options can be used. File: dvips.info, Node: MS-DOS, Next: Installation, Prev: Bells and Whistles, Up: Top MS-DOS ****** If you have any experience with Dvipsk under DOS, kb@cs.umb.edu would like to hear about it. File: dvips.info, Node: Installation, Next: Problems, Prev: MS-DOS, Up: Top Installation ************ To compile and install Dvipsk: 1. Edit the file `make/paths.make' if you want to make changes to the installation directories or paths that will have effect across different runs of `configure'. Alternatively, override the Make variables on the command line when you run Make. Exception: to reliably change the top-level `prefix', you must give `configure' the option `-prefix=PREFIX', instead of changing the value in `paths.make'. 2. Edit `kpathsea/texmf.cnf.in' to change the local paths to match your local setup. *Note Default paths: (kpathsea)Default paths, for more details on changing the paths. A copy is in `kpathsea/INSTALL'. See `kpathsea/HIER' for an explanation of the default setup. If the paths do not match where the files actually are, the programs will probably start up Very, Very, Slowly, and/or not be able to find the fonts or other input files. 3. `sh configure' (in the top-level directory). This makes system-dependent `#define's' in `*/c-auto.h' (from the corresponding `c-auto.h.in') and creates a `Makefile' (from the corresponding `Makefile.in', by doing `@VAR@' and `ac_include' substitutions). Perhaps the most common desire is to compile with optimization instead of or as well as debugging. You can change the options passed to the compiler by changing `CFLAGS', either for `configure' or `make'. For example: prompt$ env CFLAGS="-g -O" configure prompt$ make or prompt$ configure prompt$ make CFLAGS="-g -O" *Note Running `configure' scripts: (autoconf)Invoking configure, for detailed `configure' options. (A copy is in `kpathsea/CONFIGURE'.) 4. `make' (still in the top-level directory). Barring configuration and compiler bugs, this will compile all the programs. *Note Common problems: (kpathsea)Common problems, for system-dependent problems (this section is also in `kpathsea/INSTALL'). This also creates the `texmf.cnf' and `paths.h' files that define the default search paths. 5. Check the paths in `MakeTeXPK', unless you do not want automatic font generation. *Note Font Generation::. The `MakeTeXPK' in the distribution will overwrite the installed file only if the latter contains the string `original MakeTeXPK --'. Dvipsk, unlike the original dvips, *requires* `MakeTeXPK' to echo the generated filename (and nothing else) to standard output (standard error can be used for commentary). For more details, or in general if `MakeTeXPK' fails, *note Unable to Generate Fonts::.. By default, `MakeTeXPK' installs the new PK fonts under `/usr/local/lib/texmf/fonts/tmp/pk'. For the simplest installation, create that directory and make it publically writable. *Note Font Generation::, for alternatives. 6. Update the device parameters (available memory, resolution, etc.) in `config.ps'. This file is installed as the system-wide configuration file. *Note Config File Options::. The `config.ps' in the distribution will overwrite the installed file only if the latter contains the string `original config.ps --'. If you need support for more than one device, create configuration files for each and install them in the directory named by the Make variable `configdir'. See the `-P' option in *Note Invoking dvips::. 7. Install the programs and supporting macros, fonts, and data files with `make install'. If you want to install only the executables, do `make install-exec'; for only the data files, `make install-data'. And if you don't want to install the fonts (perhaps because your directory structure is different from the default), but do want everything else, set the Make variable `install_fonts=false'. 8. Install additional fonts, if you want to. A few Type 1 fonts (Utopia, Charter, Courier, Nimbus, Antiqua, ...) have been contributed to the X Consortium, and thus are freely available. You can get TeX distributions for them from `ftp.cs.umb.edu' in `pub/tex', and from the CTAN hosts in `tex-archive/fonts'. If you have a commercial Unix system, it may have come with additional PostScript fonts. If so, you can make them available to Dvips by (1) copying or linking them with the appropriate filenames; and (2) running `afm2tfm' (*note afm2tfm::.) to make TFM and VF files so the fonts will be available in the same encoding as the fonts distributed with Dvips. Also check `psfonts.map' to be sure the fonts are listed there (*note Non-resident Fonts::.). Here are the typical locations for vendor-supplied fonts: DEC Ultrix `/usr/lib/DPS/outline/decwin' DEC OSF/1 `/usr/lib/X11/fonts/Type1Adobe' IBM AIX `/usr/lpp/DPS/fonts/outlines' NeXT `/NextLibrary/Fonts/outline' SGI IRIX `/usr/lib/DPS/outline/base' Sun Solaris `/usr/openwin/lib/X11/fonts/Type1/outline' The NeXT system supplies more fonts than the others, but the sets are overlapping. See the distributed `psfonts.map' for which fonts each system supplies. 9. `make distclean'. This removes all files created by the build. *Note Debug Options::, for runtime debugging options that may help track down problems. *Note Reporting bugs: (kpathsea)Reporting bugs, for the bug reporting address and information. (Also at the end of `kpathsea/INSTALL'.) File: dvips.info, Node: Problems, Next: Color, Prev: Installation, Up: Top 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. This is all too common, and is usually caused by some broken PostScript application out there. The following sections provide some helpful hints if you find yourself in such a situation. In all cases, you should attempt to find the smallest file that causes the problem. This will not only make debugging easier, it will also reduce the number of possible interactions among different parts of the system. * Menu: * Debug Options:: To see low-level operations. * No Output:: No Output At All * Small or Inverted:: Output Too Small or Inverted * Printer Errors:: * 400 DPI:: 400 dpi is used instead of 300 dpi * Long Documents Fail:: Long Documents Fail To Print * Including Graphics Fails:: * Unable to Generate Fonts:: File: dvips.info, Node: Debug Options, Next: No Output, Up: Problems Debug Options ============= The `-d' flag to dvips is very useful for helping to track 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' (output is extremely voluminous). Another useful value is `3650', which tracks everything having to do with file searching and opening. The classes are: specials paths fonts pages headers font compression files memory Kpathsea `stat' calls Kpathsea hash table lookups Kpathsea path element expansion Kpathsea path searches File: dvips.info, Node: No Output, Next: Small or Inverted, Prev: Debug Options, Up: 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. I've tried to work around as many bugs as possible in common non-Adobe PostScript interpreters, but I'm sure I've missed a If dvips gives any strange error messages, or compilation on your machine generated a lot of warnings, perhaps the dvips program itself is broken. Carefully check the types in `dvips.h' and the declarations in the `Makefile', and try using the debug options to determine where the error occurred. 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: Problems Output Too Small or Inverted ============================ If some documents come out inverted or too small, your spooler is not supplying an end of job indicator at the end of each file. (This happens a lot on small machines that don't have spoolers.) You can force dvips to do this with the `-F' flag, but note that this generates files with a binary character (control-D) in them. You can also try using the `-s' flag to enclose the entire job in a save/restore pair. File: dvips.info, Node: Printer Errors, Next: 400 DPI, Prev: Small or Inverted, Up: 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 make sure you 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 telling dvips that the printer has more memory than it actually does, and then printing a complicated document. To fix this, try lowering the parameter to `m' in the configuration file; use the debug option to make sure you adjust the correct file. Other errors may indicate that the graphics you are trying to include don't nest properly in other PostScript documents, or any of a number of other possibilities. Try the output on a QMS PS-810 or other Adobe PostScript printer; it might be a problem with the printer itself. File: dvips.info, Node: 400 DPI, Next: Long Documents Fail, Prev: Printer Errors, Up: Problems 400 DPI Is Used Instead Of 300 DPI ================================== This common error is caused by not editing the `config.ps' file to reflect the correct resolution for your site. You can use the debug flags (`-d64') to see what files are actually being read. File: dvips.info, Node: Long Documents Fail, Next: Including Graphics Fails, Prev: 400 DPI, Up: Problems Long Documents Fail To Print ============================ This is usually caused by incorrectly specifying the amount of memory the printer has in `config.ps'; see the description above.