gxditview interprets and displays the intermediate output format
of on an X11 display. It uses the standard X11 fonts, so it does
not require access to the server machine for font loading. There
are several ways to use gxditview.
The intermediate output format of groff, documented in is
produced by troff or the -Z option to groff. It can be viewed by
explicitly calling “gxditview file”. If the file operand is “-”,
gxditview will read the standard input stream; file cannot be
omitted. The intermediate output format of groff is device-
independent but not device-agnostic. gxditview can view it for
all typesetter devices, but the quality is device-dependent.
gxditview will not display output for terminal (nroff) devices.
The best results are achieved with the X* devices for groff's -T
option, of which there are four: -TX75, -TX75-12, -TX100, and
-TX100-12. They differ by the X resolution (75 or 100 dots per
inch) and the base point size (10 or 12 points). They are
especially built for gxditview. When using one of these, groff
generates the intermediate output for this device and calls
gxditview automatically for viewing.
-X produces good results only with -Tps, -TX75, -TX75-12, -TX100,
and -TX100-12. The default resolution for previewing -Tps output
is 75dpi; this can be changed with the -resolution option.
While gxditview is running, the left mouse button brings up a
menu with several entries.
Display the next page.
Display the previous page.
Select a particular numbered page specified by a dialog
Print Print the groff intermediate output using a command
specified by a dialog box. The default command initially
displayed is controlled by the printCommand application
resource, and by the -printCommand option.
Open Open for display a new file specified by a dialog box.
The file should contain groff intermediate output. If the
filename starts with a bar or pipe symbol, “|” it will be
interpreted as a command from which to read.
Quit Exit from gxditview.
The menu entries correspond to actions with similar but not
identical names, which can also be accessed with keyboard
accelerators. The n, Space, Return, and Next (PgDn) keys are
bound to the NextPage action. The p, b, BackSpace, Delete, and
Prior (PgUp) keys are bound to the PreviousPage action. The g
key is bound to the SelectPage action. The o key is bound to the
OpenFile action. The q key is bound to the Quit action. The r
key is bound to a Rerasterize action which rereads the current
file, and redisplays the current page; if the current file is a
command, the command will be re-executed. Vertical scrolling can
be done with the k and j keys; horizontal scrolling is bound to
the h and l keys. The arrow keys (up, down, left, and right) are
also bound to the obvious scrolling actions.
The paperlength and paperwidth commands in the DESC file
describing a groff output device specify the length and width in
machine units of the virtual page displayed by gxditview; see
This program uses the Dvi widget from the X Toolkit. It
understands all of the core resource names and classes as well
width (class Width)
Specifies the width of the window.
height (class Height)
Specifies the height of the window.
foreground (class Foreground)
Specifies the default foreground color.
font (class Font)
Specifies the font to be used for error messages.
fontMap (class FontMap)
Specifies the mapping from groff font names to X font
names. This must be a string containing a sequence of
lines. Each line contains two whitespace-separated
fields: firstly the groff font name, and secondly the XLFD
(X Logical Font Description). The default is shown in
subsection “Default font map” below.
Default font map
XLFDs are long and unwieldy, so some lines are shown broken and
NR -adobe-new century schoolbook-medium-r-normal--*-100
NI -adobe-new century schoolbook-medium-i-normal--*-100
NB -adobe-new century schoolbook-bold-r-normal--*-100
NBI -adobe-new century schoolbook-bold-i-normal--*-100
gxditview accepts all of the standard X Toolkit command-line
options along with the additional options listed below.
-help This option indicates that a brief summary of the allowed
options should be printed.
-page This option specifies the page number of the document to
Because redisplay of the groff intermediate output window
can take a perceiptible amount of time, this option causes
the server to save the window contents so that when it is
scrolled around the viewport, the window is painted from
contents saved in backing store. backing-store-type can
be one of Always, WhenMapped or NotUseful.
The default command displayed in the dialog box for the
Print menu entry will be command.
The groff intermediate output file will be displayed at a
resolution of res dots per inch, unless the DESC file
contains the X11 command, in which case the device
resolution will be used. This corresponds to the Dvi
widget's resolution resource. The default is 75.
The default filename displayed in the dialog box for the
Open menu entry will be string. This can be either a
filename, or a command starting with “|”.
The following standard X Toolkit command-line arguments are
commonly used with gxditview.
This option specifies the color to use for the background
of the window. The default is “white”.
This option specifies the color to use for the border of
the window. The default is “black”.
This option specifies the width in pixels of the border
surrounding the window.
This option specifies the color to use for displaying
text. The default is “black”.
This option specifies the font to be used for displaying
widget text. The default is “fixed”.
-rv This option indicates that reverse video should be
simulated by swapping the foreground and background
This option specifies the preferred size and position of
This option specifies the X server to contact.
This option specifies a resource string to be used.
The following command views this man page with a base point size
groff -TX100-12 -man gxditview.1
The quality of the result depends mainly on the chosen point size
and display resolution; for rapid previewing, however, something
groff -X -P-resolution -P100 document
yields acceptable results.
gxditview and its predecessor xditview were written by Keith
Packard (MIT X Consortium), Richard L. Hyde (Purdue), David
Slattengren (Berkeley), Malcolm Slaney (Schlumberger Palo Alto
Research), Mark Moraes (University of Toronto), and James Clark.
This program is derived from xditview; portions of xditview
originated in xtroff, which was derived from suntroff.
This page is part of the groff (GNU troff) project. Information
about the project can be found at
⟨http://www.gnu.org/software/groff/⟩. If you have a bug report
for this manual page, see ⟨http://www.gnu.org/software/groff/⟩.
This page was obtained from the project's upstream Git repository
⟨https://git.savannah.gnu.org/git/groff.git⟩ on 2023-06-23. (At
that time, the date of the most recent commit that was found in
the repository was 2023-06-23.) If you discover any rendering
problems in this HTML version of the page, or you believe there
is a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
groff 1.23.0.rc1.1931-35c9b 30 January 2022 gxditview(1)