NAME
          xdvi - DVI previewer for the X Window System

     SYNOPSIS
          xdvi [+[page]] [-s shrink] [-S density] [-p pixels] [-l]
          [-paper papertype] [-mgs[n] size] [-hushspecials]
          [-hushchars] [-hush] [-altfont font] [-margins dimen]
          [-sidemargin dimen] [-topmargin dimen] [-offsets dimen]
          [-xoffset dimen] [-yoffset dimen] [-keep] [-rv] [-fg color]
          [-bg color] [-hl color] [-bd color] [-cr color] [-bw width]
          [-noepsf] [-epsfgrey] [-maketexpk] [-mfmode mode] [-d
          <debugflags>] [-geometry geometry] [-icongeometry geometry]
          [-iconic] [-display display] [-copy] [-thorough] [-expert]
          [-version] dvi_file[.dvi]

          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 display PostScript figures that have been included
          using the \epsffile or \psfig macros.  If neither -noepsf
          nor -epsfgrey are given xdvi will fork ghostscript to
          generate bitmaps of PostScript figures and display the
          bitmaps. By default, EPS files are searched for along the
          TEXINPUTS path.

          xdvi can generate fonts at runtime via an external program,
          typically named MakeTeXPK.  See the Kpathsea documentation
          for details.  Whether it does this by default is a compile-
          time option, but the default can always be overridden.

          The dvi_file is tried first with the extension .dvi
          appended, then without.

     OPTIONS
          In addition to specifying the .dvi file (with or without the
          .dvi), 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.

          -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 produces a
               lighter font.  The default value is 40.

          -density density
               Same as -S.

          -p pixels
               (.pixelsPerInch) Defines the base resolution of the
               fonts to use, in pixels per inch.  The default value is
               300.

          -altfont font
               (.altFont) Overrides cmr10 as the default font to use
               when the font in the dvi file cannot be found.

          -l   (.listFonts) Causes the names of the fonts used to be
               listed.

          -hushspecials
               (.hushSpecials) Causes xdvi to suppress warnings about
               \special strings which it cannot process.

          -hushchars
               (.hushLostChars) Causes xdvi to suppress warnings about
               references to characters which are not defined in the
               font.

          -hush
               (.Hush) Causes xdvi to suppress all suppressable
               warnings.

          -rv  (.reverseVideo) Causes the page to be displayed with
               white characters on a black background, instead of vice
               versa.

          -bw width
               (.borderWidth) Specifies the width of the border of the
               window.

          -borderwidth width
               Same as -bw.

          -fg color
               (.foreground) Determines the color of the text
               (foreground).

          -foreground color
               Same as -fg.

          -bg color
               (.background) Determines the color of the background.

          -background color
               Same as -bg.

          -hl color
               (.highlight) Determines the color of the page border.
               The default is the foreground color.

          -bd color
               (.borderColor) Determines the color of the window
               border.

          -bordercolor color
               Same as -bd.

          -cr color
               (.cursorColor) Determines the color of the cursor.  The
               default is the color of the page border.

          -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 correct choice.  See
               also -copy, below.

          -copy
               (.copy) Always use the copy operation when writing
               characters to the display.  This option may be
               necessary for correct operation on a color display, but
               overstrike characters will be incorrect.

          -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.

          -expert
               (.expert) Prevent the buttons from appearing.  See also
               the `x' keystroke.

          -version
               Print information on the version of xdvi.

          -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 `M' under the
               KEYSTROKES section.

          -sidemargin dimen
               (.sideMargin) Specifies the side margin (see above).

          -topmargin dimen
               (.topMargin) Specifies the top and bottom margins (see
               above).

          -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 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.  Therefore, the default
               offsets are 1.0 inch.

          -xoffset dimen
               (.xOffset) Specifies the size of the horizontal offset
               of the output on the page (see above).

          -yoffset dimen
               (.yOffset) Specifies the size of the vertical offset of
               the output on the page (see above).

          -paper papertype
               (.paper) Specifies the size of the printed page.  This
               may be of the form wxh (or wxhcm), where w is the width
               in inches (or cm) and h is the height in inches (or
               cm), respectively.  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.

          -mgs[n] size
               (.magnifierSize[n]) Specifies the size of the window to
               be used for the ``magnifying glass'' for Button n.  See
               the MOUSE ACTIONS section.  Defaults are 200, 350, 600,
               900, and 1200.

          -mgs size
               Same as -mgs1.

          -geometry geometry
               (*geometry) Specifies the initial geometry of the
               window.

          -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.

          -display host:display
               Specifies the host and screen to be used for displaying
               the dvi file.  This is normally obtained from the
               environment variable ``DISPLAY.''

          -noepsf
               (.noEPSF) Causes xdvi to ignore \special strings that
               name PostScript files.

          -epsfgrey
               (.EPSFGrey) Causes xdvi to draw a grey rectangle where
               dvips would include a PostScript figure.

          +maketexpk
               (.maketexpk) Invoke MakeTeXPK to create missing fonts,
               regardless of the compile-time default.  -maketexpk
               says not to invoke MakeTeXPK.

          -mfmodestring
               (.mfmode) Use string for the Metafont mode passed to
               MakeTeXPK. If this is not set, the `mfmode' resource is
               used. If that is not set, the environment variable
               MAKETEX_MODE is used. And if that is not set, a
               compile-time default (cx, unless it's been changed) is
               used.

          -debug
               (.debugLevel) Argument is a collection of bits
               specifying things to be verbose about.  See the source
               file xdvi.h for the possible values.

     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, Return, and
               Line Feed.

          p    Moves to the previous page (or back n pages).  Synonyms
               are `b', control-H, and Delete.

          g,j  Moves to the page with the given number.  Initially,
               the first page is assumed to be page number 1, but this
               can be changed with the `P' keystroke, below.  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 -margins
               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.

     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
          different 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.

          xdvi uses the same environment variables and algorithms for
          finding font files as TeX and its friends do.  See the
          documentation for the Kpathsea library for details.
          (Repeating it here is too error-prone.)

          XDVIFONTS, if set, overrides all other font paths.

          XDVIMAKEPK, if set, overrides `MakeTeXPK' as the command to
          execute to create a PK file if one isn't found.

          The XDVISIZES variable may be set to indicate which sizes of
          fonts are available.  It should consist of a list of numbers
          separated by colons.  If the list begins with a colon, the
          system default sizes are used, as well.  Sizes are expressed
          in dots per inch; decimals may be used for ``pxl'' files:
          for example, a 300 dots per inch file magnified by half a
          step comes out to 1643 dots per five inches, which should be
          encoded as 328.6.  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 device fonts to which they can refer, as
          dvips does.  Virtual fonts are searched for first, to be
          consistent with dvips.

          MAKETEX_MODE specifies the Metafont mode for MakeTeXPK; see
          the -mfmode option above.

     FILES
          ~/.Xdefaults        User-specific X resource defaults.

     SEE ALSO
          X(1), dvips(1), tex(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.  xdvik changes by
          kb@cs.umb.edu; email bug reports to tex-k@cs.umb.edu.