The DVI driver specification file

The information about the available DVI printer drivers is stored in DVI driver specification files located in a subdrawer named TeXDrivers. During startup TEXPrt scans this directory and looks for these specification files. For every valid specification file an entry in the Drivers menu is created. If the TeXDrivers drawer is empty or contains no valid specification file, the program exits with an error message. An example specification file for the DVIPrint printer driver (PasTeX) is given below. All entries are separated by a semicolon. While reading a specification file, every double quote will be substituted by a white space. This is important, because some DVI drivers take their arguments without a space (-f1 -t10, e.g.), while others expect one (-f 1 -t 10, e.g.). Two consecutive double quotes indicate that the corresponding command is not supported by the printer driver (see Copies in the example below, e.g.) or that no command switch is necessary (see Device in the example below). If a command is not supported by the printer driver, TEXPrt tries to disable the appropriate gadget on its window. Note, however, that disabling a gadtools MX-gadget is not supported by Kickstart 2.04, but is supported by Kickstart 3.0 and up. TEXPrt will use this Kickstart 3.0 feature when executed under Kickstart 3.0.

TeXPrt printer driver spec file
Name ; DVIPrint
Node ; Typesetting:Pastex/bin/DVIPrint
PageSel (DOCUMENT/FROMTO) ; DOCUMENT ; -f",-t",""
Copies ; 1 ; ""
PageType (ALL/ODD/EVEN) ; ALL ; "",-1,-2
Reverse (ON/OFF) ; OFF ; -r
Orientation (PORTRAIT/LANDSCAPE) ; PORTRAIT ; "",-g
HOffset ; 0 ; -h" ; mm
VOffset ; 0 ; -v" ; mm
AdjHOffset ; 18
AdjVOffset ; 16
Option1 (ON/OFF) ; OFF ; DRAft ; Draft
Option2 (ON/OFF) ; ON ; -o ; Optimize
Option3 (ON/OFF) ; ON ; -T ; Fast
Option4 (ON/OFF) ; OFF ; -i ; IFF-ILBM
Device ; "" ; ""


The first line is used to indicate that this is a DVI driver specification file (needed while scanning the TeXDrivers drawer).
Name specifies the string which will appear in the Drivers menu.
Node contains the filename of the printer driver including the full path. The path can be omitted if the printer driver is accessible via a global path.
The first entry after PageSel (DOCUMENT/FROMTO) specifies the default setting when this spec file is read by TEXPrt. The second entry contains the parameters (actually 3 parameters separated by a comma) of the printer driver to specify from which page (-f) upto which page (-t) should be printed. The third parameter which is not used (marked by "") in the file above determines the number of pages that should be printed. Some printer driver use such kind of parameter instead of specifying the last printed page directly (see the AmigaTeX spec file that comes with this program). Note that parameter strings may not contain any white space (use a double quote instead).
The Copies keyword determines the number of copies that should be printed. Note that, although the DVIPrint printer driver does not support printing multiple copies of one file, this feature is emulated by TEXPrt by repeatedly launching the printer driver with the same DVI file.
PageType (ALL/ODD/EVEN) sets the type of pages that should be printed. Again the first entry specifies the default setting while the second contains the parameter string (in the example above there is no parameter for specifying ALL pages).
The Reverse (ON/OFF) keyword sets the default and parameter string for printing the pages in reverse order.
Orientation (PORTRAIT/LANDSCAPE) determines the orientation of the printout.
HOffset and VOffset specify the horizontal and vertical offset of the printout. The last entry of these lines specify the unit measures of the offsets. These strings will be displayed on the right side of the HOffset and VOffset string gadgets, respectively. Moreover, they will be appended to the command line (for example, HOffset ; -5 ; -h" ; mm produces the command line -h -5mm).
AdjHOffset and AdjVOffset are used to preadjust the horizontal and vertical offsets. This is necessary, because on different printers the margins may be different too. TEXPrt simply adds AdjHOffset to HOffset and AdjVOffset to VOffset and these sums are used as offsets when the printer driver is called.
The next four lines Option# (ON/OFF) define user configurable boolean gadgets. The first two entries set up the default state of the boolean gadget and the parameter string. The last entry is used as a label for the gadget.
The last line of the spec file which starts with Device determines the output device (for example, par:) and the parameter string.