dvixxx [-?] [-accountingfile:filename] [-author#] [-backwards[#]] [-boundingbox:#][-bytelimit#] [-cachefonts[#]] [-copies#] [-copyleft[#]] [-copyright#] [-d#] [-d:selection] [-debugfile:filename] [-dviprefix:name] [-epsf] [-errsuffix:name] [-fontsubfile:filename] [-heavyduty[#]] [-help] [-inifile:filename] [-keybindings:none] [-keybindings:{program}] [-landscape[#]] [-logging[#]] [-m#] [-magnification#] [-magstep#] [-manualfeed[#]][-maxbufsize#] [-maxdownloadedfonts#] [-maxdrift#] [-maxfontstorage#] [-maxopenfonts#] [-meritfactor#] [-model:modelname] [-name:name] [-nospecials#] [-o#]... [-o#:#]... [-o#:#:#]... [-o#:#:#:#]... [-o#,#,...,#] [-o\*(fT<item>\*(fP.\*(fT<item>\*(fP.\*(fT<item>\*(fP...]... [-offset#] [-outfile:filename] [-outsuffix:name] [-paintmode][-paper:name] [-paper:{program}] [-preload[#]] [-print[#]] [-pslevel[#]] [-quiet[#]] [-reloadafter#] [-rename:OLDNAME=NEWNAME] [-resolution#][-reversevideo[#]] [-runlengthcode[#]] [-set:ENVVAR=value][-sizelimit#] [-spooloutput[#]] [-squeeze#] [-version] [-x#units] [-y#units] [@\*(fTindirectfile\*(fP]... \*(fTdvifile1\*(fP [\*(fTdvifile2\*(fP ...]xxx = output device identifier suffix (see below). # = integer or floating-point number. Square brackets delimit optional values.
- \*(fTdvialw\*(fP
- \*(Ps (Apple LaserWriter and others)
- \*(fTdviapo\*(fP
- Apollo workstation screen display (Aegis and UNIX)
- \*(fTdvibit\*(fP
- Version 3.10 BBN BitGraph terminal
- \*(fTdvica2\*(fP
- Canon LBP-8 A2 and LBP-II laser printers
- \*(fTdvican\*(fP
- Canon LBP-8 A2 and LBP-II laser printers
- \*(fTdvicub\*(fP
- IBM PC Cubicomp PC-10 screen display
- \*(fTdvidot\*(fP
- Dot-matrix printer driver supporting many different printers and resolutions, including
- Anadex Silent Scribe printer;
- Apple ImageWriter printer;
- DEC LA50, LA75, and LA100 printers;
- old DEC LN03 printers without resident font support;
- Epson 9-pin family FX and MX printers and compatibles (many, including Citizen Overture 110, Mannesman Tally 85, Panasonic KX-P1091i and Star NX-100);
- Epson 24-pin LQ family printer, and clones such as Fujitsu DL2400;
- Hewlett-Packard DeskJet ink-jet printer;
- Hewlett-Packard LaserJet laser printer (original dumb version without the downloaded font support added in the LaserJet Plus and Series II);
- Hewlett-Packard ThinkJet ink-jet printer;
- IBM 4202 Proprinter (which supports only a subset of Epson FX commands, with a few incompatible sequences)
- MPI Sprinter printer;
- OKIDATA Pacemark 2410 printer;
- OKIDATA 192 Plus printer;
- Panasonic 9-and 24-pin printers;
- Phillips GP printer;
- Printronix printer;
- Toshiba P-1351 printer, and other Toshiba models.
- \*(fTdvihl8\*(fP
- Brother HL-8 laser printer
- \*(fTdviimp\*(fP
- Imagen imPRESS-language laser printer family
- \*(fTdviirt\*(fP
- IBM RT 6150 console preview
- \*(fTdvijep\*(fP
- Hewlett-Packard LaserJet Plus and Series II laser printer
- \*(fTdvikyo\*(fP
- Kyocera F-1010 laser printer.
- \*(fTdvilzr\*(fP
- Dataproducts LZR-1230 laser printer
- \*(fTdvisun\*(fP
- SUN SunWindows workstation screen display
- \*(fTdvityp\*(fP or \*(fTdvitype\*(fP
- DVI Translator for human-readable output
- \*(fTdviupc\*(fP
- AT&T UNIX PC workstation screen display
- \*(fTdvivga\*(fP
- IBM PC VGA screen previewer
\*(fT arg:a-% very-% long-% value \*(fPwill be returned as a single string \*(fTarg:a-very-long-value\*(fP. If newlines and spaces were really wanted, it could instead be coded as
\*(fT "arg:a- very- long- value" \*(fPThe input
\*(fT arg:a-% very-% long-% value \*(fPwould come back as two arguments, \*(fTarg:a-very-\*(fP and \*(fTlong-value\*(fP, because the comment following \*(fTvery-\*(fP stops just before the second newline. Inside quoted strings and balanced brace groups, comments are not recognized; they will be treated as normal text included as part of the argument. Quoted strings are supported with ANSI C-style escape character expansion: \*(fT\a\*(fP, \*(fT\b\*(fP, \*(fT\f\*(fP, \*(fT\n\*(fP, \*(fT\r\*(fP, \*(fT\t\*(fP, \*(fT\v\*(fP, \*(fT\xhhhhh\*(fP, \*(fT\ooo\*(fP, \*(fT\\\*(fP, \*(fT\"\*(fP, \*(fT\'\*(fP. Because strings are stored as NUL-terminated C strings, a NUL character embedded in a quoted string terminates it prematurely. Raw strings are delimited by single quotes; the only escape sequence recognized is \*(fT<backslash>\*(fP\*(fT<single quote>\*(fP, \*(fT\'\*(fP, which reduces to a single quote. In front of all other characters, backslash is a normal character. You can use raw strings to hold arguments that need a lot of backslashes, or ones in which NUL characters must be represented by the escape sequence \*(fT\ 00\*(fP; the caller must then reduce the escape sequence. In non-quoted, non-braced values, as well as in quoted strings and braced groups, but not in raw strings, the case of the sequence \*(fT<not-a-backslash>\*(fP\*(fT<backslash>\*(fP\*(fT<newline>\*(fP is treated specially: the \*(fT<backslash>\*(fP\*(fT<newline>\*(fP is discarded completely. This allows splitting long arguments across line boundaries. Unlike comment handling (see above), however, leading space on the next line is not discarded. Thus,
\*(fT arg:a-\ very-\ long-\ value \*(fPwould produce four arguments: \*(fTarg:a-\*(fP, \*(fTvery-\*(fP, \*(fTlong-\*(fP, and \*(fTvalue\*(fP, but
\*(fT arg:a-\ very-\ long-\ value \*(fPwould produce just one: \*(fTarg:a-very-long-value\*(fP. What if you really want a \*(fT<backslash>\*(fP\*(fT<newline>\*(fP pair in the input string? The solution is simple---escape the backslash with another one.
\*(fT "arg:\\ value" "arg:\\\nvalue" \*(fPwould both return \*(fTarg:<backslash><newline>value\*(fP, whereas
\*(fT "arg:\ value" \*(fPreturns \*(fTarg:value\*(fP, and
\*(fT "arg: value" \*(fPreturns \*(fTarg:<newline>value\*(fP. Escape sequences and/or comments can be used to ensure balanced braces in the event that the desired argument does not have balanced braces. For example, the argument
\*(fT { foo = "}}}{{{"; } \*(fPcannot be given that way because its braces are unbalanced. It could be written in several equivalent ways, including
\*(fT { % {{{ foo = "}}}{{{"; % }}} } { foo = "\175\175\175\173\173\173"; } { foo = "\x7d\x7d\x7d\x7b\x7b\x7b"; } { foo = "\175\175\175{{{"; % }}} } \*(fPHere are the options recognized:
- -?
- Give a help message and terminate.
- -accountingfile:filename
- This option provides for the recording of accounting information in a specified file. Normally, it would be set only in a system-wide \*(fTdvi.ini\*(fP file. See the Initialization Files section. The file must already exist for recording to be done. Thus, removal or renaming of the accounting file will suppress recording. Processing of each \*(fT.dvi\*(fP file adds a one-line record to the end of the accounting file with these fields:
- time stamp in the form 1992.03.21 11:41:56 MST;
- milliseconds of CPU time;
- milliseconds of wall-clock time;
- driver name;
- driver version and date;
- \*(fT.dvi\*(fP file name;
- current working directory;
- pages processed;
- user personal name;
- user login name;
- domain name of host computer;
- command-line image.
The format of accounting entries is designed to be easily parsable with \*(fTawk\*(fP or \*(fTtex\*(fP.
- -author
- Display an author credit and terminate. Sometimes the drivers have been separated from their documentation; this option provides a way to recover from that situation.
- -backwards{[#]}
- Flip or set the backwards printing order flag. For example, laser printers using the Canon LBP-CX print engine should normally receive pages in reverse order because they stack printed side up. However, some printers with this engine have page handling mechanisms that stack pages face down, and in such a case -backwards will ensure that they come out in order 1, 2, 3, ... instead of n, n-1, n-2, ....
- -boundingbox{[#]}
- Flip or set the PostScript bounding box flag. Normally, \*(fTdvialw\*(fP outputs a PostScript \*(fT%%BoundingBox\*(fP comment that reflects the physical page size. However, if you use TeX to produce a figure for insertion in another document, you may want the exact bounding box calculated instead; set the bounding box flag to do so. The default value for this flag is zero, making the bounding box the same as the page size.
- -bytelimit#
- Set a limit on how much memory (in bytes) may be used for the page bitmap for those drivers that construct one (usually dot-matrix printers). There is a built-in default limit, but no reasonable fixed number will ever work in all cases.
- -cachefonts{[#]}
- Flip or set the font caching flag. This feature is available in the DVI drivers only on a few operating systems. When a font file is opened, a buffer is allocated to contain the entire file, and the file is then read with one system call. This is important primarily on networked file systems, where the many random-access calls in the font file for small amounts of data entail substantial network overhead. With the entire file cached in local memory, this overhead is removed. The additional memory required for the font file buffers amounts to 100K to 200K bytes (assuming the compact PK font file format), which is not excessive. If memory cannot be allocated for a font file, then normal buffering of small blocks is used. A trace option (-d:font-cache) is provided to monitor the font caching; see above.
- -copies#
- Print \*(fT#\*(fP copies of each output page. Page copies are printed consecutively; this does not give multiple collated copies of the entire job.
- -copyleft
- Print a copyright message and terminate.
- -copyright
- Print a copyright message and terminate.
- -d#
- Produce debugging output on \*(fTstderr\*(fP (switchable to \*(fTstdout\*(fP, or another file with the -debugfile option) if a non-zero value is given. Multiple -d switches may be specified, and you may also add values of the possible options to obtain the switch value. Since numeric values are not easy to remember, alphabetical values for debug options are supported; they may be abbreviated to the minimum unique prefix. Numeric values may be specified as well in octal (signaled by a leading zero), or in hexadecimal (prefixed by 0x); thus, -d64, -d0100, and -d0x40 are equivalent.
- 1 or 0x00001 or stdout
- switch debug output from \*(fTstderr\*(fP to \*(fTstdout\*(fP (useful on PC DOS which does not provide for command-line redirection of \*(fTstderr\*(fP to a disk file);
- 2 or 0x00002 or char-dump
- display page coordinates and metrics of each output character, and print each character bitmap in hexadecimal;
- 4 or 0x00004 or char-pos
- display updated page coordinate of each character after each call to the function \*(fTfixpos()\*(fP;
- 8 or 0x00008 or open-okay
- print filename and open mode of each successful file opening, and print filename again at file close;
- 16 or 0x00010 or open-fail
- print filename and open mode of each unsuccessful file opening;
- 24 or 0x00018 or open
- print filename and open mode of all attempted file openings, and file closings;
- 32 or 0x00020 or char-off-page
- show discarded off-page text;
- 64 or 0x00040 or font-cache
- trace font caching;
- 128 or 0x00080 or set-text
- trace character setting (lots of output);
- 256 or 0x00100 or malloc or
- memory-allocation trace virtual memory allocation and freeing;
- 512 or 0x00200 or bitmap
- print non-zero rows of page bitmap in hexadecimal (bit-mapped printers only);
- 1024 or 0x00400 or form-default
- print the parameters of the default paper form;
- 2048 or 0x00800 or forms
- print the parameters of all known paper forms;
- 4096 or 0x01000 or font-name
- or fonts print the names of the document fonts required, and where possible, the names of the corresponding font files;
- 8192 or 0x02000 or sun
- print trace of \*(fTdvisun\*(fP execution;
- 16384 or 0x04000 or environment
- print environment variable names and values;
- 32768 or 0x08000 or lookup
- trace filename cache lookups;
- 65536 or 0x10000 or char-invisible
- trace typesetting of characters which are not visible.
For example, either -d8 -d16 or -d24 will trace all attempted file openings. You can use -d16 to track down failures to find any fonts at all.
- -debugfile:filename
- Specify an alternate filename for debug output, which otherwise goes to \*(fTstderr\*(fP, or \*(fTstdout\*(fP (when -d1 is specified). This option overrides any -d1 option.
- -dviprefix:prefix
- On systems that support long names, the default output file extension is \*(fT.dvi-xyz\*(fP, where \*(fTxyz\*(fP is the suffix of the driver name, \*(fTdvixyz\*(fP. Otherwise, the output file extension is \*(fT.xyz\*(fP. This option allows the replacement of the string \*(fTdvi-\*(fP with something else.
- -epsf
- (Device = \*(Ps printers only). Reload fonts for each page, ensuring that the output conforms to Adobe's Encapsulated \*(Ps File format, in which each page specification is independent of other pages. This option is not recommended for routine use, because it vastly increases the size of the output file. Use it to create \*(Ps files that will be incorporated as figures in other \*(Ps documents.
- -errsuffix:suffix
- Driver log files are normally named with an extension \*(fT.dvi-err\*(fP when long file names are available, and otherwise with \*(fT.err\*(fP. This option allows the replacement of the string \*(fTerr\*(fP with an alternate one.
- -fontsubfile:filename
- Define an alternate font substitution file which is to be used instead of the default ones. See the Font Substitution section.
- -heavyduty{[#]}
- (Device = Phillips GP printer only). Flip or set the heavy duty printing flag. A warning message will be issued for pages that require this option if it has not already been selected. It is needed for pages that are more than half black (unlikely in normal typesetting applications).
- -help
- Give a help message and terminate.
- -inifile:filename
- This option permits the user to specify a specific initialization file containing options to be processed. More than one such option can be given; the files will be processed in the order they are found, and after the standard initialization files. See the Initialization Files section. Initialization files may also contain -inifile options. These files may be nested to a depth of 10, a reasonable limit set to prevent infinite loops.
- -keybindings:none or -keybindings:{...}
- Define key bindings for an interactive display driver. The first form clears all default key bindings, except that it leaves \*(fTq\*(fP and \*(fTQ\*(fP bound to the \*(fTquit\*(fP function, so you always have some way of stopping the driver. The second form, a braced argument, consists of a series of assignment statements of the form \*(fTdisplay_function = "key"\*(fP, just as for the -paper switch. See the Key Bindings section.
- -landscape{[#]}
- If zero (the default), select portrait mode. If positive, select landscape mode (portrait mode rotated +90 degrees) with top at left of physical output page. If negative, select landscape mode (portrait mode rotated -90 degrees) with top at right of physical output page. At present, \*(fTdvialw\*(fP does not support negative page rotations; a negative value will be forced positive. You can use this option instead of a -paper specification, but avoid using them both together since a non-zero value for -landscape causes the horizontal and vertical paper dimensions to be interchanged.
- -logging{[#]}
- Flip or set the flag inhibiting logging of error and warning messages.
- -m# or -magnification#
- Reset magnification to \*(fT#\*(fP. The default for most low resolution printers is -m603, corresponding to 1/1.2^5 magnification of 300-dot/inch fonts, although \*(fTdvidot\*(fP sets the magnification according to the vertical resolution of the output device model selected. This switch overrides any previous, or built-in, magnification request. By TeX conventions, magnification 1000 corresponds to a 200-dot/inch output device; that is, 5 units in the magnification represents 1 dot/inch. The default magnification is always adjusted according to the output device resolution in order to give a normal page size, so this parameter should rarely be required. Built-in values normally range over \*(fT\magstep\*(fPs -15 ... +15 for the fonts matching the resolution of the output device, but may be further limited by the \*(fTFONTMAGS\*(fP environment variable. Not all fonts will be available in this wide range, and most installations will probably have only a half dozen or so magnifications. The drivers always attempt to find the closest available magnification.
- -magstep#
- Set the output magnification to 1.2 raised to the power of the argument value. This value modifies the default magnification, which be a built-in value, or one set by a previous -magnification# switch.
- -manualfeed{[#]}
- (Device = Canon A2 or II only). Flip or set the manual paper feed flag.
- -maxbufsize#
- By default, drivers will allocate I/O buffers at the size defined by the host implementation. On some systems, it may be desirable to modify the buffer size; this option makes that possible. The parameter value is measured in bytes. Setting a sufficiently large value can make it possible to read a file with just one system call. The actual buffer allocated will never be larger than the file size.
- -maxdownloadedfonts#
- (Device = Canon A2 or II only). The numeric value is the limit on the number of fonts that will be downloaded to the printer.
- -maxdrift#
- Specify the maximum deviation in output device pixel units between TeX's precise positioning, and that computed from addition of pixel coordinates. The default value is 2, as suggested by \*(fTdvitype\*(fP. Larger values are likely to reduce output quality; a 0 value will increase the output file size somewhat. This option should be used only rarely. The \*(fTdvitype\*(fP algorithm (used in the entire driver family) is undergoing some rethinking in the TeX community, and this option may disappear in a later version.
- -maxfontstorage#
- (Device = Canon A2 or II only). Specify the number of bytes available in the printer for downloaded fonts. Consult the program code for further details; specification of this option should rarely be needed.
- -maxopenfonts#
- Each open font file requires about 12KB of dynamic memory, plus space for file buffers and any font rasters that are loaded. This gives a memory requirement of 20KB\(mi50KB per open font. The DVI drivers by default automatically keep as many font files open as the system permits, except on PC DOS, where because of severe memory limits, no more than 5 will be open at once. This option makes it possible to limit the number of open fonts even further when memory is scarce; nonsense values will be replaced by reasonable defaults.
- -meritfactor#
- (Device = Canon A2 or II only). Specify a merit factor for deciding whether to download a character as a font, or as a bitmap. Consult the program code for further details; specification of this option should rarely be needed.
- -model:modelname
- This option requests use of features appropriate to a particular printer model, where the differences between models are small enough that separate drivers are not warranted. Model names may be abbreviated as long as they remain unique for a particular driver. At version 3.0 of the driver family, only \*(fTdvidot\*(fP and \*(fTdvijep\*(fP process this option. \*(fTdvidot\*(fP expects one of the following values:
- Anadex-144Hx144V
- Anadex-72Hx72V
- Apple-IW-144Hx144V
- Apple-IW-72Hx72V
- DEC-LA100-144Hx72V
- DEC-LA100-72Hx72V
- DEC-LA50-144Hx72V
- DEC-LA50-72Hx72V
- DEC-LA75-144Hx144V
- DEC-LA75-72Hx72V
- Epson-FX-60Hx72V
- Epson-FX-72Hx72V
- Epson-FX-80Hx72V
- Epson-FX-240Hx216V
- Epson-LQ-180Hx180V
- HP-DeskJet-75Hx75V
- HP-DeskJet-100Hx100V
- HP-DeskJet-150Hx150V
- HP-DeskJet-300Hx300V
- HP-LaserJet-75Hx75V
- HP-LaserJet-100Hx100V
- HP-LaserJet-150Hx150V
- HP-LaserJet-300Hx300V
- HP-ThinkJet-96Hx96V
- IBM-60Hx72V
- IBM-240Hx216V
- MPI-144Hx144V
- MPI-72Hx72V
- OKIDATA-192-144Hx144V
- OKIDATA-192-72Hx72V
- OKIDATA-2410-144Hx144V
- OKIDATA-2410-72Hx72V
- Panasonic-60Hx72V
- Panasonic-72Hx72V
- Panasonic-240Hx216V
- Phillips-GP-144Hx144V
- Phillips-GP-72Hx72V
- Printronix-60Hx72V
- Toshiba-180Hx180V
Because these model names are rather long, it is recommended that you supply the -model switch in the driver \*(fT.ini\*(fP file, instead of on the command line. See the Initialization Files section. If you will use more than one of these options, it is simplest to make a copy (or on \UNIX, a link) of \*(fTdvidot\*(fP under a different name for each model, so that separate initialization files can set the correct -model setting. \*(fTdvijep\*(fP expects values of either plus for the normal Hewlett-Packard LaserJet Plus (the default), or series-ii for the Hewlett-Packard LaserJet Series II. The Series II has somewhat wider limits on the sizes of downloaded characters, and supports an alternate font header; nevertheless, it accepts output for the Plus as well. Since large characters are printed as bitmaps, rather than as downloaded characters, the printer font limits do not restrict the sizes of characters that can be printed on either model.
- -name:name
- The driver name, \*(fTdvixyz\*(fP, is used as a base name for the initialization file. This option makes it possible to replace that choice with an alternate name.
- -nospecials#
- Flip or set the flag that causes \*(fT\special\*(fP requests to be ignored. This is sometimes useful for proofing manuscripts containing graphics images that take a long time to output. It is also useful when the DVI file contains \*(fT\special\*(fP requests whose syntax is not recognized by this driver family.
- -o<selection>
- Specify a page number, or range of page numbers, or list of page numbers, to be selected for output. This option may be given any number of times; each new selection is appended to the current selection list. However, for interactive display drivers, only the initial page number of the first -o switch is used. If this option is not specified, then all pages will be output. The \*(fT<selection>\*(fP value may be either a colon-separated list of 1 to 4 decimal numbers, or a comma-separated list of 1 or more numbers, or a dot-separated list of 1 to 10 decimal numbers. Embedded whitespace is not permitted in the list. The commonest form is the colon-separated list, which specifies page numbers according to their sequential order in the DVI file, starting from 1. The first number is the starting page number, the second is the ending number, the third is the page number step size (default 1). The fourth number is an offset to be added to the first and second numbers; this is a convenience when the document contains leading material before page 1. A value from a previously-specified -offset switch will also be added to the first and second numbers. When a comma-separated list of numbers is provided, only those pages are selected for printing. A value from a previously-specified -offset switch will also be added to each of the numbers. Negative page numbers count backward; -1 is the last page in the document, -2 the second last page, and so on. If the second number is prefixed by an explicit plus sign, it is taken as a page count, instead of an ending page number. For example, -o1:3 -o12 -o17:23 -o-3:-1 would select pages 1, 2, 3, 12, 17, 18, 19, 20, 21, 22, and 23, plus the last three pages. -o88:98:1:7 would select pages 95 through 105, since an offset of 7 is to be added to the starting and ending page numbers. -o88:+10:1:7 would select the same set of pages. -o2,3,12,27 would select pages 2, 3, 12, and 27. Specification of a page number step size is useful for producing duplex (two-sided) printing. For example, with laser printers using the Canon LBP-CX engine, the first run could specify -o1:9999:2, which would stack output face up, beginning with the last page, and ending with page 1 on top. The printed pages can then be reinserted in the input tray face up, page 1 on the top, exactly as they were found in the output tray, with the top of the page in the tray closest to the end which is inserted first into the printer. A second run with -backwards -o2:9999:2 would then print pages 2, 4, ..., on the backs of pages 1, 3, ...; note the -backwards option to get backwards order on the second run. The alternate form of \*(fT<selection>\*(fP is a dot-separated list to provide for matching against the TeX \*(fT\count0\*(fP ... \*(fT\count9\*(fP values stored with each page in the DVI file. Each item in the list is either a single number specifying an exact match with the corresponding \*(fT\count\*(fP value, a colon-separated pair of numbers defining a range in which the corresponding \*(fT\count\*(fP value is found, or an asterisk, which matches any value of the corresponding \*(fT\count\*(fP. If fewer than ten items are provided, the omitted ones always match. Any \*(fT\count\*(fP value that is zero always matches the corresponding item, because unset counters are set to zero by TeX. For example, -o1:3.*.4 matches pages with \*(fT\count0\*(fP in the range 1...3, and \*(fT\count2\*(fP equal to 4; all other counter values are ignored. As pages are selected for printing, \*(fT[#{#}\*(fP will be printed on \*(fTstderr\*(fP, where the first \*(fT#\*(fP is the page number in the file, and the second \*(fT#\*(fP is a string of values of the TeX counters \*(fT\count0\*(fP through \*(fT\count9\*(fP, separated by dots, with trailing zero counters dropped. \*(fT\count0\*(fP usually records the printed page number. When the page is completely output, a closing \*(fT]\*(fP will be printed on \*(fTstderr\*(fP. Any error messages from processing of that page will therefore occur between the square brackets. Pages are processed in the order found in the DVI file; there is intentionally no attempt made to sort them according the \*(fT\count0\*(fP values, since different macro packages may use this counter for different purposes, and in the case of floating tables and figures, the pages may not be in order anyway.
- -offset#
- Documents with front matter may have several pages preceding the physical page that is numbered 1. To ease specification of page numbers, this option can be used to provide a constant offset to be added to all succeeding page numbers specified in -o switches. That offset remains in effect until overridden by a later -offset# switch.
- -outfile:filename
- Normally, the drivers automatically construct an output file name by supplying a distinguishing file extension to the base name of the input \*(fT.dvi\*(fP file. When disk space is scarce, it may be necessary to put the output on a different file system. Similarly, when output is to be sent to a printer on PC DOS, time and disk space can be saved if the output file is the printer device, \*(fTPRN\*(fP. This option provides for these needs. When this option is used, it applies to all \*(fT.dvi\*(fP files on the command line, and the output will be the concatenation of the normal output files. Care should be exercised in multiprocessing operating systems when this option is used to send the output directly to a spooler directory; on some systems, the spooler could begin reading it before it has been completely written. In most systems, the spooler software would be prevented from reading the file until it had been properly closed. Use of this option on PC DOS is not likely to work for the serial ports, \*(fTCOMn:\*(fP, because the standard serial port device driver does not provide the XON/XOFF flow control expected by most printers; printer buffer overrun will result in data loss and incorrect output. For a printer on a parallel port, -outfile:prn should result in error-free transmission.
- -outsuffix:name
- On systems that support long names, the default output file extension is \*(fT.dvi-xyz\*(fP, where \*(fTxyz\*(fP is the suffix the driver name, \*(fTdvixyz\*(fP. Otherwise, it is \*(fT.xyz\*(fP. This option allows the replacement of the string \*(fTxyz\*(fP with something else.
- -paintmode
- (Device = Canon A2 only). Select paint mode 2.
- -paper:name or -paper:{...}
- The first format selects a paper type by name. The default is -paper:A, which corresponds to US 8.5in x 11in letter paper. The second format defines parameters of a paper type; it should seldom be used on the command line, but instead in an initialization file. See the Initialization Files section. See the Paper Specifications section. The built-in paper types recognized are given in the following table; specifications for others can be set from -paper:{...} options. The suffix ``-L'' indicates landscape mode.
Form Name Width Height A 8.5in 11in A-L 11in 8.5in A4 210mm 297mm A4-L 297mm 210mm B4 250mm 353mm B4-L 353mm 250mm Computer-1411 14in 11in Computer-1411-L 11in 14in Legal 8.5in 13in Legal-L 13in 8.5in Letter 8.5in 11in Letter-L 11in 8.5in US-legal 8.5in 14in US-legal-L 14in 8.5inThe drivers use the paper dimensions to determine the size of the page bitmap needed (if any), and to avoid processing off-page characters.- -preload{[#]}
- Flip or set the flag to inhibit font preloading. This may produce output a few seconds earlier when all pages are output, but should have negligible effect on the execution time, and consequently, should normally not be specified. When individual pages are being printed with the -o# option, preloading is necessary (and will be forced) to ensure that all fonts are defined before they are referenced.
- -print{[#]}
- Flip or set the output spooling flag. This is a synonym for -spooloutput; see its documentation for details.
- -pslevel{[#]}
- Set the \*(Ps language level. This option may be specified for any DVI driver, but is significant only for \*(fTdvialw\*(fP. Older \*(Ps devices (approximately pre-1991) have \*(Ps Level 1, and that is the default language level assumed by \*(fTdvialw\*(fP. Newer devices have \*(Ps Level 2. The most important Level 2 feature for \*(fTdvialw\*(fP is a more compact encoding of binary font data that can reduce the size of the output \*(Ps file by as much as 30%. Thus, if you are sure that you will only need to output to a Level 2 device, then you can specify -pslevel:2 to ask \*(fTdvialw\*(fP to use \*(Ps Level 2 features.
- -quiet{[#]}
- Flip or set the quiet mode flag. Status displays to \*(fTstderr\*(fP are suppressed, unless warning or error messages are issued. For interactive display drivers, warning messages are suppressed.
- -reloadafter#
- Force reloading of all required fonts after printing of \*(fT#\*(fP pages. A zero value (the default) suppresses this action. This provides a mechanism for getting around limited memory of some \*(Ps printers, particularly the Apple LaserWriter.
- -rename:OLDNAME=NEWNAME
- This option provides a way to rename any built-in environment variable name; it would normally be used only in an initialization file.
- -resolution#
- (Device = HP LaserJet only). Specify the LaserJet output resolution in dots per inch. \*(fT#\*(fP must be one of 75, 100, 150, or 300. The actual output file is identical in each case, except for a single escape sequence that sets the resolution; only the size on the output page is changed, because the resolution change is effected by printing 1 x 1, 2 x 2, 3 x 3, or 4 x 4 pixel blocks. (Device = \*(Ps only). Specify the \*(Ps device resolution in dots per inch. Typical values for laser printers are 300, 400, and 600. \*(Ps devices will accept files of different resolutions; however, the character bitmap resampling will degrade output quality.
- -reversevideo{[#]}
- (Driver = \*(fTdvivga\*(fP only). Flip or set the reverse video screen display flag.
- -runlengthcode{[#]}
- (Driver = \*(fTdvidot\*(fP). Flip or set the run-length encoding flag for compression of the output file; the default is no such encoding. Run-length encoding is generally worthwhile with most of the printers supported by \*(fTdvidot\*(fP. However, for the Toshiba P-1351 printer, it reduces the output file size typically by 10% to 40%, but increases host CPU time for the preparation of the output file, and because of poor logic in the printer, may double the print time! The print quality is also substantially worse, so this option is generally not recommended for that printer. It is probably a good idea to experiment with a few typical files before deciding whether on not to make run-length coding the default (by putting -runlengthcode in a driver \*(fT.ini\*(fP file).
- -set:VAR=value
- Define the value of an environment variable on the command line. See the Environment Variables section. The acceptable values for VAR are \*(fTDVIFONTS\*(fP, \*(fTDVIHELP\*(fP, \*(fTDVIINPUTS\*(fP, \*(fTDVISCREEN\*(fP, \*(fTFONTFMT\*(fP, \*(fTFONTMAGS\*(fP, \*(fTFSMAPFILE\*(fP, \*(fTMAKETEXPK\*(fP, \*(fTMISSINGFONTLOG\*(fP, \*(fTPSMAPFILE\*(fP, \*(fTSPOOLFMT\*(fP, \*(fTTEXFONTS\*(fP, \*(fTTEXINPUTS\*(fP and \*(fTTFMFMT\*(fP. The system search path can also be set, though it is unlikely to be useful to do so. Its name is operating-system dependent; typical values are \*(fTPATH\*(fP, \*(fTSYS\*(fP, and \*(fTSYS$SYSTEM\*(fP. Under normal use of the translators, these can be set by TOPS-20 and VAX VMS \*(fTdefine VAR: value\*(fP commands, by a PC DOS \*(fTset VAR=value\*(fP command, or by UNIX \*(fTcsh\*(fP \*(fTsetenv VAR value\*(fP or \*(fTsh\*(fP \*(fTVAR=value\*(fP commands. When the translator is invoked by another program, such as a print spooler, on some systems it may not be possible to set a particular value of an environment variable for the subprocess, so this option gets around this limitation. On most UNIX systems, it should be possible to use the call \*(fTsystem("VAR=value; dvixxx filename")\*(fP.
- -sizelimit#
- (Device = \*(Ps only). Force characters larger than \*(fT#\*(fP pixels wide or high to be reloaded each time they are required. The Version 23.0 \*(Ps interpreter has a bug which manifests itself in fatal ``VM error'' messages when large characters are sent. A reasonable default value has been set for this which should normally avoid the problem. Specifying -sizelimit=0 will cause reloading of every character each time it is used.
- -spooloutput{[#]}
- Flip or set the output spooling flag. For each DVI file processed, type in a TOPS-20 EXEC command \*(fTDVISPOOL: dvifilename\*(fP (on UNIX, \*(fTDVISPOOL dvifilename\*(fP) followed by a newline, or when terminal typein is unavailable, invoke a fresh copy of the command processor to execute the command. The user may then define \*(fTDVISPOOL:\*(fP (or \*(fTDVISPOOL\*(fP) to be a program or shell script which sends the translation of the DVI file to the appropriate output spooler or printing device.
- -squeeze#
- This option is effective only with \*(fTdvialw\*(fP. A value of 1 requests that comments be stripped from \*(Ps files included by \*(fT\special{}\*(fP commands. A value of 2 causes leading and trailing whitespace on each line to be discarded, and adjacent whitespace to be compressed to a single blank. These values can be added to get both options. The default is to copy the \*(Ps file verbatim, since if the file does contain binary data (rare, but legal), this squeezing cannot be done safely. With most \*(Ps files, however, you can use -squeeze:3 without problems.
- -version
- Display the program version number and terminate.
- -x#units
- The -x options specify the left margin of the TeX page on the output page in any of several units. Letter case is not significant in the units field, which must not be separated from the number by any space. \*(fT#\*(fP may be fractional. For example, -x1.0in, -x2.54cm, -x72.27pt, and -x6.0225pc all specify a one-inch left margin. Negative values are permissible, and may be used to shift the output page left (possibly truncating it on the left) in order to display a wide TeX page. The units field may be one of
bp big point (1in = 72bp) cc cicero (1cc = 12dd) cm centimeter (1in = 2.54cm) dd didot point (1157dd = 1238pt) in inch mm millimeter (10mm = 1cm) pc pica (1pc = 12pt) pt point (72.27pt = 1in) sp scaled point (65536sp = 1pt)If a unit is omitted, big points are assumed.- -y#units
- The -y options specify the top margin of the TeX page on the output page in any of the indicated units. Letter case is not significant in the unit field, which must not be separated from the number by any space. \*(fT#\*(fP may be fractional. For example, -y1.0in, -y2.54cm, -y72.27pt, and -y6.0225pc all specify a one-inch top margin. Negative values are permissible, and may be used to shift the output page up (possibly truncating it on the top) in order to display a long TeX page. By decree of the Stanford TeX Project, the default TeX page origin is always 1 inch over and down from the top-left page corner, even when non-American paper sizes are used. This corresponds to the switch settings -x1in -y1in; these values are assumed unless overridden.
\*(fT % latex biblio.ltx This is TeX, C Version 3.14 (biblio.ltx LaTeX Version 2.09 <14 January 1991> (/usr/local/lib/tex/latex/report.sty Document Style `report' <24 May 89>. (/usr/local/lib/tex/latex/rep11.sty) (/usr/local/lib/tex/latex/titlepage.sty)) (mybiblio.sty Mybibliography environment style - Version 0.0 - 15-May-1986 ) (biblio.aux) [0] (biblio1.ltx [1] [2] [3] [4] [5] [6] [7]) [8] (biblio.aux) ) (see the transcript file for additional information) Output written on biblio.dvi (9 pages, 18728 bytes). Transcript written on biblio.log. % dvialw -x0.3in -y0.2in biblio ~/tex/ndvi/test/story [TeX DVI Translator Version 3.0.116 [18-Mar-1992]] [PostScript [300-dpi laser printers]] [Compiled on Mar 19 1992 08:08:55 by <beebe@solitude.math.utah.edu>] [Input from DVI file biblio.dvi] [Output on file biblio.dvi-alw] [9 pages] [1500 magnification] [TeX output 1992.03.21:1422] [9{8}] [8{7}] [7{6}] [6{5}] [5{4}] [4{3}] [3{2}] [2{1}] [1{0}] [OK] [Input from DVI file /u/sy/beebe/tex/ndvi/test/story.dvi] [Output on file /u/sy/beebe/tex/ndvi/test/story.dvi-alw] [1 page] [1500 magnification] [TeX output 1988.01.21:0840] [1{1}] [OK] \*(fPWhen the TOPS-20 version of TeX finishes execution, it normally simulates terminal input of a line of the form
\*(fT TeXspool: dvifile \*(fPwithout supplying a final carriage return. The default value of the logical name \*(fTTeXspool:\*(fP points to a dummy program which does nothing, so if you just type a carriage return yourself, the line is effectively ignored. This is reasonable in that it usually takes several trips through TeX before you have a \*(fT.dvi\*(fP file worth printing. If you like, you can redefine \*(fTTeXspool:\*(fP to point to your favorite DVI translator, for example,
\*(fT define TeXspool: sys:dvialw.exe \*(fPThen when you type a carriage return when TeX finishes, it will run the translator immediately, saving you a line of typing. If you do not want the translator to run, just cancel the line by typing \*(fTCtl-U\*(fP or \*(fTCtl-C\*(fP. A sample invocation of \*(fTdvitype\*(fP is as follows:
\*(fT @dvitype DVIFILE : story.dvi OUTPUT : tty: This is DVItype, Tops-20 Version 2.8 Output level (default=3, ? for help): Starting page (default=*): Maximum number of pages (default=1000000): Assumed device resolution in pixels per inch (default=300/1): New magnification (default=0 to keep the old one): Options selected: Starting page = * Maximum number of pages = 1000000 Output level = 3 (the works) Resolution = 300.00000000 pixels per inch numerator/denominator=25400000/473628672 magnification=1000; 0.00006334 pixels per DVI unit ' TeX output 1986.06.20:1039' Postamble starts at byte 569. maxv=43725786, maxh=30785863, maxstackdepth=3, totalpages=1 Font 33: amsl10---loaded at size 655360 DVI units Font 23: ambx10---loaded at size 655360 DVI units ...and so on... \*(fP
\*(fT find /usr/local/lib/tex/fonts -print | sort >texfiles.map \*(fPwould install all font file names in the cache file. Any file name, not just font file names, can be stored in the cache, and if desired, the contents of the cache can be customized to store only the most commonly-used files. The file names read from the cache file are decomposed into a directory part and a base file name part, and the base name is used as the lookup key. For example, the UNIX file name \*(fT/usr/local/lib/tex/fonts/cm/cmr10.tfm\*(fP would be retrieved with a lookup key \*(fTcmr10.tfm\*(fP. If duplicate keys are found in the cache file, a warning is issued, and only the most recent entry is saved. Use of the base name of font files as the lookup key is less successful on file systems with seriously limited name lengths, such as PC DOS, because the magnification must be stored in the directory name, resulting in many identical base file names. In such a case, one should only cache font file names for the most commonly-needed magnification. The order of the file names in the cache file has no bearing on lookup efficiency, but does affect memory requirements. To save memory, only one copy of successive identical directory names is stored. At the author's site, a sorted 164KB cache file with about 3400 file names takes only 96KB of memory, and even that large a cache can be created in a fraction of a second. For convenience, the cache file may contain comments from percent to end-of-line, just like TeX, and leading and trailing white space around file names is ignored.
- If a file name cache exists, the file name is searched for there. If an absolute file name is found, then that name is used, and the file system is not consulted.
- If the cache lookup fails, then the file is searched for in each directory in the search path in turn, from the first directory to the last. If the file is found to exist, then that name is used.
A subsequent attempt to open the file may fail if the file is not actually found in the file system, or is inaccessible to the user. In such a case, a suitable message will be issued. In the event of duplicate file names in the search path, the directory search order will not be obeyed if the cache lookup is successful. The search path used depends on the file type: font file lookups use the \*(fTDVIFONTS\*(fP path, and all others (accounting, font substitution, initialization, map, option, and \*(fT\special\*(fP) use the current directory, then the \*(fTDVIINPUTS\*(fP path. If \*(fTDVIFONTS\*(fP is not set, then the value of \*(fTTEXFONTS\*(fP is copied into it at driver startup. Similarly, if \*(fTDVIINPUTS\*(fP is not set, the value of \*(fTTEXINPUTS\*(fP is copied into it. Compile-time default values for search paths may be overridden by values from run-time initialization files, environment variables, and command-line options, in that order. The compiled-in names of all environment variables, including those that name search paths, may be changed by -rename options in initialization files or on the command line. For font files, the search is more complicated, because TeX usually does not record font file names in the \*(fT.dvi\*(fP file, but only a base font name, like cmr10, and a magnification. DVI drivers must map this information into a file name, and since several font file formats are supported, there are correspondingly many possible font file names. The \*(fTFONTFMT\*(fP variable provides a list of file name templates, usually excluding directory specifications, to specify the order and types of font files to look for. At many sites, this might include just PK and VF font types, in that order, but more generally, could include PK, GF, PXL, and VF fonts in any desired order. Usually PK or GF types would precede VF types in the list, because most TeX jobs use native TeX fonts more frequently than virtual fonts, and it is more efficient to look first for the more common types. The drivers first attempt to find a font file for the specified magnification, trying each \*(fTFONTFMT\*(fP template in turn, and for each such name, the file name cache and if necessary, the \*(fTDVIFONTS\*(fP search path, are consulted. If that fails, then the drivers invoke a subprocess to create the required font dynamically, and the previous search steps are repeated. If that still fails, the font substitution file is consulted to find an alternate font name, and possibly, alternate font magnification, and if a substitution is found, the search steps are repeated. If that too fails, then the original font name is restored, and the magnification is reset to the closest known magnification, and the first search procedure is repeated. The known magnifications are set at compile time, but possibly overridden at run time by the \*(fTFONTMAGS\*(fP variable. However, this time, if the search fails, no attempt will be made to create a font dynamically, but font substitution will be still be attempted. If this is still unsuccessful, the next closest magnification to the original is attempted, and the process is repeated, until all known magnifications have been considered. If no font file can be found by this exhausting search, the drivers use the \*(fTTFMFMT\*(fP variable to construct a TeX font metric file name, and search for it in the file name cache and if necessary, in the \*(fTDVIFONTS\*(fP directories. If the font metrics are available, then correct character spacing can be maintained even if the character shapes are empty. If no font metric file can be found, then the search is terminated, and execution proceeds with a font with zero-size characters and empty shapes. Because TeX frequently typesets successive characters with commands to advance the horizontal position by the width of the current character, lack of character metrics means that following characters on the line will likely be positioned incorrectly. A warning message is always issued if font substitution occurs, or a nearby magnification is used, or no shapes are available, to alert the user that the output is not completely correct.
\*(fT MakeTeXPK fontname dpi basedpi magnification [mode [subdir]] \*(fPFor example, if the font \*(fTcmtt10\*(fP is needed at magstep 2, the command
\*(fT MakeTeXPK cmr10 432 300 'magstep(2)' \*(fPcould be issued to create a suitable font for a 300-dpi output device. The value of \*(fTMAKETEXPK\*(fP is a string containing the command name, with format items \*(fT%%\*(fP (literal percent), \*(fT%b\*(fP (base device dots/inch), \*(fT%d\*(fP (this font's dots/inch), \*(fT%m\*(fP (METAFONT magnification), and \*(fT%n\*(fP (font name). For example, at the author's UNIX site, \*(fTMAKETEXPK\*(fP is set in an initialization file to
\*(fT MakeTeXPK %n %d %b %m "" /%bdpi \*(fPThe last command-line argument names a subdirectory that includes the device resolution, to separate fonts for different printers. The \*(fTMakeTeXPK\*(fP program is a shell script that knows how to invoke METAFONT and store the generated font in a publicly-writable directory that must be included in the \*(fTDVIFONTS\*(fP search path. The advantage of dynamic font creation is that fonts can be generated as needed, so the site administrator is freed from predicting what fonts will be required. For example, the AMS fonts require about 9MB at 300 dpi, and more than 25MB at 600 dpi, so at the author's site, the 600-dpi ones are generated only as they are actually used. The drawback is that a user who sets the font search path incorrectly may regenerate a lot of fonts unnecessarily. If dynamic font creation is suppressed, then suitable commands to create the fonts later are recorded in a log file whose name may be set by the \*(fTMISSINGFONTLOG\*(fP environment variable.
\*(fT % comment oldname.oldmag -> subname.submag % comment oldname oldmag -> subname submag % comment oldname -> subname % comment \*(fPExamples are:
\*(fT % These provide replacements for some LaTeX invisible fonts: iamr10 1500 -> amr10 1500 % comment iamr10.1500 -> amr10.1500 % comment iamssb8 -> amssb8 % comment \*(fPThe first two forms request substitution of a particular font and magnification. The third form substitutes an entire font family; the closest available magnification to the required one will be used. Any dots in the non-comment portion will be converted to spaces, and therefore, cannot be part of a name field. The first matching substitution will be selected, so magnification-specific substitutions should be given first, before family substitutions. Comments are introduced by percent and continue to end-of-line, just as for TeX. One whitespace character is equivalent to any amount of whitespace. Whitespace and comments are optional. Pattern matching wildcard characters may be used in the \*(fToldname\*(fP, \*(fToldmag\*(fP, \*(fTsubname\*(fP, and \*(fTsubmag\*(fP fields:
- * matches zero or more of any character;
- ? matches exactly one of any character.
In \*(fToldname\*(fP and \*(fToldmag\*(fP, the wildcard matching is against the font name and magnification from the DVI file. On a successful match, the \*(fToldxxx\*(fP value is replaced by the corresponding value from the DVI file. In \*(fTsubname\*(fP and \*(fTsubmag\*(fP, wildcard matching is against \*(fToldname\*(fP and \*(fToldmag\*(fP. On a successful match, \*(fTsubxxx\*(fP is replaced by the corresponding \*(fToldxxx\*(fP value. Some examples may clarify this:
\*(fT *.1499 -> *.1500 % replace 1499 mag fonts by 1500 fonts cm*.848 -> *.849 % replace cm 848 mag fonts by 849 mag amr10.* -> cmr10.* % replace mags of amr10 by cmr10 mags *.* -> cmtt10.* % replace missing fonts by cmtt10 fonts \*(fPThe following usage is not supported, because there is no code implemented yet to make partial substitutions.
\*(fT am*.* -> cm*.* % replace all am fonts by cm fonts \*(fP
- They provide a way to renumber characters within a font.
- They permit creation of new fonts from characters of existing fonts.
- They provide a consistent mechanism for making device-resident fonts available for use with TeX.
Knuth went further, however, allowing a character from a virtual font to be described in terms of the commands available in DVI files. A virtual font character can be made up of an arbitrary number of characters from other fonts, even virtual ones, and even the same virtual font. It can incorporate positioning commands, horizontal and vertical rules, and even TeX \*(fT\special\*(fP commands. With the latter, a font could be made to consist of arbitrarily-complex line drawings and raster images using color and grey-scale. A considerable amount of work is necessary to create descriptions of virtual fonts and to prepare TeX macros to make the fonts readily usable, and DVI drivers must be extended to deal with the new font format. We cannot treat these issues here, but it is necessary to sketch how virtual fonts are used in practice, and how the DVI drivers make use of them. The treatment here focuses on \*(Ps fonts; this DVI driver family at present contains support for device-resident fonts only in the \*(Ps driver, \*(fTdvialw\*(fP. Future versions of \*(fTdvijep\*(fP may provide support for Hewlett-Packard PCL fonts in the widely-used LaserJet and DeskJet printers. Suppose that you wish to use the \*(Ps New Century Schoolbook fonts for a document. The first step is to obtain a suitable macro file to make their use transparent. Tom Rokicki's \*(fTdvips\*(fP distribution contains LaTeX styles for all of the \*(Ps fonts commonly found in laser printers, and normally, these are stored in a TeX subdirectory named \*(fTps\*(fP in the top-level TeX directory. The one we want is \*(fTncs.sty\*(fP, and it can be used like this:
\*(fT \documentstyle[ncs]{article} \*(fP\*(fTncs.sty\*(fP contains references to several virtual fonts with names like pncr (New Century Schoolbook Roman), pcrr (Courier), and phvr (Helvetica), corresponding to virtual font files \*(fTpncr.vf\*(fP, \*(fTpcrr.vf\*(fP, and \*(fTphvr.vf\*(fP, usually stored in a subdirectory named \*(fTvf\*(fP in the main TeX fonts directory. Each of these \*(fT.vf\*(fP files has a corresponding TeX font metric file with extension \*(fT.tfm\*(fP. The initial letter `p' in the font names stands for \*(Ps. Plain TeX users could employ these fonts with commands like
\*(fT \font \tentt = pccr at 10pt \font \tensf = phvr at 10pt \font \tenrm = pncr at 10pt \font \sevenrm = pncr at 7pt \font \fiverm = pncr at 5pt \*(fPThe reason that cryptic short names are used for the TeX font names is that some operating systems have severe limits on the lengths of file names, and on the characters permitted in file names. TeX expects to be able to append the extension \*(fT.tfm\*(fP to the font name to obtain a font metric file name. Thus, a TeX font definition
\*(fT \font \twentyfivesl = Helvetica-Narrow-BoldOblique at 25pt \*(fPwould require a file named \*(fTHelvetica-Narrow-BoldOblique.tfm\*(fP, and since such a filename cannot be stored in all file systems, document portability would be lost. The cryptic names have been chosen to be representable in file names across all common operating systems, and the long case-sensitive \*(Ps font names that they correspond to are stored as text in the font mapping file. See Karl Berry, Filenames for fonts, TUGboat 11(4), 517\(mi520, November (1990) for more details. Application of the \*(fTvptovf\*(fP utility to the binary \*(fTpncr.vf\*(fP file produces a human-readable property-list file, \*(fTpncr.vpl\*(fP, and examination of that file uncovers references to another font named rpncr. However, that font has only a TeX font metric file, \*(fTrpncr.tfm\*(fP. rpncr is a device-resident font available on most \*(Ps laser printers, and the initial `r' in the name stands for resident. The DVI file created by TeX will contain references to fonts named pncr, pcrr, and phvr, but not to the names New Century Schoolbook, Courier, and Helvetica. How then does a DVI driver make the connection? The answer lies in the \*(Ps font map file, defined by the \*(fTPSMAPFILE\*(fP variable. The default name of this file on most operating systems is \*(fTpsfonts.map\*(fP, and it is found in the \*(fTDVIINPUTS\*(fP search path. These DVI drivers recognize the same format of this file as does Rokicki's \*(fTdvips\*(fP, and in addition, support comments from percent to end-of-line. Relevant lines of this file contain
\*(fT rpcrr Courier rphvr Helvetica rpncr NewCenturySchlbk-Roman \*(fPwhich map the TeX font name on the left to the \*(Ps font name on the right. With suitable macros in the \*(Ps prolog of the DVI driver output, fancier things are possible. \*(fTdvialw\*(fP and \*(fTdvips\*(fP both recognize forms like these:
\*(fT rphvrrn Helvetica-Narrow "/Helvetica .82 ExtendFont" rpoprrn Optima-Narrow <Optima.pfb "/Optima .82 ExtendFont" rpplro Palatino-Oblique "/Palatino-Roman .167 SlantFont" rpstrn StoneInformal <StoneInformal.pfb rptmrre Times-Expanded "/Times-Roman 1.2 ExtendFont" rptmrrn Times-Narrow "/Times-Roman .8 ExtendFont" rputr Utopia-Regular <putr.pfa \*(fPThe optional third and fourth fields in each mapping are quoted strings defining a font transformation to stretch, shrink, or slant an existing font, or are file names of downloadable \*(Ps fonts following a left angle bracket. That character is the UNIX shell symbol for ``take input from''. The file extensions \*(fT.pfa\*(fP and \*(fT.pfb\*(fP stand for \*(Ps font--ASCII and \*(Ps font--binary, respectively, and the files are found in the \*(fTDVIFONTS\*(fP search path, possibly in the \*(fTvf\*(fP TeX subdirectory. In most cases, downloadable \*(Ps fonts are proprietary, and usable only under license for a fee. However, the X Window System distribution contains downloadable files for two font families, Charter (donated by Bitstream), and Utopia (donated by Adobe) which may be freely used provided their copyrights and source are acknowledged. The Utopia fonts are provided in \*(fT.pfa\*(fP format, and the Charter fonts are in binary \*(fT.pfb\*(fP format. The binary format contains embedded record type and record length fields, so it cannot just be copied verbatim to the PostScript output. \*(fTdvialw\*(fP recognizes the binary format automatically, and converts it on-the-fly to text format. We finish this section by revealing where the TeX font metric files for device-resident fonts come from. When native TeX fonts are created by METAFONT, both TeX font metric (\*(fT.tfm\*(fP) files and font shape (\*(fT.gf\*(fP) files are produced. In order to use device-resident fonts, TeX needs only their metrics. The DVI drivers need the shapes, and sometimes, the metrics. Getting the font metrics can be a difficult job, since some font and typesetter vendors refuse to release that information. Fortunately, Adobe Systems, who developed the \*(Ps language, make font metrics for all of their font offerings (about 2000 typefaces) freely available in the form of Adobe font metric (\*(fT.afm\*(fP) files. These are text files in a relatively simple format that tools like \*(fTafm2tfm\*(fP and \*(fTafmtfm\*(fP can convert to TeX font metric files. Your file system may already contain a sizable collection of Adobe font metric files, since they are distributed with many \*(Ps-producing software packages. Alternatively, you can get them electronically by sending an electronic mail message with the text \*(fThelp\*(fP to \*(fTps-file-server@adobe.com\*(fP. You should be aware that the \*(fT.afm\*(fP files change from time to time, as Adobe font designers tune the appearance of fonts, and add kerning information that was absent from early releases, so be sure to get the latest versions. If you send your documents to others in electronic form, you will need to ensure that they have the same font metrics at their sites, unless you distribute only the \*(Ps files output by DVI drivers, which should be self-contained and processable on any \*(Ps device. You should also ensure that they have the same virtual font files: at least one published book has been blemished by a mismatch in virtual font mappings between the authors and publishers that resulted in wrong symbols being printed for some characters.
\*(fT\a\*(fP alarm bell \*(fT\b\*(fP backspace \*(fT\f\*(fP formfeed \*(fT\n\*(fP newline \*(fT\r\*(fP carriage return \*(fT\t\*(fP horizontal tab \*(fT\v\*(fP vertical tab \*(fT\\\*(fP backslash \*(fT\'\*(fP apostrophe (single quote) \*(fT\"\*(fP quotation mark (double quote) \*(fT\ooo\*(fP octal character value \*(fT\xhh\*(fP hexadecimal character valueAn octal character value may have only one to three octal digits (0\(mi7). A hexadecimal character value may have any number of hexadecimal digits (0\(mi9 A\(miF a\(mif), so as to support character sets with more than 9 bits per character. The other kind of string is delimited by single quotes; only escape-single-quote pairs are recognized inside it. This is more convenient when it is necessary to have strings with backslashes as normal characters, since it then avoids having to double all of them. For example, the two strings \*(fT'c:\book\fig1.ps'\*(fP and \*(fT"c:\\book\\fig1.ps"\*(fP reduce to the same value, namely \*(fTc:\book\fig1.ps\*(fP. Adjacent strings are concatenated, making it easy to specify long strings in a readable fashion, unhampered by file system line length restrictions. Thus, \*(fT"foo" "bar"\*(fP is equivalent to \*(fT"foobar"\*(fP. Strings may contain any character representable in the host character set, including NUL (which in C terminates a string). There is no limit, other than available computer memory, on the size of a string. Numbers may be either integer or floating-point; they are parsed using the ANSI C library routine \*(fTstrtod()\*(fP. Dimensions must include one of the standard TeX units, like those supported on the -x and -y switches. Here are the keywords recognized:
Keyword Type Description \*(fTdev_init\*(fP string initiate device use of paper \*(fTdev_term\*(fP string terminate device use of paper \*(fTheight\*(fP dimension paper height \*(fToutput_order\*(fP number negative for printing last to first \*(fTpaper\*(fP string paper form name \*(fTuse\*(fP string name of copied paper form \*(fTwidth\*(fP dimension paper width \*(fTx_clip\*(fP number clip in x direction if non-zero \*(fTx_left\*(fP dimension width of left unprintable margin \*(fTx_right\*(fP dimension width of right unprintable margin \*(fTx_origin\*(fP dimension horizontal offset of TeX (0,0) point \*(fTy_bottom\*(fP dimension width of bottom unprintable margin \*(fTy_clip\*(fP number clip in y direction if non-zero \*(fTy_origin\*(fP dimension vertical offset of TeX (0,0) point \*(fTy_top\*(fP dimension width of top unprintable marginThe \*(fTpaper\*(fP keyword defines a name that is used to tag the collected parameters. If the form name already exists, assignments will replace previous values. Otherwise, a new form is created. The \*(fTuse\*(fP keyword names an existing form whose parameters are to be copied to a new one named by the \*(fTpaper\*(fP keyword in the same program. This copying happens before any of the other keyword assignments are done. The order of the statements in the program does not matter, because the results of the assignments are collected in a temporary form before copying to the specified form. Recursive forms references are supported; just don't make them circular! The \*(fTuse\*(fP keyword should normally be used to make private modifications of standard forms types. Some printers misbehave if they are presented with data that are off the page, or too close to the margins; for example, the Hewlett-Packard LaserJet wraps such coordinates horizontally. For such devices, the \*(fTx_clip\*(fP and \*(fTy_clip\*(fP values should be set non-zero. Few printers place the (0,0) origin exactly in the upper-left page corner; instead, they have it slightly offset at some other point, which we call (\*(fTx_origin\*(fP,\*(fTy_origin\*(fP). The standard LaTeX file, \*(fTtestpage.tex\*(fP, can be used to determine the correct settings of these values. If you print its typeset output, the upper-left corner of the inner frame should be exactly one inch from the page edges. Suppose you actually find that that corner lies 0.75in from the left edge, and 1.1in from the top edge. This means the printer's (0,0) point is to the left, and just below, the upper-left corner. Setting \*(fTx_origin = -0.25in\*(fP and \*(fTy_origin = 0.1in\*(fP will compensate, so the next time you print the test page, the inner frame should be correctly positioned. Most printers are incapable of printing very close to the edges of the physical page; the margin values \*(fTx_left\*(fP, \*(fTx_right\*(fP, \*(fTy_bottom\*(fP, and \*(fTy_top\*(fP should be set to indicate the relevant limits. Sometimes these values can be found in the printer documentation. However, if the physical paper position relative to the printing mechanism is adjustable, as it is for most dot matrix printers, you may have to experiment. If you print the \*(fTtestpage.tex\*(fP typeset output, the tick marks in the four margins will usually not print near the paper edges; use them as a guide to setting reasonable values for the margin values. DVI drivers that require a page bitmap will not allocate memory corresponding to the paper surface outside of these margins. Wide margin settings can therefore reduce the amount of memory required; that in turn can reduce the number of bitmap strips that must be processed for high-resolution printers, speeding the output. The standard TeX and LaTeX macro packages are parametrized to assume that the TeX (0,0) point will be exactly one inch from the left and top paper edges. They also usually assume American paper sizes. Text widths and heights are then chosen to ensure identical top and bottom margins, and usually, identical left and right margins (except for two-sided printing styles). While the DVI driver -x and -y command line options can be used to adjust the output position, it is usually better to do so by setting paper parameters. For example, ISO A4 paper is 210mm (8.2677in) wide; TeX macro packages assume 6.5in text width with 1in left and right margins. To center that text on A4 paper, the 1in margins need to be reduced by (8.5 - 8.2677)/2 = 0.1161in, so we could put \*(fTx_origin = +0.1161in\*(fP. Similarly, the A4 height of 297mm (11.6929in) exceeds the 11in U. S. paper height, and requires adding (11.6929 - 11.0)/2 = 0.3465in to the top and bottom margins. That can be accomplished by setting \*(fTy_origin = -0.3465in\*(fP. Of course, if you already have non-zero values of these parameters, you will have to adjust them accordingly; just add the above offsets to the existing values. If you routinely use non-American paper sizes, then you probably should be using a style file modification that accounts for the different page dimensions, rather than fiddling with paper positioning on your output device. The \*(fToutput_order\*(fP value should be set negative if you want pages printed from last to first. This provides an alternate to the -backwards command line option, but affects only the paper forms types it is defined for. If \*(fToutput_order\*(fP is negative, the DVI drivers will simply flip the current setting of the backwards-printing switch, which may have already been set from the command line. If the printer needs to receive some magic codes to select an alternate paper type (e.g. some high-speed laser printers support multiple input paper trays), it will be necessary for the DVI driver to write them into the output file. The \*(fTdev_init\*(fP and \*(fTdev_term\*(fP strings provide for this. The DVI drivers output the initialization string at the start of the job, and the termination string at the end. These are output verbatim with nothing added, not even a newline. For example, if you are using the \*(Ps driver, \*(fTdvialw\*(fP, on a system that does not have a \*(Ps printer spooler, you might want the end of the file to have the \*(Ps serial line job terminator character, \*(fTCtl-D\*(fP. You could arrange that by setting
\*(fT dev_term = "\ 04"; \*(fPin a paper program. The DVI drivers already know how to initialize and terminate their output devices under normal conditions, so you should rarely need to specify \*(fTdev_init\*(fP and \*(fTdev_term\*(fP values.
Function Description \*(fTexit_level\*(fP return from current display level \*(fTfirst_page\*(fP go to first document page \*(fTgoto_page\*(fP go to n-th document page \*(fThelp\*(fP ask for help \*(fThome_window\*(fP set window to original position \*(fThorizontal_scroll_fraction\*(fP overlap for horizontal scroll \*(fThorizontal_move_fraction\*(fP overlap for horizontal move \*(fTlast_page\*(fP go to last document page \*(fTmove_down\*(fP move text down \*(fTmove_left\*(fP move text left \*(fTmove_right\*(fP move text right \*(fTmove_up\*(fP move text up \*(fTnext_page\*(fP go to next page \*(fTnoop\*(fP do nothing \*(fTprevious_page\*(fP go to previous page \*(fTquit\*(fP quit program execution \*(fTredisplay\*(fP redisplay current page \*(fTscroll_down\*(fP scroll window down \*(fTscroll_left\*(fP scroll window left \*(fTscroll_right\*(fP scroll window right \*(fTscroll_up\*(fP scroll window up \*(fTsearch_backward\*(fP search DVI file backward \*(fTsearch_forward\*(fP search DVI file forward \*(fTuniversal_argument\*(fP argument multiplier prefix \*(fTvertical_move_fraction\*(fP overlap for vertical move \*(fTvertical_scroll_fraction\*(fP overlap for vertical scroll \*(fTzoom_down\*(fP redisplay at lower magnification \*(fTzoom_up\*(fP redisplay at higher magnificationThe default key bindings established at run-time are equivalent to the following settings:
\*(fT -keybindings:{ exit_level = "E"; first_page = "["; goto_page = "G"; help = "?"; home_window = "H"; last_page = "]"; next_page = "N"; previous_page = "P"; quit = "Q"; redisplay = "."; scroll_down = "D"; scroll_left = "L"; scroll_right = "R"; scroll_up = "U"; search_backward = "B"; search_forward = "S"; universal_argument = "#"; zoom_up = "Z"; } -keybindings:{ horizontal_move_fraction = 0.03125; horizontal_scroll_fraction = 0.9; move_down = "d"; move_left = "l"; move_right = "r"; move_up = "u"; next_page = " "; quit = "C-c"; universal_argument = "C-u"; vertical_move_fraction = 0.03125; vertical_scroll_fraction = 0.9; zoom_down = "z"; } \*(fPFor interactive drivers on the IBM PC, the cursor keypad keys are also bound to obvious functions. Note that a few functions are bound to more than one key; for example, \*(fTN\*(fP, \*(fTn\*(fP, or a space will move to the next page. Some bindings are made case sensitive, with the upper-case letter bound to a function that does something `larger' (zoom up, or move with a bigger step size) than the corresponding function bound to the matching lower-case letter. Because only one key value can be assigned to a function in a single -keybindings program, more than one program will be needed to give several keys the same meaning. The \*(fTmove\*(fP commands are intended to give small screen movements, and the \*(fTscroll\*(fP commands, larger displacements. The distance moved is governed by the horizontal and vertical move and scroll fractions. The default move values are 1/32 of the screen size, and the scroll values are 9/10 of the screen size. Scroll values somewhat less than 1.0 are recommended, so as to provide contextual overlap between successive views; failure to provide that overlap tends to disorient the user. Most functions accept a numeric argument, and repeat their operation that many times. The default argument is always one. For example, with the default bindings given above, the input sequence \*(fT#25G\*(fP would go to the 25-th page in the DVI file (which would usually be different than page 25). EMACS users are accustomed to the \*(fTuniversal_argument\*(fP function bound by default to \*(fTCtl-U\*(fP; each one multiplies the current argument by four. Thus, the input \*(fTCtl-U\*(fP \*(fTCtl-U\*(fP \*(fTG\*(fP would go to page 16; \*(fTCtl-U\*(fP \*(fT16G\*(fP and \*(fTCtl-U\*(fP \*(fTCtl-U\*(fP \*(fTCtl-U\*(fP \*(fTG\*(fP would both go to page 64.
- redisplay of the current page, possibly shifting it up, down, left, or right, to see more of it, or to restore a display trashed by an unexpected system message or transmission line error;
- continuation to the next page in the \*(fT.dvi\*(fP file;
- backing up to the previous page (useful if you overshoot);
- display of an arbitrary page by typing its sequence number;
- searching forwards or backwards in the \*(fT.dvi\*(fP file for the n-th occurrence of a text string;
- termination of execution.
The available commands are given elsewhere. See the Key Bindings section. Keyboard input is immediate; no terminating carriage return is necessary. Consequently, typing error correction is supported only for digit strings; they end at the first non-digit typed. The search commands accept an input string, scan the text-setting commands in the DVI file for that string, and then display the page in which the match was found. Letter case is ignored, and only alphanumeric characters in the string are matched, because other characters are often assigned to special font symbols. Thus, searching for the string \*(fTfoo.bar\*(fP will match against \*(fTFoo\*(fP followed by any number of non-alphanumeric characters followed by \*(fTBAR\*(fP; the string will also match \*(fTFooBar\*(fP. In the current implementation, searches do not cross page boundaries; a partial successful match at the end of a page will be accepted as a complete match. Zooming requires unloading all current fonts, and then reloading new ones; expect an initial delay of several tens of seconds when you use these options. It is likely that some font magnifications will be unavailable for zooming, so do not be alarmed if some characters are displayed as blanks when you do this. You can use the font substitution mechanism (-fontsubfile option above) to work around this, or you can ask your font administrator to generate the required magnifications. When font substitution happens because of an unavailable magnification, characters of an incorrect size are used with the spacing required for the font which TeX used, so output is likely to look peculiar. To avoid exhausting the BBN BitGraph terminal's font memory, larger characters as sent as raster bitmaps each time they are used, rather than as downloaded fonts, making the screen display much slower. The size limit is large enough that this should not be necessary except at large magnifications.
Keyword Type Description \*(fTboundingbox\*(fP string plot bounding box dimensions (partially implemented) \*(fTgraphics\*(fP string low-level graphics commands (not yet implemented) \*(fTinclude\*(fP string plot file at current point \*(fTlanguage\*(fP string device language \*(fTliteral\*(fP string device-dependent literal text \*(fTmessage\*(fP string text to be displayed on terminal \*(fToptions\*(fP string miscellaneous options (not yet implemented) \*(fToverlay\*(fP string plot file overlayed on page \*(fTposition\*(fP string plot positioning options (partially implemented)\*(fT\special{}\*(fP support is continually evolving in the DVI drivers, with initial prototyping being done with \*(fTdvialw\*(fP, which supports the most powerful output device language, namely, \*(Ps. Drivers which do not support some features of \*(fT\special{}\*(fP will simply issue a warning message and then continue processing. The \*(fTlanguage\*(fP keyword specifies the output device language for which the \*(fT\special{}\*(fP is intended to apply. If it is given, the string value is checked against the types the driver is prepared to process (letter case is ignored); a mismatch results in the \*(fT\special{}\*(fP being silently ignored. If it is omitted, then a `generic' \*(fT\special{}\*(fP is assumed, and processing will continue. For \*(Ps in \*(fTdvialw\*(fP, the language keyword should specify \*(fT"PS"\*(fP or \*(fT"PostScript"\*(fP. All drivers recognize their own names as a language type; they determine this from the name the program is invoked with, not from a compiled-in constant. You can exploit this to make a private \*(fT\special{}\*(fP language type just by running a driver under a different name. The \*(fTboundingbox\*(fP keyword should have a string value giving the dimensions of the bounding box of the plot, in order lower-left x, lower-left y, upper-right x, and upper-right y (just like the \*(Ps \*(fT%%BoundingBox\*(fP comment). If the values omit dimension units, big points are assumed. The \*(fTliteral\*(fP keyword specifies a device-dependent string to be sent to the output device verbatim. If \*(fTinclude\*(fP or \*(fToverlay\*(fP files are given, their contents are transmitted after the literal string. That order is likely to be most useful. Separate adjacent \*(fT\special{}\*(fP commands can be used to force any other required order. For drivers that process a page bitmap, processing of \*(fT\special{}\*(fP strings is skipped unless the TeX page position is the current strip, to avoid executing the same \*(fT\special{}\*(fP more than once. Any output produced by the \*(fT\special{}\*(fP will appear before that from the current strip. The \*(fTmessage\*(fP keyword specifies a string that is to be displayed on \*(fTstderr\*(fP. It can be used to send messages to the user, much like the TeX \*(fT\message\*(fP and LaTeX \*(fT\typeout\*(fP commands. The \*(fToptions\*(fP keyword is recognized, but not yet implemented. It is intended to supply miscellaneous device-dependent options to the \*(fTspecial()\*(fP function. The \*(fTposition\*(fP keyword specifies a string that should contain two words. The first should be one of \*(fTtop\*(fP, \*(fTmiddle\*(fP, or \*(fTbottom\*(fP, and the second should be one of \*(fTleft\*(fP, \*(fTcenter\*(fP, or \*(fTright\*(fP. These words may be abbreviated to a single letter if desired. Together, they select on the bounding box one of nine points (corners, edge centers, and box center) which is to be placed at the TeX current point. If this keyword is not given, the default is
\*(fT position = "top left"; \*(fPThe point selected by this keyword (or by default) will be called the reference point in the following. Graphics file insertion is supported with the \*(fTinclude\*(fP and \*(fToverlay\*(fP keywords. With \*(fTinclude "filename"\*(fP, the file to be included will be mapped onto the page with its reference point at the TeX current point. With \*(fToverlay "filename"\*(fP, the file to be included will be overlaid onto the page such that the plot and page share a common lower-left corner. Files are searched for first in the current directory, and then in the \*(fTDVIINPUTS\*(fP search path. With the exception of \*(fTdvialw\*(fP, the drivers parse, then ignore, the values for \*(fTboundingbox\*(fP, \*(fTgraphics\*(fP, \*(fToptions\*(fP, and \*(fTposition\*(fP. They treat \*(fToverlay\*(fP like \*(fTinclude\*(fP. All drivers support \*(fTmessage\*(fP and \*(fTliteral\*(fP. Backslashes in literal strings and filenames pose a small problem for the user, because TeX will ordinarily try to interpret control sequences triggered by backslashes in the argument of the \*(fT\special{}\*(fP command. For filenames, PC DOS is the only operating system that normally would use backslashes, and then only as a directory separators. In most cases, you should omit directory paths anyway, and rely instead on the \*(fTDVIINPUTS\*(fP search path to let the drivers find the files at run time; doing so will enhance document portability. If you still wish to use a directory path in the \*(fT\special{}\*(fP command, you can exploit an unadvertised feature of PC DOS; namely, system calls accept forward slashes as equivalent to backslashes, so you can use forward slashes instead. This is normally not possible with PC DOS commands that accept filenames on the command line, because their simplistic parsing confuses such names with option switches. Literal strings are therefore likely to be the only place where backslashes may be unavoidable. Although it would have been possible to choose another escape character than backslash for such strings, this would likely prove confusing to those users who are used to C and UNIX, where the backslash escape character is firmly entrenched. Fortunately, the solution is not difficult, because TeX does not have backslash hard-coded as a control sequence prefix; you can change it by altering TeX's catcodes. Thus instead of writing something like
\*(fT \special{literal = "\ 33[I"} \*(fPwhich would raise a TeX ``Undefined control sequence'' error, you can instead write
\*(fT { \catcode`\@=0 \catcode`\\=12 @special{literal = "\ 33[I"} } \*(fPThis changes the TeX control sequence prefix from backslash to at-sign, and gives backslash a meaning that will not cause problems. The surrounding braces ensure that the changes disappear when the braced group is exited. The catcodes are of course ugly magic numbers, so if you do this more than once, you should hide them in a macro with a more meaningful name, and use that macro instead in place of the first two lines in the group. For \*(Ps, the file is expected to contain a standard bounding box specification in a comment:
\*(fT %%BoundingBox: llx lly urx ury \*(fPThe four values give the lower-left and upper-right coordinates of the bounding box in standard \*(Ps units (1/72in). Alternatively, if the comment
\*(fT %%BoundingBox: (atend) \*(fPis found in the file, the last 4096 characters of the file will be searched to find the last comment of the form:
\*(fT %%BoundingBox: llx lly urx ury \*(fPThe four bounding box values may be either integer or floating-point values, and the space after the colon is optional. For non-\*(Ps files, the bounding box will not usually be available from the file itself; it must then be specified with the \*(fTboundingbox\*(fP keyword. If the file cannot be opened, or the \*(fT\special{}\*(fP command string cannot be recognized, or for relative positioning, the bounding box cannot be determined, a warning message is issued and the \*(fT\special{}\*(fP command is ignored. For the \*(Ps device driver, \*(fTdvialw\*(fP, \*(fTinclude\*(fP and \*(fToverlay\*(fP files, and \*(fTliteral\*(fP strings, are copied to the output as
\*(fT SB % filename ...literal string... ...PostScript include file contents... ...PostScript overlay file contents... SE % filename \*(fPThe \*(fTSB\*(fP and \*(fTSE\*(fP macros revert to standard \*(Ps units of big points (1/72 in), and bracket the inserted \*(Ps text with \*(fTsave\*(fP and \*(fTrestore\*(fP commands. The \*(fTSB\*(fP macro contains a \*(fTtranslate\*(fP command to position the (0,0) origin of the inserted \*(Ps such that the reference point of the bounding box is at TeX's current point. For literal inserted \*(Ps without an \*(fTinclude\*(fP or \*(fToverlay\*(fP file, the origin is moved to TeX's current point. The \*(fTsave\*(fP and \*(fTrestore\*(fP in \*(fTSB\*(fP and \*(fTSE\*(fP ensure that the inserted \*(Ps cannot change the environment existing before the \*(fT\special{}\*(fP. Should it be necessary to do so (e.g. to remember things from one \*(fT\special{}\*(fP to the next, or to redefine an operator, like \*(fTshowpage\*(fP), you should just output \*(fTSE\*(fP followed by your \*(Ps, followed by another \*(fTSB\*(fP. The intervening \*(Ps will then apply to \*(fTdvialw\*(fP's private dictionary, \*(fTTeXdict\*(fP. In order to support things like landscape mode, change bars, and grey shading, it is necessary to have paper dimensions, the bounding box size, and the current point available to inserted \*(Ps code. These are stored in the \*(Ps macros \*(fTPaperHeight\*(fP, \*(fTPaperWidth\*(fP, \*(fTBoxHeight\*(fP, \*(fTBoxWidth\*(fP, \*(fTCurrentX\*(fP, and \*(fTCurrentY\*(fP in the outer level dictionary, \*(fTTeXdict\*(fP. \*(fTPaperHeight\*(fP and \*(fTPaperWidth\*(fP are set only once, at the beginning of the job. The other four are redefined before each \*(fTSB\*(fP is output. Their values are all in standard \*(Ps units of big points (1/72in), not pixels. For an \*(fToverlay "filename"\*(fP command, the size of the bounding box will be the page size. The origin can be moved to the lower-left page corner by the \*(Ps sequence
\*(fT CurrentX neg CurrentY neg translate \*(fPThis is useful in order to obtain absolute page positioning, such as for a page logo overlay. The size of the bounding box in big points (which will be the page size in the event of \*(fToverlay "filename"\*(fP) is saved in \*(Ps macros \*(fTBoxWidth\*(fP and \*(fTBoxHeight\*(fP. They can be used to perform geometric transformations on the included \*(Ps. \*(Ps plot files produced by <PLOT79> have all the expected commands in them to allow their use in TeX \*(fT\special{}\*(fP commands. The two <PLOT79> parameters which influence the size of the plot are
- the device size specified in the call to \*(fTSETSZ()\*(fP; it defaults to 11in if \*(fTSETSZ()\*(fP is not called.
- the device space specified in the call to \*(fTSETDS2()\*(fP or \*(fTSETDS3()\*(fP; it defaults in the CORE system to the unit square, but if the <PLOT79> framing routines are called, they will reset the device space to a horizontal or vertical frame in proportions of the local standard paper size (1 : 8.5/11 in the USA).
For example, if a device size of 5in is specified for a standard horizontal frame, the bounding box will be declared to be 5in wide and (8.5/11) x 5in = 3.8636in high, so a LaTeX manuscript requiring the plot could have the following commands at the start of a new paragraph:
\*(fT \special{include "plotfilename"} \vspace*{3.9in} \*(fPLiteral \*(Ps code from a file or a literal string is expected to be well-behaved, and preferably, should conform to Adobe's Encapsulated \*(Ps File format version 1.2 or later, and to Adobe's \*(Ps Document Structuring Conventions, version 2.0 or later. It may contain a \*(fTshowpage\*(fP (which is disabled temporarily), but it should not contain any of these:
banddevice grestoreall nulldevice setpageparams copypage initclip quit setsccbatch erasepage initgraphics renderbands setscreen exitserver initmatrix setdevice settransfer framedevice note setmatrixIf it does, erroneous output is virtually certain. While these commands could be disabled like \*(fTshowpage\*(fP is, Adobe's Encapsulated \*(Ps guidelines do not recommend doing so. If you wish to do this, redefine the \*(fTSB\*(fP macro in a private copy of the header file, \*(fTdvialw.ps\*(fP. The imported \*(Ps should write into its own dictionary if it needs to define objects. Because dictionary sizes must be specified when they are created, it is not possible to define a standard one in advance in the \*(fTSB\*(fP and \*(fTSE\*(fP macros to protect from corruption of the \*(fTTeXdict\*(fP dictionary used by \*(fTdvialw\*(fP. Here are some examples for \*(fTdvialw\*(fP:
\*(fT % Display a picture with the upper-left corner at the current % point \special{language "PostScript", include "pict.eps"} % Display a picture at its original absolute page position \special{language "PostScript", overlay "pict.eps"} % Use literal PostScript to draw a 1in box with % lower-left corner at TeX's current point \special{language "PostScript", literal " newpath 0 -72 translate % move origin from upper- to lower-left 0 0 moveto 0 72 rlineto 72 0 rlineto 0 -72 rlineto -72 0 rlineto closepath 4 setlinewidth stroke showpage"} % Display a figure at half size \special{language "PostScript", literal "0.5 0.5 scale", include "pict.eps"} % Display the figure in landscape mode by rotating the % coordinates about the center of the bounding box \special{language "PostScript", literal " BoxWidth 2 div BoxHeight 2 div translate 90 rotate BoxWidth -2 div BoxHeight -2 div translate", include "pict.eps"} \*(fPA graph is often better displayed in a LaTeX \*(fTfigure\*(fP environment. You can put the caption above the figure by
\*(fT \begin{figure}[h] \caption{This caption is above the plot.} \special{include "plot1.ps"} \vspace*{4.2in} \nd{figure} \*(fPor below it by
\*(fT \begin{figure}[h] \special{include "plot1.ps"} \vspace*{4.2in} \caption{This caption is below the plot.} \nd{figure} \*(fPIn most technical books, tables are captioned at the top, and figures at the bottom. Note the positioning of the \*(fT\vspace*\*(fP command---it follows the \*(fT\special{}\*(fP command so that sufficient space is left for the plot in the figure. TeX cannot determine how much space will be needed, since it does not interpret the argument of the \*(fT\special{}\*(fP command; you have to tell it explicitly. The reference point of the plot will be placed where the next character would be typeset, even if that occurs in the middle of a line. Since that is unlikely to be what you want, you should make sure that the \*(fTfigure\*(fP environment is preceded by a blank line, so that it looks like a separate paragraph. Indentation from the left margin can be achieved by use of the \*(fT\hspace*\*(fP command, and vertical positioning by the \*(fT\vspace*\*(fP command. However, there is an easier way---\*(fTpicture\*(fP mode, which is described in the LaTeX manual in Section 5.5 on pages 101-111. In \*(fTpicture\*(fP mode, no matter what picture objects you draw, the current point always starts at the position (0,0), and that is where the reference point of a plot will be placed. By using the optional second argument to \*(fTpicture\*(fP mode, you can force that point to be anywhere you like. Here is an example:
\*(fT \begin{figure}[h] \setlength{\unitlength}{0.01in} \begin{picture}(200,200)(0,-200)% \put(0,0){\circle*{15}}% \special{include "mypict.ps"}% \nd{picture} \caption{Positioning a plot in a {\tt picture} environment.} \nd{figure} \*(fPThe lower-left corner of the picture is at (0,-200). A large dot has been placed at (0,0) by the \*(fT\circle*{}\*(fP command; you can use this trick to assist in positioning complex picture layouts (and of course, comment out the \*(fT\circle*{}\*(fP commands for the final output). Notice the use of TeX % comment characters inside the \*(fTpicture\*(fP environment. They ensure that whitespace will be ignored; otherwise, it can add invisible blobs that change the position of objects. You can also enclose the \*(fTpicture\*(fP environment inside a \*(fTcenter\*(fP environment to center the plot horizontally. Now suppose that you want to place two plots in the same figure. The way to do this is use a single \*(fTpicture\*(fP environment, and then to use subpictures to position each of the plots, as suggested on page 110 of the LaTeX manual. This allows you to position the reference point of each plot precisely in the figure with a \*(fT\put\*(fP command, confident that the relative position of each plot will be exactly correct. The \*(fTpicture\*(fP environment inside each \*(fT\put\*(fP command specifies a picture of zero size, since it is unnecessary to provide any additional size information to TeX; it has that already from the outer \*(fTpicture\*(fP declaration.
\*(fT \begin{figure}[h] \begin{center} \setlength{\unitlength}{0.01in} \begin{picture}(500,250)(-25,-25) \put(-25,-25){\line(1,0){500}} \put(-25,225){\line(1,0){500}} \put(-25,-25){\line(0,1){250}} \put(225,-25){\line(0,1){250}} \put(475,-25){\line(0,1){250}} \put(0,200){\circle*{15}} \put(0,200){% \begin{picture}(0,0)% \special{include "mypict.ps"}% \nd{picture}} \put(250,200){\circle*{15}} \put(250,200){% \begin{picture}(0,0)% \special{include "mypict.ps"}% \nd{picture}} \nd{picture} \nd{center} \caption{Centering two plots in a {\tt picture} environment.} \nd{figure} \*(fPIf you only have \*(fT\special{}\*(fP commands inside the inner \*(fTpicture\*(fP environments, you can omit the environment, and use just a bare \*(fT\put\*(fP command:
\*(fT \put(250,200){\special{include "mypict.ps"}} \*(fP
- \*(fTDVIFONTS\*(fP
- This defines the directory search path for finding font files. If this variable is not defined, the value of \*(fTTEXFONTS\*(fP is used instead. It need be specified only when there might be a conflict with the \*(fTTEXFONTS\*(fP value used by other TeXware on the system.
- \*(fTDVIHELP\*(fP
- This defines an alternate help string which is typed when the user makes an input error. It should direct the user to additional documentation. For example, on TOPS-20, it might be \*(fTtry HELP DVI or XINFO DVI\*(fP.
- \*(fTDVIINPUTS\*(fP
- Define a search path for the startup initialization files, \*(Ps header files, and \*(fT\special{}\*(fP include files. See the Initialization Files section. If this variable is not defined, the value of \*(fTTEXINPUTS\*(fP is used instead. It need be specified only when there might be a conflict with the \*(fTTEXINPUTS\*(fP value used by other TeXware on the system.
- \*(fTDVISCREEN\*(fP
- This option is used by \*(fTdvivga\*(fP to select one of multiple screens; if it is not given, the default display is used. It takes one of the values:
- \*(fTEGAM\*(fP
- EGA monochrome
- \*(fTEGAC\*(fP
- EGA color
- \*(fTMAXC\*(fP
- Prisma EGAMAX 860
- \*(fTVGAM\*(fP
- VGA monochrome
- \*(fTVGAC\*(fP
- VGA color
- \*(fTFONTFMT\*(fP
- For each operating system, there is a built-in list of font file formats; they can be overridden at run-time by this environment variable. Its value contains one or more format strings, separated by semicolons, that define how the font file names (not including the directory paths) are to be constructed. For example, on TOPS-20, the default format list is
\*(fT %n.%dpk;%n.%dgf;%n.%mpxl;%n.vf \*(fPA semicolon separates formats in the list. These format specifications are recognized:
- \*(fT%n\*(fP
- Substitute the font name.
- \*(fT%m\*(fP
- Substitute the magnification in old Metafont style (1000 means 200 dots/inch).
- \*(fT%d\*(fP
- Substitute the magnification in new Metafont style (dots/inch).
- \*(fT%#p\*(fP
- \*(fT#\*(fP is a digit string; substitute the first \*(fT#\*(fP characters of the font name. This facilitates subdividing large collections of fonts into subdirectories named by \*(fT#\*(fP-character prefixes of the file names.
In each of these, the format letter may be in either lower or upper case. With the above example, the font cmr10 at normal magnification for a 300-dpi laser printer would yield the list of names \*(fTcmr10.300pk\*(fP, \*(fTcmr10.300gf\*(fP, \*(fTcmr10.1500pxl\*(fP, and \*(fTcmr10.vf\*(fP. By changing this variable, you can alter the preferred font file format search order, or restrict the types of fonts that will be used. The default built-in values in the drivers always include PK, GF, PXL, and VF file types in that order; you can save a little driver run time by excluding types that you don't have. When fonts are looked up, the search order is to try each directory in the \*(fTTEXFONTS\*(fP list before attempting the next format in the \*(fTFONTFMT\*(fP list. If you specify a value for this variable in a PC DOS \*(fT.bat\*(fP file, you must double each percent character, since PC DOS uses percent as an argument escape character. Never include a TeX font metric file format in the \*(fTFONTFMT\*(fP list, because in the event of a missing font, that could prevent the DVI driver from attempting to use a neighboring magnification, a font substitution, or a dynamically-created font.
- \*(fTFONTMAGS\*(fP
- When font magnification, or substitution, is called for, the drivers need to be able to find neighboring members of the magnification family. Each driver has a built-in list of magnifications suitable for its output device, but this list is larger than most installations have, and consequently, the drivers may spend a little extra time doing file system lookups for non-existent files. To speed up these lookups, you can set the \*(fTFONTMAGS\*(fP variable to enumerate the available magnifications as a list of decimal integers separated by whitespace or punctuation characters (\*(fT:;,./\*(fP). These magnifications must be according to the convention of 1000 meaning 200 dots/inch, as used in PXL file naming. GF and PK files are named with a magnification in dots/inch, converted from the PXL magnification by the formula \*(fTdpi = floor(((double)pxlmag + 3.0)/5.0)\*(fP. Because of the rounding, it is not possible to uniquely determine a \*(fTpxlmag\*(fP value from the \*(fTdpi\*(fP value, so if you have only GF or PK fonts, you will have to work out the corresponding \*(fTpxlmag\*(fP values yourself. For example, if you have magnification steps 0, 0.5, 1, 2, 3, 4, and 5 of a 300-dpi font family, you could set \*(fTFONTMAGS\*(fP to the list 1500, 1643, 1800, 2160, 2592, 3110, 3732. These values correspond to \*(fTdpi\*(fP values of 300, 329, 360, 432, 518, 622, and 746. If you use the same font directories for all devices, set this variable in the system-wide \*(fTdvi.ini\*(fP file. Otherwise, you may want to have device-specific settings in separate system-wide \*(fTdvixxx.ini\*(fP files for each \*(fTdvixxx\*(fP driver. See the Initialization Files section. At some sites, GF and PK font files have been found named with magnifications that are incorrectly rounded from the \*(fTpxlmag\*(fP values; you can create values in the \*(fTFONTMAGS\*(fP variable that will match these, using the equation given above. The drivers will choose the closest match to the needed magnification.
- \*(fTFSMAPFILE\*(fP
- This defines the name of the filename cache file. This need not exist, but if it does, then files to be opened are searched for first in the cache, and only if they are not found is the file system consulted.
- \*(fTMAKETEXPK\*(fP
- This defines the command to be used to create missing fonts dynamically. See the Dynamic Font Creation section.
- \*(fTMISSINGFONTLOG\*(fP
- This defines the name of the log file in which commands to create missing fonts will be recorded, if dynamic font creation has been suppressed by a command-line option.
- \*(fTPSMAPFILE\*(fP
- This defines the name of the \*(Ps font mapping file. See the Virtual Fonts section.
- \*(fTSPOOLFMT\*(fP
- This is used on operating systems that support a \*(fTsystem()\*(fP call to pass a command to the host operating system. Its value should be a string containing at least one \*(fT%s\*(fP format item which will be replaced at run time by the DVI driver's output file name; the string will then be executed as a system command to send the output file to the printer queue. The default value on UNIX is \*(fTlpr %s\*(fP.
- \*(fTTERM\*(fP
- This is used only for \*(fTdvibit\*(fP; if it does not evaluate to either \*(fTbitgraph\*(fP or \*(fTbg\*(fP, \*(fTdvibit\*(fP will refuse to run. On UNIX, this is the conventional way of defining terminal types with the \*(fTtermcap\*(fP or \*(fTterminfo\*(fP systems. This variable is ignored on VAX VMS, since the VMS C library sets it to a value which can never be \*(fTbitgraph\*(fP or \*(fTbg\*(fP.
- \*(fTTEXFONTS\*(fP
- This defines the directory search path for finding font files. Each directory in the path is prepended in turn to the name of a TeX font constructed with a \*(fTFONTFMT\*(fP format to get a full file specification. A typical value in UNIX for \*(fTTEXFONTS\*(fP would be \*(fT/usr/local/lib/tex/fonts\*(fP. On TOPS-20, font cmr10 on a 300-dpi device might correspond to the files \*(fTtexfonts:cmr10.300gf\*(fP, \*(fTtexfonts:cmr10.300pk\*(fP, or \*(fTtexfonts:cmr10.1500pxl\*(fP.
- \*(fTTEXINPUTS\*(fP
- This defines the directory path for finding files which are not in the current working directory. It is prepended to file names. A typical value in UNIX would be \*(fT/usr/local/lib/tex/macros\*(fP.
- \*(fTTFMFMT\*(fP
- This defines the format of TeX font metric file names, using the same format codes as for \*(fTFONTFMT\*(fP. A typical value would be \*(fT%n.tfm\*(fP.
The \*(fTDVIFONTS\*(fP, \*(fTDVIINPUTS\*(fP, \*(fTTEXFONTS\*(fP, and \*(fTTEXINPUTS\*(fP variables define a search directory list path containing one or more directories, separated by one or more characters that depend on the host operating system. A directory path is separated from a file name by another character that will be supplied if it is not specified in the paths in the search list. The acceptable separator characters are as follows:
+(\w'Directory Separators'u+2n) Operating System Path Separators Directory Separators Atari TOS \*(fT<space> ; , |\*(fP \*(fT\\*(fP PC DOS \*(fT<space> ; , |\*(fP \*(fT\\*(fP Primos \*(fT<space>\*(fP \*(fT>\*(fP RMX \*(fT<space> ; , |\*(fP \*(fT/\*(fP TOPS-20 \*(fT<space> ; , |\*(fP \*(fT: >\*(fP UNIX \*(fT<space> : ; , |\*(fP \*(fT/\*(fP VAX VMS \*(fT<space> ; , |\*(fP \*(fT: ]\*(fPOn TOPS-20, VAX VMS, and IBM VM/CMS, the operating system handles the directory path searching, so you should use the standard separator conventions on those systems.
\*(fT FILES=12 BUFFERS=12 \*(fPin the \*(fTconfig.sys\*(fP file in the boot directory, then reboot the system to have the new values take effect. The drivers may need up to 7 open files, in addition to \*(fTMAXOPENFONTS\*(fP font files. Larger values are of course possible, though \*(fTFILES=20\*(fP is the limit with current versions of PC DOS. Run-time performance can be quite sensitive to these settings, so you may wish to experiment. If there is no \*(fTconfig.sys\*(fP file, or the settings of \*(fTFILES\*(fP and \*(fTBUFFERS\*(fP are too small, you will find the disk whirring madly while the driver attempts to open font files with neighboring magnifications, and the driver will finally die with a message ``unable to open .err file''. Use of the -d:open option may be useful in tracking how many files can successfully be opened. The drivers have been loaded with the default Microsoft floating-point library; the compiler generates calls to library routines which test a flag initialized at startup time which indicates the presence or absence of the floating-point coprocessor chip. If it is available, the library routines will automatically use it. You can force the chip to be ignored by defining an arbitrary non-empty string value for the environment variable \*(fTNO87\*(fP, for example
\*(fT set NO87=no-8087-available \*(fPWhen the DVI translator runs, the value of this variable should be typed on the screen as the first output line. On a Leading Edge PC, this typeout does not appear, for unknown reasons. On a 4.77MHz PC XT, the translators run twice (!) as slowly when \*(fTNO87\*(fP is defined. When the drivers are compiled with Turbo C, you can disable the use of the hardware floating-point chip by
\*(fT set 87=n \*(fPThe reason that you might need to know this is that the method employed by the library routines for detecting the presence or absence of an 8087 (or 80287) chip is not infallible, thanks to design flaws of some PC's and possibly also the Intel chips. It is conceivable that the library might think a coprocessor chip is present, when in fact it is not, and the first floating-point instruction executed would hang the machine. If you specify values for environment variables in a PC DOS \*(fT.bat\*(fP file, you must double each percent character, since PC DOS uses percent as an argument escape character.
\*(fT % dvialw.ini % Define some paper types known to the Apple LaserWriter % [10-Jun-89] -backwards % Apple LaserWriter stacks face up -paper={ paper = "ALW-note"; use = "letter"; x_left = 0.41in; x_right = 0.41in; y_top = 0.42in; y_bottom = 0.42in; } -paper:{ paper = "ALW-letter"; use = "letter"; x_left = 0.25in; x_right = 0.25in; y_top = 0.04in; y_bottom = 0.04in; } -paper:{ paper = "ALW-legal"; use = "US-legal"; % long paper format x_left = 0.89in; x_right = 0.89in; y_top = 0.5in; y_bottom = 0.5in; } \*(fPNote that either a colon or an equals sign may be used on the -paper option, that the opening curly brace must not be preceded by white space, and that embedded space is permitted only within strings, or within braces. Nested braces must be balanced; comments can be used to ensure that. Here is a sample initialization file which might be used for a Hewlett-Packard LaserJet Plus printer, which stacks paper face up, so the printing order needs to be reversed:
\*(fT % dvijep.ini % For HP LaserJet Plus printers % [03-Aug-89] -backwards % change stacking order \*(fPThe \*(fTpaper.dat\*(fP file in the DVI distribution contains a large collection of standard paper sizes that are not common enough to incorporate as built-in values, but may nevertheless be occasionally required.
- \*(fT*.dvi\*(fP
- TeX DeVice Independent output file.
- \*(fT*.dvi-err\*(fP
- TeX DVIxxx translator error log.
- \*(fT*.dvi-xxx\*(fP
- TeX DVIxxx translator output file.
- \*(fT*.err\*(fP
- TeX DVIxxx translator error log when long extensions are not available.
- \*(fT*.ini\*(fP
- TeX DVIxxx translator initialization file.
- \*(fT*.sub\*(fP
- DVI file-specific font substitution file.
- \*(fT*.xxx\*(fP
- TeX DVIxxx translator output file when long extensions are not available.
- \*(fTDVISPOOL\*(fP
- Environment variable (4.xBSD UNIX only) defining program or shell script which sends translation of DVI file to the appropriate output spooler.
- \*(fTDVISPOOL:\*(fP
- Logical name (TOPS-20 only) defining program which sends translation of DVI file to the appropriate output spooler.
- \*(fTtexfonts.sub\*(fP
- Job-wide font substitution file.
- \*(fTtexfonts:*.*pxl\*(fP
- TeX default font rasters.
- \*(fTtexfonts:*.*gf\*(fP
- TeX default font rasters.
- \*(fTtexfonts:*.*pk\*(fP
- TeX default font rasters.
- \*(fTtexinputs:dvialw.ps\*(fP
- \*(Ps header file containing standard macro definitions prefixed to \*(Ps output from \*(fTdvialw\*(fP.
- \*(fTtexinputs:texfonts.sub\*(fP
- System-wide font substitution file.
Nelson H. F. Beebe Center for Scientific Computing Department of Mathematics University of Utah Salt Lake City, UT 84112 USA Tel: +1 801 581 5254 FAX: +1 801 581 4148 E-mail: beebe@math.utah.edu (Internet)An active electronic mailing list for news about the DVI driver family development is maintained by the author at the above net address. Send requests there if you wish to be on it.