[next] [tail] [up]
4TeX supports a variety of output devices. There are separate print or preview
programs for separate groups of output devices:
-
DviDot
- for dot-matrix printers and bitmapped output such as pcx
picture files (e.g., for fax machines).
-
DviHPlj
- for LaserJet, DeskJet and other PCL printers.
-
DviPS
- for PostScript printers. This print program will be described
in Section 6.2.
-
Ghostscript
- for printing PostScript output on non PostScript printers or
the screen (previewing). This program will be described in
Sections 6.2.6 and 6.2.5.
-
DviDJc
- for color DeskJet printers. This print program will be described
in Section 6.3.
-
Dvi2tty
- for printing or previewing on non graphic/ascii output devices.
It simply emulates the page layout as if you were using a type
writer.
-
DviScr
- is not a print but a preview program; we describe it here
because it is very similar in structure to the print programs.
See Section 6.1.6 on how to operate DviScr interactively.
-
DviVGAc
- for previeving colored output for DeskJet color printers. This
program will be described in Section 6.3.1.
-
DviWin
- is a Windows previewer program that can also be used to
print. See Section 6.4 for a detailed description.
All these programs take a .dvi
-file generated by a TeX-compiler as input. We
refer to them collectively as DVI-drivers.
The programs DviDot, DviHPlj and DviScr are part of the emTeX package
written by Eberhard Mattes and share similar interfaces. These programs exist in two
versions: one standard, and one that needs a mathematical coprocessor. The latter
will run only on machines equipped with a 80x87 coprocessor, and they will run a
little faster. These programs have a `7' appended to their file name, e.g.,
dvidot7.exe
. 4TeX will use the coprocessor versions automatically if it detects a
coprocessor in your computer.
DviScrs is an alternative to DviScr that uses less memory at the expense of
performance. This program is especially handy if DviScr issues out of memory
errors due to loading many (high resolution) fonts.
DviHPlj3 is a 32 bits version of DviHPlj which runs faster and can print larger
pages (e.g., A3) at high resolutions (up to 1200 dpi).
Dvi2tty was written by S. Lindahl and extended by M. Mol. It is used only
for quick viewing/printing dvi files and thus has a much more primitive
interface.
DviPS was written by T. Rockiki.
The color DeskJet drivers were written by F. Sowa.
Ghostscript was written by Alladin Software Inc.
The Windows previewer GSview that uses Ghostscript as its `rendering engine'
was written by Russell Lang.
DviWin was written by H. Sendoukas.
6.1.1
Fonts
Whereas the TeX-compiler only needs to know the font metrics, the preview
and/or print programs usually require bitmaps of each character of each font used,
and must be told where to find these.
Fontfiles .pk
can be organized into font libraries .fli
, which can be read directly
by print and preview programs. The program FontLib (see Section 4.7) manages font
libraries.
The CD-rom version of 4TeX does not use font libraries to store bitmapped fonts
because not all of the supported DVI-drivers can read font libraries: so far
only the emTeX drivers and DviPS can. The current version of the color
DeskJet dvi drivers are even more limited. They can only read bitmapped
fonts from one directory tree (e.g., ?:
\
emtex
\
texfonts
\
deskjet
) and its
subdirectories. All other fonts you need should be accessible from the current
directory.
There are no separate screenfonts; the emTeX previewer uses printer bitmaps (.pk
files) of any resolution.
6.1.2
EmTeX DVI-drivers command line
A few comments before we embark on the description of the command
line:
- You may wonder how you can fit even the required options on a command
line.1
The answer is that you don't have to: you can put options in environment
variables and response files instead. This is described in Section 6.1.3, where
we also give complete examples.
- This section describes the simpler options. These will probably suffice
if you want to set up your own system. Section 6.1.5 describes the
4TeX response files. These are considerably more complex, in part
because they support additional options, but mainly because they must
accommodate many users, each with their own preferences and directory
setup.
- Options not described here include: scaling of your output; printing 2-up;
font substitution if a specified font cannot be found; changing the order in
which pages are printed; moving the printed area by a horizontal and/or
vertical offset; options for inclusion of graphics (these are described in
Section 7.4); support for alternative directory configurations; automatic
font generation (see Section 6.5.3) etc. Complete information is available
in
?:
\
emtex
\
doc
\
programs
\
dvidrv.zip
.
- Parameter files, configuration files and font substitution files are located
in the directory
%emtexdir
\
data
.
The syntax is
|
DVIxxx [parameter file] <input file> [output file] [options] |
where DVIxxx is the print or preview program of choice; if necessary with drive
and/or directory specification.
[parameter file] (e.g., fx80.dot
) is required only for DviDot.
<input file> is a required parameter. An extension .dvi
is assumed if none is
given.
[output file] is normally prn
; for DviScr, it should be omitted. A filename can be
entered instead of prn
. The resulting file (e.g., mytext.lj
) can be copied to a printer
in a separate step by the dos command
Options may occur anywhere on the command line, except that for DviDot they
should not precede [parameter file]. The options include:
- display help
- display extensive help
-
- printer class. Default is
laserjet
, other classes are e.g.: deskjet
.
- reset printer before printing (default)
- printer memory (see below)
-
- inverse: white on black
- scaling: map #×# printer dots to one screen pixel
- as
/s
#, but, if possible, with grayscaling
- Olivetti M24 640 × 400 display
- Tseng Labs Super VGA graphics card
-
| Acumos AVGA2, AVGA3 | /oa103:800:600:58
|
| Advance Logic AL2101 | /oa103:800:600:2B |
| Ahead V5000 | /oa103:800:600:71 |
| ATI VGAWONDER, Graphics Ultra etc. | /oa103:800:600:54 |
| Chips and Technologies | /oa103:800:600:6A |
| Cirrus Logic CL-GD 500/600 | /oa103:800:600:64 |
| Cirrus Logic GD 5422 | /oa103:800:600:58 |
| Compaq VGA | /oa103:800:600:59 |
| Diamond Stealth | /oa103:800:600:4F02:0102 |
| Everex | /oa103:800:600:70:02 |
| Genoa 5xxx, Sigma VGA | /oa103:800:600:29 |
| Genoa 6xxx | /oa103:800:600:6A |
| MXIC MX 68010 | /oa103:800:600:55 |
| NCR 77C22 | /oa103:800:600:58 |
| OAK Technologies OTI-067, OTI-077, OTI037C | /oa103:800:600:52 |
| OAK Technologies OTI037C w/ NEL BIOS | /oa103:800:600:5B |
| Orchid Prodesigner | /oa103:800:600:29 |
| Paradise | /oa103:800:600:58 |
| Realtek RT 3106 | /oa103:800:600:1F |
| S3 | /oa103:800:600:4F02:0102 |
| Trident 8900 | /oa103:800:600:5B |
| Tseng ET-3000, ET-4000 | /oa103:800:600:29 |
| VESA compatible (800 × 600) | /oa21 |
| VESA compatible (1024 × 768) | /oa22 |
| VESA compatible (1280 × 1024) | /oa23 |
| Video 7 SVGA | /oa103:800:600:62 |
| WD90C11 | /oa103:800:600:5C |
| Western Digital | /oa103:800:600:58 |
In texuser.<os>
you can specify e.g., SCRTYPE=103:800:600:58
if your
computer is equipped with a Paradise graphics adapter. SCRTYPE=8
is sufficient
for a Tseng ET-3000 or ET-4000. Note that the /oa
part must be omitted in
texuser.<os>
. If your graphics adapter is not listed, try one of the VESA
modes.
-
- start printing at page #; hierarchical page numbers are also possible, e.g.,
/b3.2
- stop printing after page #
-
- set page height to #; the default unit of measurement is inches, but you
can also use, e.g., millimeters:
/h297mm
is equivalent to /h11.69
and to
/h=11.69in
- set page width;
/w8.27
is equivalent to /w210mm
-
- set horizontal and vertical printer resolution to # DPI (Dots Per Inch)
- set horizontal printer resolution
- set vertical printer resolution
-
- specifies font libraries (see below)
- font-size tolerance in % (default 0.2%; maximum 20%); this option allows
the DVI-driver to substitute slightly smaller or larger fonts when the exact
size is unavailable
Above, `#' stands for a number, possibly followed by a dimension indicator (e.g.,
inches: in
or millimeters: mm
); `xxx' for any text string. The option may be
separated from its parameter by either =
, :
, :=
or by nothing at all; a space
in between is not allowed. Examples: /b1
, /b:1
, /b=1
and /b:=1
are all
legal.
dvihplj-specific parameters: if you use e.g. a LaserJet 4M that has a lot of
extra memory, printing will be more efficient if DviHPlj is told about it by
the addition of a parameter /om6000
. Make sure you never specify more
memory than is available in your target printer--better be on the safe side.
For LaserJets, the default is 384. For DeskJets, the memory parameter is
ignored; a memory cartridge won't do you any good as far as DviHPlj is
concerned.
Page-dimension parameters: /h
# and /w
# are best put in a response file; see
below. Note that page dimensions are only used to determine how much of the page
can be printed; a wrong page height won't result in `creeping' pages since formfeeds
are used to move to a new page.
Resolution parameters: a LaserJet II/III or DeskJet requires /r=300
. An
ordinary Epson or IBM compatible 9-pin dot-matrix printer such as most inexpensive
Star printers requires resolution parameters /rx=240
and /ry=216
. Resolution
parameters are also best put in a response file. Remember to set the /rf
parameter
identical to /r
if you want to make use of the automatic font generation
features.
Font libraries: a LaserJet or DeskJet would require
/pl=c:\emtex\texfonts\lj_{0,1,2,3,4,5,6,7,8,sli}
|
This is shorthand for
/pl=c:\emtex\texfonts\lj_0,c:\emtex\texfonts\lj_1,...
|
An Epson-compatible printer would require
/pl=c:\emtex\texfonts\fx_{0,h,1,2,3,4,5}
|
6.1.3
Response files
Even with font libraries, it is not practical to enter all font files on the command
line. Therefore, response files are used which contain names of font libraries and other
options. An option @<filename> on the command line causes the DVI-driver to read
options and parameters from <filename> before processing the remainder of the
command line.
emTeX expects to find response files you refer to to be located in a subdirectory
called data
directly beneath the path indicated by the environment variable
EMTEXDIR
, e.g., ?:
\
emtex
\
data
. However, if you supply a path with the response file
name (e.g., c:
\
texfiles
\
ownprt
\
myprint.cnf
in stead of just myprint.cnf
) it will
read the file you specified.
Since the previewer DviScr uses printer fonts, it makes sense for response files to
be usable for both printing and previewing.
An example response file for a LaserJet (lines starting with %
are comments):
% A4 paper size
/w=210mm
/h=297mm
% printer resolution in Dots Per Inch
/r=300
/rf=300
% font libraries
/pl=c:\emtex\texfonts\lj_{0,1,2,3,4,5,6,7,8,sli}
|
With such a response file, named e.g., dvi.cnf
, a file mytext.dvi
could be previewed
by entering
- dviscr mytext @dvi.cnf /s3
and printed on a LaserJet with
- dvihplj mytext /oi+ /om2048 @dvi.cnf prn
For DeskJet users:
- dvihplj texfile /oi+ /od @dvi.cnf prn
A response file for a Star or Epson-compatible 9-pin printer:
/w=8in
% 12" tractor paper
/h=12in
% printer resolution x and y
/rx=240
/ry=216
/pl=c:\emtex\texfonts\fx_{0,h,1,2,3,4,5}
|
Commands for previewing and printing for Star printer users:
- dviscr mytext @dvi.cnf /s3
- dvidot fx80.dot mytext @dvi.cnf prn
The first argument, fx80.dot
, is the parameter file required for Epson-compatible
9-pins dot-matrix printers.
6.1.4
Environment variables
Before scanning the command line, options will be read from environment
variables; first from
DVIDRV
, next from an environment variable named after the
DVI-driver (e.g., DviScr or DviHPlj, e.g., given environment variables
command lines for previewing and printing a file mytext.dvi
can be simplified
to
Options in environment variables can be overruled by options on the command line,
or in response files: if options conflict, the option processed last will override options
processed earlier.
6.1.5
The 4TeX response files
The examples above will work just fine if you set up your own system. However,
the 4TeX response files *.cnf
are a lot more complex. The principal reason is that
they must be shared by many users, who may not have the same directory-setup.
They also support some options not described above. In this section, we shall explain
the additional options and syntactical constructs used in these response
files.
Here comes ?:
\
emtex
\
data
\
hplj.cnf
, the 4TeX response file for printing on a
LaserJet II or III:
% hplj.cnf
/pd={,$TEXDVI:,$DVIDRVINPUT:}@i
/pl=$OWNFLI:ownfli
/pf={{$DVIDRVFONTS:,$EMTEXDIRSLASH:texfonts\laserjet\}@Rrdpi\,}@f.{pk,pxl}
/pg={,$DVIDRVGRAPH:}@PBf{@Ef,.msp,.pcx,.bmp}
/pv={$VFFONTS:}@f.vf
/ps=hplj.sub
/r=300
/rf=300
/rg=300
/fs=1
/fd=2
/fb
/fl=-1
|
and now fx.cnf
, the response file for Epson FX80-compatible printers:
% fx.cnf (240x216 DPI using FX fonts)
/pd={,$DVIDRVINPUT:}@i
/pl=$OWNFLI:ownfli
/pf={$DVIDRVFONTS:,$EMTEXDIRSLASH:texfonts\epsonfx\}@Rrdpi\@f{.pk,.pxl}
/pg={,$DVIDRVGRAPH:}{@Rrdpi\,}@PBf{@Ef,.msp,.pcx,.bmp}
/pv={$VFFONTS:}@f.vf
/ps=p6h.sub
/rx=240
/ry=216
/rfx=240
/rfy=216
/fs=1
/fd=2
/fb
/fl=-1
|
The following options were not described in the previous section and can be found in
the documentation of the DVI-drivers:
-
/pm
xxx .tfm
(TeX Font Metric) files. If the DVI-driver can't find a font, a .tfm
file for that font may help the DVI-driver to improvise and generate
some output.
-
/pd
xxx - DVI-file. This option can be used to let the DVI-driver search some
additional directories.
-
/pf
xxx - font files; for fonts which are not stored in libraries.
-
/pg
xxx - graphic files.
-
/ps
xxx - font substitution file.
-
/pv
xxx - path and filename format for virtual fonts.
-
/rfx
# - horizontal font resolution; required if you want missing fonts to be
automatically generated.
-
/rfy
# - vertical font resolution.
-
/rg
xxx - graphics resolution.
-
/fs
# - font scaling.
-
/fm
xxx - Metafont mode. Note that the
.cnf
files do not specify /fm
. 4TeX will
add this parameter dynamically in case automatic font generation is
required (see Section 6.5.3).
-
/fd
# - maximum drift.
Note also the use of environment variables. Here, they start with `$' and end with
`:', e.g.,
$TEXDVI:
. The DVI-driver will replace such an environment variable
by its values plus a backslash. If the environment variable is not set, an
empty string will be used. In this context, environment variables (or, more
accurately, their values) may not contain the characters `{', `}' or `$'. See the
4TeX configuration file texuser.<os>
in the ?:
\
emtex
\
btm
subdirectory or in your
own work directory for a description of the environment variables. If you want to
print a complete list of the environment variables used by 4TeX, enter a dos
command
from the 4TeX main menu.
Environment variables are not the only variables that can be used in the
specification of a file or group of files. The 4TeX response files also use:
- is to be replaced by the
.dvi
file
- is to be replaced by a fontname or graphics file name
- as
@f
, but without extension
- is to be replaced by the integer part of the font resolution in dpi, e.g.,
300dpi
, 329dpi
or 360dpi
- as
@f
, but here only the extension is retained (dot included)
As an example, consider the line
/pd={,$TEXDVI:,$DVIDRVINPUT:}@i
|
If Dvixxx had been called with mytext[.dvi]
as input file,
then Dvixxx would look for mytext[.dvi]
in the current
directory2
and in the directories specified in the environment variables
TEXDVI
and
DVIDRVINPUT
.
6.1.6
Interactive operation of DviScr and DviScrs
The following are the more important keyboard commands when you are
previewing with DviScr and DviScrs:
- Move around the page with the arrow keys.
- Pressing [C] (coarse) causes the arrow keys to make bigger `steps'; [F]
(fine) to make smaller `steps'. Can be repeated.
- Page up and down: [PgUp] and [PgDn].
- First and last page: [Ctrl][PgUp] and [Ctrl][PgDn].
- Zoom in and out: [+] and [-]. Can be repeated.
- Go to page n: [G] or [P] plus n [Enter].
- Quit: [Q] or [Ctrl][C].
- Search for text: [S].
- Toggle the ruler display: [R].
- Change the dimension unit forward: [U]. Dimension units are used in the
status line and the ruler display.
- Change the dimension unit backward: [Ctrl][U].
- Reverse the image (black becomes white; white becomes black): [I].
6.1.7
Font substitution
Whenever the emTeX DVI-drivers cannot find a font file they will consult a font
substitution file. In this file fonts can be remapped to other fonts or other
magnifications.
A font substitution file usually has two parts: one part that states which fonts are
always substituted by others, another part that states what fonts are substituted only
in case a font cannot be found.
As an example we show a font substitution file for the Laserjet III:
gray* -> graylj*
MTEX * -> mtex *
MTSY * -> mtsy *
MTMI * -> mtmi *
$b
pcti* * -> plti* *
pcsl* * -> plsl* *
pcr* * -> plr* *
* 328 -> * 329
* * -> * * /w
* * -> rptmr * /r
|
The first lines tells DviHPlj to always substitute graylj*
for gray*
for any
magnification.
$b
means that the first part is finished.
The second part states that for all fonts of resolution 328 dpi the 329 dpi fonts
can be used. In case no font file at all is available, but the font metric file is, then all
characters will be left blank (the /w
parameter). I even no font metric file is available,
the font file rptmr
(Times Roman) will be used, but all characters will be printed as
black rectangles (the /r
parameter).
[next] [front] [up]