XDVIK(1)
NAME
xdvi - DVI Previewer for the X Window System
SYNOPSIS
xdvi [+[page]] [-d debugnum] [-s shrink] [-S density]
[-nogrey] [-gamma g] [-p pixels] [-margins dimen]
[-sidemargin dimen] [-topmargin dimen] [-offsets dimen]
[-xoffset dimen] [-yoffset dimen] [-paper papertype]
[-altfont font] [-l] [-rv] [-expert] [-fn font] [-mgs[n]
size] [-hush] [-hushspecials] [-hushchars]
[-hushchecksums] [-fg color] [-bg color] [-hl color] [-bd
color] [-cr color] [-bw width] [-maketexpk] [-mfmode mode]
[-display host:display] [-geometry geometry]
[-icongeometry geometry] [-iconic] [-keep] [-copy]
[-thorough] [-nopostscript] [-noghostscript] [-version] [
dvi_file ]
DESCRIPTION
xdvi is a program which runs under the X window system. It
is used to preview dvi files, such as are produced by
tex(1).
This program has the capability of showing the file
shrunken by various (integer) factors, and also has a
``magnifying glass'' which allows one to see a small part
of the unshrunk image momentarily.
Before displaying any page or part thereof, it checks to
see if the dvi file has changed since the last time it was
displayed. If this is the case, then xdvi will reinitial-
ize itself for the new dvi file. For this reason, expos-
ing parts of the xdvi window while TeX is running should
be avoided. This feature allows you to preview many ver-
sions of the same file while running xdvi only once.
In addition to using keystrokes to move within the file,
xdvi provides buttons on the right side of the window,
which are synonymous with various sequences of keystrokes.
xdvi can show PostScript<tm> specials by any of three
methods. It will try first to use Display PostScript<tm>,
then NeWS, then it will try to use Ghostscript to render
the images. All of these options depend on additional
software to work properly; moreover, some of them may not
be compiled into this copy of xdvi.
For performance reasons, xdvi does not render PostScript
specials in the magnifying glass. Furthermore, it does
not yet support `!' or `header=' specials. If dvi_file
is not specified, a file-selection widget is popped up for
you to choose the dvi file from.
OPTIONS
In addition to specifying the dvi file (with or without
the .dvi extension), xdvi supports the following command
line options. If the option begins with a `+' instead of
a `-', the option is restored to its default value. By
default, these options can be set via the resource names
given in parentheses in the description of each option.
+page Specifies the first page to show. If + is given
without a number, the last page is assumed; the
first page is the default.
-altfont font
(.altFont) Declares a default font to use when the
font in the dvi file cannot be found. This is use-
ful, for example, with PostScript <tm> fonts.
-background color
(.background) Determines the color of the back-
ground. Same as -bg.
-bd color
(.borderColor) Determines the color of the window
border.
-bg color
(.background) Determines the color of the back-
ground.
-bordercolor color
Same as -bd.
-borderwidth width
(.borderWidth) Specifies the width of the border of
the window. Same as -bw.
-bw width
(.borderWidth) Specifies the width of the border of
the window.
-copy (.copy) Always use the copy operation when writing
characters to the display. This option may be nec-
essary for correct operation on a color display,
but overstrike characters will be incorrect. If
greyscale anti-aliasing is in use, the -copy opera-
tion will disable the use of colorplanes and make
overstrikes come out incorrectly. See also -thor-
ough.
-cr color
(.cursorColor) Determines the color of the cursor.
The default is the color of the page border.
+maketexpk
(.maketexpk) Invoke MakeTeXPK to create missing
fonts, regardless of the compile-time default.
-maketexpk says not to invoke MakeTeXPK.
-mfmodestring
(%%dot%%mfmode) Use string for the Metafont mode
passed to MakeTeXPK. If this is not set, the `mf-
mode' resource is used. if that is not set, the
mode is left unspecified, which causes MakeTeXPK to
guess from the resolution.
-d debugnum
(.debugLevel) If nonzero, prints additional infor-
mation on standard output. The number is taken as
a set of independent bits. The meaning of each bit
follows. 1=bitmaps; 2=dvi translation; 4=pk read-
ing; 8=batch operation; 16=events; 32=file opening;
64=PostScript communication; 128=Kpathsea stat(2)
calls; 256=Kpathsea hash table lookups; 512=Kpath-
sea path definitions; 1024=Kpathsea path expansion;
2048=Kpathsea searches. To trace everything having
to do with file searching and opening, use 4000.
-density density
(.densityPercent) Determines the density used when
shrinking bitmaps for fonts. A higher value pro-
duces a lighter font. The default value is 40.
Same as -S.
-display host:display
Specifies the host and screen to be used for dis-
playing the dvi file. By default this is obtained
from the environment variable DISPLAY.
-expert
(.expert) Prevent the buttons from appearing. See
also the `x' keystroke.
-fg color
(.foreground) Determines the color of the text
(foreground).
-foreground color
Same as -fg.
-gamma gamma
(.gamma) Controls the interpolation of colors in
the greyscale anti-aliasing color palette. Default
value is 1.0. For 0 < gamma < 1, the fonts will be
lighter (more like the background), and for gamma >
1, the fonts will be darker (more like the fore-
ground). Negative values behave the same way, but
use a slightly different algorithm.
-geometry geometry
(*geometry) Specifies the initial geometry of the
window.
-hl color
(.highlight) Determines the color of the page bor-
der. The default is the foreground color.
-hush (.Hush) Causes xdvi to suppress all suppressable
warnings.
-hushchars
(.hushLostChars) Causes xdvi to suppress warnings
about references to characters which are not de-
fined in the font.
-hushchecksums
(.hushChecksums) Causes xdvi to suppress warnings
about checksum mismatches between the dvi file and
the font file.
-hushspecials
(.hushSpecials) Causes xdvi to suppress warnings
about \special strings that it cannot process.
-icongeometry geometry
(.iconGeometry) Specifies the initial position for
the icon.
-iconic
(.iconic) Causes the xdvi window to start in the
iconic state. The default is to start with the
window open.
-keep (.keepPosition) Sets a flag to indicate that xdvi
should not move to the home position when moving to
a new page. See also the `k' keystroke.
-l (.listFonts) Causes the names of the fonts used to
be listed.
-margins dimen
(.Margin) Specifies the size of both the top margin
and side margin. This should be a decimal number
optionally followed by ``cm'', e.g., 1.5 or 3cm,
giving a measurement in inches or centimeters. It
determines the ``home'' position of the page within
the window as follows. If the entire page fits in
the window, then the margin settings are ignored.
If, even after removing the margins from the left,
right, top, and bottom, the page still cannot fit
in the window, then the page is put in the window
such that the top and left margins are hidden, and
presumably the upper left-hand corner of the text
on the page will be in the upper left-hand corner
of the window. Otherwise, the text is centered in
the window. See also -sidemargin, -topmargin, and
the keystroke `M.'
-mgs size
Same as -mgs1.
-mgs[n] size
(.magnifierSize[n]) Specifies the size of the win-
dow to be used for the ``magnifying glass'' for
Button n. The size may be given as an integer (in-
dicating that the magnifying glass is to be
square), or it may be given in the form widthx-
height. See the MOUSE ACTIONS section. Defaults
are 200x150, 400x250, 700x500, 1000x800, and
1200x1200.
-noghostscript
(.noghostscript) Inhibits the use of GhostScript
for displaying PostScript<tm> specials.
-nogrey
(.grey) Turns off the use of greyscale anti-alias-
ing when printing shrunken bitmaps. (In this case,
the logic of the corresponding resource is the re-
verse: -nogrey corresponds to grey:off; +nogrey to
grey:on.) See also the `G' keystroke.
-nopostscript
(.nopostscript) Turns off rendering of
PostScript<tm> specials. Bounding boxes, if known,
will be displayed instead. This option can also be
toggled with the `v' keystroke.
-offsets dimen
(.Offset) Specifies the size of both the horizontal
and vertical offsets of the output on the page.
This should be a decimal number optionally followed
by ``cm'', e.g., 1.5 or 3cm, giving a measurement
in inches or centimeters. By decree of the Stan-
ford 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. Therefore, the default offsets are 1.0 inch.
See also -xoffset and -yoffset.
-p pixels
(.pixelsPerInch) Defines the size of the fonts to
use, in pixels per inch. The default value is 600.
-paper papertype
(.paper) Specifies the size of the printed page.
This may be of the form widthxheight (or widthx-
heightcm), where width is the width in inches (or
cm) and height is the height in inches (or cm), re-
spectively. There are also synonyms which may be
used: us (8.5x11), usr (11x8.5), legal (8.5x14),
foolscap (13.5x17), as well as the ISO sizes a1-a7,
b1-b7, c1-c7, a1r-a7r (a1-a7 rotated), etc. The
default size is 8.5 x 11 inches.
-rv (.reverseVideo) Causes the page to be displayed
with white characters on a black background, in-
stead of vice versa.
-s shrink
(.shrinkFactor) Defines the initial shrink factor.
The default value is 3.
-S density
(.densityPercent) Determines the density used when
shrinking bitmaps for fonts. A higher value pro-
duces a lighter font. The default value is 40.
Same as -density.
-sidemargin dimen
(.sideMargin) Specifies the side margin (see -mar-
gins).
-thorough
(.thorough) xdvi will usually try to ensure that
overstrike characters (e.g., \notin) are printed
correctly. On monochrome displays, this is always
possible with one logical operation, either and or
or. On color displays, however, this may take two
operations, one to set the appropriate bits and one
to clear other bits. If this is the case, then by
default xdvi will instead use the copy operation,
which does not handle overstriking correctly. The
-thorough option chooses the slower but more cor-
rect choice. See also -copy.
-topmargin dimen
(.topMargin) Specifies the top and bottom margins
(see -margins).
-version
Print information on the version of xdvi.
-xoffset dimen
(.xOffset) Specifies the size of the horizontal
offset of the output on the page. See -offsets.
-yoffset dimen
(.yOffset) Specifies the size of the vertical off-
set of the output on the page. See -offsets.
KEYSTROKES
xdvi recognizes the following keystrokes when typed in its
window. Each may optionally be preceded by a (positive or
negative) number, whose interpretation will depend on the
particular keystroke. Also, the ``Home'', ``Prior'',
``Next'', and arrow cursor keys are synonyms for `^', `b',
`f', `l', `r', `u', and `d' keys, respectively.
q Quits the program. Control-C and control-D will do
this, too.
n Moves to the next page (or to the nth next page if
a number is given). Synonyms are `f', Space, Re-
turn, and Line Feed.
p Moves to the previous page (or back n pages). Syn-
onyms are `b', control-H, and Delete.
g Moves to the page with the given number. Initial-
ly, the first page is assumed to be page number 1,
but this can be changed with the `P' keystroke, be-
low. If no page number is given, then it goes to
the last page.
P ``This is page number n.'' This can be used to
make the `g' keystroke refer to actual page numbers
instead of absolute page numbers.
Control-L
Redisplays the current page.
^ Move to the ``home'' position of the page. This is
normally the upper left-hand corner of the page,
depending on the margins as described in the -mar-
gins option, above.
u Moves up two thirds of a window-full.
d Moves down two thirds of a window-full.
l Moves left two thirds of a window-full.
r Moves right two thirds of a window-full.
c Moves the page so that the point currently beneath
the cursor is moved to the middle of the window.
It also (gasp!) warps the cursor to the same place.
M Sets the margins so that the point currently under
the cursor is the upper left-hand corner of the
text in the page. Note that this command itself
does not move the image at all. For details on how
the margins are used, see the -margins option.
s Changes the shrink factor to the given number. If
no number is given, the smallest factor that makes
the entire page fit in the window will be used.
(Margins are ignored in this computation.)
S Sets the density factor to be used when shrinking
bitmaps. This should be a number between 0 and
100; higher numbers produce lighter characters.
R Forces the dvi file to be reread. This allows you
to preview many versions of the same file while
running xdvi only once.
k Normally when xdvi switches pages, it moves to the
home position as well. The `k' keystroke toggles a
`keep-position' flag which, when set, will keep the
same position when moving between pages. Also `0k'
and `1k' clear and set this flag, respectively.
See also the -keep option.
x Toggles expert mode (in which the buttons do not
appear). Also `0x' and `1x' clear and reset this
mode, respectively. See also the -expert option.
G This key toggles the use of greyscale anti-aliasing
for displaying shrunken bitmaps. In addition, the
key sequences `0G' and `1G' clear and set this
flag, respectively. See also the -nogrey option.
If given a numeric arg that is not 0 or 1, greyscale anti-
aliasing is turned on, and the gamma resource is set to
the value divided by 100. E.g., `150G' turns on greyscale
and sets gamma to 1.5.
v This key toggles the rendering of PostScript<tm>
specials. If rendering is turned off, then bound-
ing boxes are displayed when available. In addi-
tion the key sequences `0v' and `1v' clear and set
this flag, respectively. See also the -no-
postscript option.
F Read a new DVI file (if the SELFILE file selection
widget was not disabled at compile-time).
MOUSE ACTIONS
If the shrink factor is set to any number other than one,
then clicking any mouse button will pop up a ``magnifying
glass'' which shows the unshrunk image in the vicinity of
the mouse click. This subwindow disappears when the mouse
button is released. Different mouse buttons produce dif-
ferent sized windows, as indicated by the -mgs option.
Moving the cursor while holding the button down will move
the magnifying glass.
Also, the scrollbars (if present) behave in the standard
way: pushing Button 2 in a scrollbar moves the top or
left edge of the scrollbar to that point and optionally
drags it; pushing Button 1 moves the image up or right by
an amount equal to the distance from the button press to
the upper left-hand corner of the window; pushing Button 3
moves the image down or left by the same amount.
ENVIRONMENT
Uses the environment variable DISPLAY to specify which bit
map display terminal to use.
The environment variable XDVIFONTS determines the path(s)
searched for fonts in the following manner. The string
consists of one or more strings separated by colons. In
each such string, the substring %f is changed to the font
name; %d is changed to the magnification; and %p is
changed to the font file format (``pk'' or ``gf''). If no
%f appears in the string, then the string ``/%f.%d%p'' is
added on the end. For example, if the string is
``/usr/local/tex/fonts'' and the font is cmr10 at 300 dots
per inch, then it searches for /usr/lo-
cal/tex/fonts/cmr10.300pk and /usr/lo-
cal/tex/fonts/cmr10.300gf, in that order. An extra colon
anywhere in XDVIFONTS causes the system default paths to
be tried at that point. If the font is not found in the
desired size, then xdvi will invoke Metafont to create the
font in the correct size. Failing that, it will try to
find the nearest size. If the font cannot be found at
all, then xdvi will try to vary the point size of the font
(within a certain range), and if this fails, then it will
use the font specified as the alternate font (cf. -alt-
font).
In addition, a %F specifier is available; it is a synonym
for %f, but it does not inhibit putting the string
``/%f.%d%p'' at the end. Finally, a %b specifier is
available; it is converted to the current resolution being
used (i.e., the value of the -p parameter or the .pix-
elsperinch resource.
For compatibility with TeX, you may also use TEXFONTS in
place of XDVIFONTS, although in that case the variable
should not include any ``%'' specifiers. The reason for
recognizing TEXFONTS is that certain versions of TeX also
support the convention regarding an extra colon in the
font path; therefore, users who create their own fonts can
put both their .tfm and raster files in the same directory
and do ``setenv TEXFONTS :MFdir'' or ``setenv TEXFONTS
MFdir:'' in order to get both TeX and xdvi to search their
directory in addition to the system standard directories.
The XDVIFONTS variable overrides the TEXFONTS variable, so
that on those sites where TEXFONTS must be set explicitly,
and therefore this feature is not useful, the XDVIFONTS
variable may be set to an empty string (i.e., ``setenv XD-
VIFONTS'') to cause xdvi to ignore TEXFONTS.
xdvi also recognizes the PKFONTS and TEXPKS variables,
which are checked after XDVIFONTS but before TEXFONTS.
The XDVISIZES environment variable may consist of a list
of resolutions separated by colons, expressed in integer
dots per inch. If a font cannot be found or made at its
stated size, these sizes are tried as a fallback. See the
Kpathsea manual for more details. xdvi will also try the
actual size of the font before trying any of the given
sizes.
Virtual fonts are also supported, although xdvi does not
have any built-in fonts to which they can refer. The
search path for .vf files can be specified with the envi-
ronment variable XDVIVFS in a similar manner to that for
the XDVIFONTS variable. xdvi will also check the VFFONTS
variable if the XDVIFONTS variable is not set. Virtual
fonts are searched for immediately after looking for the
font as a normal font in the exact size specified.
FILES
pkpath Font pixel files.
vfpath Virtual font
files.
SEE ALSO
X(1).
AUTHORS
Eric Cooper, CMU, did a version for direct output to a
QVSS. Modified for X by Bob Scheifler, MIT Laboratory for
Computer Science. Modified for X11 by Mark Eichin, MIT
SIPB. Additional enhancements by many others.