1XDVI(1) General Commands Manual XDVI(1)
2
3
4
6 xdvi - DVI Previewer for the X Window System
7
9 xdvi [+[page]] [--help] [-allowshell] [-altfont font] [-base base URL]
10 [-bg color] [-browser WWWbrowser] [-bw width] [-bw width] [-copy] [-cr
11 color] [-debug bitmask|string[,string ...]] [-display host:display]
12 [-dvipspath path] [-editor command] [-expertmode flag] [-fg color]
13 [-findstring string] [-font font] [-fullscreen ] [-gamma g] [-geometry
14 geometry] [-gsalpha] [-gspalette palette] [-h] [-help] [-hl color]
15 [-href anchor] [-hush] [-hushchars] [-hushchecksums] [-hushspecials]
16 [-hushstdout] [-icongeometry geometry] [-iconic] [-install]
17 [-interpreter path] [-keep] [-l] [-linkcolor color] [-linkstyle
18 0|1|2|3] [-margins dimen] [-mfmode mode-def[:dpi]] [-mgs[n] size]
19 [-mousemode 0|1|2] [-nocolor] [-nofork] [-noghostscript] [-nogrey]
20 [-nogssafer] [-noinstall] [-nomakepk] [-nomatchinverted] [-noomega]
21 [-noscan] [-not1lib] [-notempfile] [-offsets dimen] [-p pixels] [-paper
22 papertype] [-pause] [-pausespecial special-string] [-postscript flag]
23 [-rulecolor color] [-rv] [-S density] [-s shrink] [-safer] [-sidemargin
24 dimen] [-sourceposition line[:col][ ]filename] [-statusline]
25 [-thorough] [-topmargin dimen] [-unique] [-version] [-visitedlinkcolor
26 color] [-warnspecials] [-watchfile secs] [-wheelunit pixels] [-xoffset
27 dimen] [-yoffset dimen] [dvi_file]
28
30 Xdvi is a program for previewing dvi files, as produced e.g. by the
31 tex(1) program, under the X window system.
32
33 Xdvi can show the file shrunken by various integer factors, and it has
34 a ``magnifying glass'' for viewing parts of the page enlarged (see the
35 section MAGNIFIER below). This version of xdvi is also referred to as
36 xdvik since it uses the kpathsea library to locate and generate font
37 files. In addition to that, it supports the following features:
38
39 - hyperlinks in DVI files (section HYPERLINKS),
40
41 - direct rendering of Postscript<tm> Type1 fonts (section T1LIB),
42
43 - source specials in the DVI file (section SOURCE SPECIALS),
44
45 - string search in DVI files (section STRING SEARCH),
46
47 - saving or printing (parts of) the DVI file (sections PRINT DIALOG
48 and SAVE DIALOG).
49
50 Xdvi can be compiled with the Motif toolkit or the Xaw (Athena) toolkit
51 (and variants of it), and the Motif version has a slightly different
52 GUI; these differences are noted below.
53
54 Before displaying a page of a DVI file, xdvi will check to see if the
55 file has changed since the last time it was displayed. If this is the
56 case, it will reload the file. This feature allows you to preview many
57 versions of the same file while running xdvi only once. Since it cannot
58 read partial DVI files, xdvik versions starting from 22.74.3 will cre‐
59 ate a temporary copy of the DVI file being viewed, to ensure that the
60 file can be viewed without interruptions. (The -notempfile can be used
61 to turn off this feature).
62
63 Xdvi can show PostScript<tm> specials by any of three methods. It will
64 try first to use Display PostScript<tm>, then NeWS, then it will try to
65 use Ghostscript to render the images. All of these options depend on
66 additional software to work properly; moreover, some of them may not be
67 compiled into this copy of xdvi.
68
69 For performance reasons, xdvi does not render PostScript specials in
70 the magnifying glass.
71
72 If no file name has been specified on the command line, xdvi will try
73 to open the most recently opened file; if the file history (accessible
74 via the File > Open Recent menu) is empty, or if none of the files in
75 the history are valid DVI files, it will pop up a file selector for
76 choosing a file name. (In previous versions, which didn't have a file
77 history, the file selector was always used; you can set the X resource
78 noFileArgUseHistory to false to get back the old behaviour.)
79
81 In addition to specifying the dvi file (with or without the .dvi exten‐
82 sion), xdvi supports the following command line options. If the option
83 begins with a `+' instead of a `-', the option is restored to its de‐
84 fault value. By default, these options can be set via the resource
85 names given in parentheses in the description of each option.
86
87 +page Specifies the first page to show. If + is given without a num‐
88 ber, the last page is assumed; the first page is the default.
89
90 -allowshell
91 (.allowShell) This option enables the shell escape in PostScript
92 specials. (For security reasons, shell escapes are disabled by
93 default.) This option should be rarely used; in particular it
94 should not be used just to uncompress files: that function is
95 done automatically if the file name ends in .Z, .gz, or .bz2.
96 Shell escapes are always turned off if the -safer option is
97 used.
98
99 -altfont font
100 (.altFont) Declares a default font to use when the font in the
101 dvi file cannot be found. This is useful, for example, with
102 PostScript <tm> fonts.
103
104 -background color
105 (.background) Determines the color of the background. Same as
106 -bg.
107
108 -bg color
109 (.background) Determines the color of the background.
110
111 -borderwidth width
112 (.borderWidth) Specifies the width of the border of the window.
113 Same as -bw.
114
115 -browser browser
116 (.wwwBrowser) Defines the web browser used for handling external
117 URLs. The value of this option or resource has the same syntax
118 as the BROWSER environment variable; see the explanation of that
119 variable in the section `ENVIRONMENT' below for a detailed de‐
120 scription. If neither the option nor the X resource wwwBrowser
121 is specified, the environment variables BROWSER and WWWBROWSER
122 (in that order) are used to determine the browser command. If
123 these are not set either, the following default value is used:
124 htmlview %s:firefox -remote -remote openURL(%s,new-window)
125 :mozilla -remote openURL(%s,new-window) :xterm -e w3m %s:xterm
126 -e lynx %s:xterm -e wget %s
127
128 -bw width
129 (.borderWidth) Specifies the width of the border of the window.
130
131 -copy (.copy) Always use the copy operation when writing characters to
132 the display. This option may be necessary for correct operation
133 on a color display, but overstrike characters will be incorrect.
134 If greyscale anti-aliasing is in use, the -copy operation will
135 disable the use of colorplanes and make overstrikes come out in‐
136 correctly. See also -thorough.
137
138 -cr color
139 (.cursorColor) Determines the color of the mouse cursor. The
140 default is the same as the foreground color.
141
142 -debug bitmask|string[,string ...]
143 (.debugLevel) If nonzero, prints additional information on stan‐
144 dard output. The argument can be either a bitmask specified as
145 a decimal number, or comma-separated list of strings.
146 For the bitmask representation, multiple values can be specified
147 by adding the numbers that represent the individual bits; e.g.
148 to debug all all file searching and opening commands, use 4032
149 (= 2048 + 1024 + 512 + 256 + 128 + 64). Use -1 to turn on debug‐
150 ging of everything (this will produce huge output).
151 For the string representation, use the strings listed in the
152 following table, with a comma to separate the values; e.g. to
153 debug all file searching and opening commands, use search,ex‐
154 pand,paths,hash,stat,open. (The option `kpathsea' is provided
155 as a shorthand for these.) Note that such a list may need to be
156 quoted to prevent the shell from interpreting commas or spaces
157 in the list.
158 The individual numbers and strings have the following meanings:
159
160 1 bitmap Bitmap creation
161 2 dvi DVI translation
162 4 pk PK fonts
163 8 batch Batch mode: Exit after
164 reading the DVI file
165 16 event Event handling
166 32 ps PostScript interpreter calls
167 64 stat Kpathsea stat(2) calls
168 128 hash Kpathsea hash table lookups
169 256 open Kpathsea file opening
170 512 paths Kpathsea path definitions
171 1024 expand Kpathsea path expansion
172 2048 search Kpathsea searching
173 4032 kpathsea All Kpathsea options
174 4096 htex Hypertex specials
175 8192 src Source specials
176 16384 client Client/server mode (see -unique
177 and -sourceposition options)
178 32768 t1 Type1 font library messages
179 65536 t1_verbose Verbose Type1 library messages
180 131072 gui GUI elements
181
182 Some of the Kpathsea debugging options are actually provided by
183 Kpathsea; see the Debugging section in the Kpathsea manual for
184 more information on these.
185
186 -density density
187 (.densityPercent) Determines the density used when shrinking
188 bitmaps for fonts. A higher value produces a lighter font. The
189 default value is 40. If greyscaling is in use, this argument
190 does not apply; use -gamma instead. See also the `S' keystroke.
191 Same as -S.
192
193 -display host:display
194 Specifies the host and screen to be used for displaying the dvi
195 file. By default this is obtained from the environment variable
196 DISPLAY.
197
198 -dvipspath path
199 (.dvipsPath) Use path as the dvips program to use when printing.
200 The default for this is dvips. The program or script should
201 read the DVI file from standard input, and write the Postscript
202 file to standard output.
203
204 -editor editor
205 (.editor) Specifies the editor that will be invoked when the
206 source-special() action is triggered to start a reverse search
207 (by default via Ctrl-Mouse 1). The argument to this option is a
208 format string in which occurrences of ``%f'' are replaced by the
209 file name, occurrences of ``%l'' are replaced by the line number
210 within the file, and optional occurrences of ``%c'' are replaced
211 by the column number within the line.
212
213 If neither the option nor the X resource .editor is specified,
214 the following environment variables are checked to determine the
215 editor command: XEDITOR, VISUAL, and EDITOR (in this sequence).
216 If the string is found as the value of the VISUAL or EDITOR en‐
217 vironment variables, then ``xterm -e '' is prepended to the
218 string; if the editor is specified by other means, then it must
219 be in the form of a shell command to pop up an X window with an
220 editor in it. If none of these variables is set, a warning mes‐
221 sage is displayed and the command ``xterm -e vi +%l %f'' is
222 used.
223
224 If no ``%f'' or ``%l'' occurs in the string, the missing format
225 strings are appended automatically. (This is for compatibility
226 with other programs when using one of the environment vari‐
227 ables).
228
229 A new instance of the editor is started each time this command
230 is used; therefore it is preferrable to use an editor that can
231 be invoked in `client' mode to load new files into the same in‐
232 stance. Example settings are:
233
234 emacsclient --no-wait
235 (older Emacsen)
236
237 gnuclient -q
238 (XEmacs and newer Emacsen)
239
240 gvim --servername xdvi --remote
241 (VIM v6.0+; the `--servername xdvi' option will cause
242 gvim to run a dedicated instance for the files opened by
243 xdvi.)
244
245 nc (nedit)
246
247 Note that those strings need to be enclosed into quotes when us‐
248 ing them on the command-line to protect them from the shell;
249 when using them as argument for the .editor resource in an X re‐
250 source file, no quotes should be used.
251
252 NOTE ON SECURITY: The argument of this option isn't executed as
253 a shell command, but via exec() to prevent evil tricks with the
254 contents of source specials.
255
256 -expert
257 This option is only supported for backwards compatibility; it is
258 equivalent to -expertmode 0, which should be preferred.
259
260 -expertmode flag
261 (.expertMode) With an argument of 0, this option switches off
262 the display of the buttons, scrollbars, the toolbar (Motif on‐
263 ly), the statusline and the page list. These GUI elements can
264 also be (de)activated separately, by combining the appropriate
265 values in the flag argument. This acts similar to the -debug op‐
266 tion: The integer flag is treated as a bitmap where each bit
267 represents one element. If the bit has the value 1, the element
268 is switched on, if it has the value 0, the element is switched
269 off. The meaning of the bits is as follows:
270
271 1 statusline
272 2 scrollbars
273 4 Motif: pagelist, Xaw: buttons and pagelist
274 8 toolbar (Motif only)
275 16 menubar (Motif only)
276
277 For example, to turn on only the statusline and the scrollbars,
278 use 3 (= 1 + 2). See also the `x' keystroke, where the bits are
279 addressed by their positions, from 1 to 3 (Xaw) or 5 (Motif),
280 respectively.
281
282 If the statusline is not active, all messages that would normally be
283 printed to the statusline will be printed to stdout, unless the -hush‐
284 stdout option is used.
285
286 -fg color
287 (.foreground) Determines the color of the text (foreground).
288
289 -findstring string
290 This option triggers a search for string in the DVI file men‐
291 tioned on the command-line, similar to forward search (see the
292 description of the sourceposition option): If there is already
293 another instance of xdvi running on the displaying that DVI
294 file, it will cause that instance to perform the search instead.
295 The search starts at the top of the current page of the DVI
296 file.
297
298 -font font
299 (*font) Sets the font used in menus, buttons etc., as described
300 in the X(7x) man page. The font for child windows can be set
301 separately, e.g.:
302
303 xdvi*statusline*font: \
304 -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
305
306
307 -foreground color
308 Same as -fg.
309
310 -fullscreen
311 When this option is used, xdvi will (try to) run in fullscreen
312 mode, with no window decorations. This option is not guaranteed
313 to work with all windowmanagers/desktops; if you're experiencing
314 problems with it, please use the -geometry option instead, and a
315 suitable window manager setting to remove the window decora‐
316 tions. When using this option for presentations, you might want
317 to get rid of all the control widgets as well, using the -ex‐
318 pertmode option. This option can also be toggled at runtime us‐
319 ing the fullscreen action (by default bound to Ctrl-l).
320
321 -gamma gamma
322 (.gamma) Controls the interpolation of colors in the greyscale
323 anti-aliasing color palette. Default value is 1.0. For 0 <
324 gamma < 1, the fonts will be lighter (more like the background),
325 and for gamma > 1, the fonts will be darker (more like the fore‐
326 ground). Negative values behave the same way, but use a slight‐
327 ly different algorithm. For color and grayscale displays; for
328 monochrome, see -density. See also the `S' keystroke.
329
330 -geometry geometry
331 (.geometry) Specifies the initial geometry of the main window,
332 as described in the X(7x) man page. The geometry of child win‐
333 dows can be set separately, e.g.:
334 xdvi*helpwindow.geometry: 600x800
335
336 -gsalpha
337 (.gsAlpha) Causes Ghostscript to be called with the x11alpha
338 driver instead of the x11 driver. The x11alpha driver enables
339 anti-aliasing in PostScript specials, for a nicer appearance.
340 It is available on newer versions of Ghostscript. This option
341 can also be toggled with the `V' keystroke.
342
343 -gspalette palette
344 (.palette) Specifies the palette to be used when using Ghost‐
345 script for rendering PostScript specials. Possible values are
346 Color, Greyscale, and Monochrome. The default is Color.
347
348 -h, -help, --help
349 Prints a short help text with an overview of the command-line
350 options to standard output.
351
352 -hl color
353 (.highlight) Determines the color of the page border, of the
354 ruler in `ruler mode', and of the highlighting markers in for‐
355 ward search and string search. The default is the foreground
356 color.
357
358 -href anchor
359 Jump to anchor after opening the DVI file. This is only useful
360 when invoking xdvi from other applications.
361
362 -hush (.Hush) Causes xdvi to suppress all suppressible warnings.
363
364 -hushchars
365 (.hushLostChars) Causes xdvi to suppress warnings about refer‐
366 ences to characters which are not defined in the font.
367
368 -hushchecksums
369 (.hushChecksums) Causes xdvi to suppress warnings about checksum
370 mismatches between the dvi file and the font file.
371
372 -hushspecials
373 (.hushSpecials) Causes xdvi to suppress warnings about \special
374 strings that it cannot process.
375
376 -hushstdout
377 (.hushStdout) Suppresses printing of status messages to stdout.
378 Note that errors or warnings will still be printed to stderr
379 even if this option is used.
380
381 -icongeometry geometry
382 (.iconGeometry) Specifies the initial position for the icon.
383
384 -iconic
385 (.iconic) Causes the xdvi window to start in the iconic state.
386 The default is to start with the window open.
387
388 -install
389 (.install) If xdvi is running under a PseudoColor visual, then
390 (by default) it will check for TrueColor visuals with more bits
391 per pixel, and switch to such a visual if one exists. If no
392 such visual exists, it will use the current visual and colormap.
393 If -install is selected, however, it will still use a TrueColor
394 visual with a greater depth, if one is available; otherwise, it
395 will install its own colormap on the current visual. If the
396 current visual is not PseudoColor, then xdvi will not switch the
397 visual or colormap, regardless of its options. The default val‐
398 ue of the install resource is the special value, maybe. There
399 is no +install option. See also -noinstall, and the GREYSCALING
400 AND COLORMAPS section.
401
402 -interpreter filename
403 (.interpreter) Use filename as the Ghostscript interpreter. By
404 default it uses gs.
405
406 -keep (.keepPosition) Sets a flag to indicate that xdvi should not
407 move to the home position when moving to a new page. See also
408 the `k' keystroke. This flag is only honoured by the up() and
409 down() actions, not by up-or-previous() and down-or-next().
410 (Note: this version of the program is modified to honour this
411 flag for up-or-previous() and down-or-next() although only for a
412 horizontal position and not vertical. That allows for a "contin‐
413 uous" scrolling back an forth through a document with a display
414 window narrower than a page width.)
415
416 -l (.listFonts) List the names of all fonts used.
417
418 -linkcolor
419 (.linkColor) Color used for unvisited hyperlinks (`Blue2' by de‐
420 fault). Hyperlinks are unvisited before you click on them, or
421 after the DVI file has been reloaded. The value should be ei‐
422 ther a valid X color name (such as DarkGoldenrod4) or a hexadec‐
423 imal color string (such as #8b6508).Seealso -visitedlinkcolor
424 and -linkstyle.
425
426 -linkstyle
427 (.LinkStyle) Determines the style in which hyperlinks are dis‐
428 played. Possible values and their meanings are:
429
430 0 No highlighting of links
431 1 Underline links with link color
432 2 No underlining, color text with link color
433 3 Underline and display text colored with
434 link color
435
436 The values for link color are specified by the options/resources
437 -linkcolor and -visitedlinkcolor (which see).
438
439 -margins dimen
440 (.Margin) Specifies the size of both the top margin and side
441 margin. This determines the ``home'' position of the page with‐
442 in the window as follows. If the entire page fits in the win‐
443 dow, then the margin settings are ignored. If, even after re‐
444 moving the margins from the left, right, top, and bottom, the
445 page still cannot fit in the window, then the page is put in the
446 window such that the top and left margins are hidden, and pre‐
447 sumably the upper left-hand corner of the text on the page will
448 be in the upper left-hand corner of the window. Otherwise, the
449 text is centered in the window. The dimension should be a deci‐
450 mal number optionally followed by any of the two-letter abbrevi‐
451 ations for units accepted by TeX (pt, pc, in, bp, cm, mm, dd,
452 cc, or sp). By default, the unit will be cm (centimeters). See
453 also -sidemargin, -topmargin, and the keystroke `M.'
454
455 -mfmode mode-def
456 (.mfMode) Specifies a mode-def string, which can be used in
457 searching for fonts (see ENVIRONMENT, below). Generally, when
458 changing the mode-def, it is also necessary to change the font
459 size to the appropriate value for that mode. This is done by
460 adding a colon and the value in dots per inch; for example, -mf‐
461 mode ljfour:600. This method overrides any value given by the
462 pixelsPerInch resource or the -p command-line argument. The
463 metafont mode is also passed to metafont during automatic cre‐
464 ation of fonts. By default, it is unspecified.
465
466 -mgs size
467 Same as -mgs1.
468
469 -mgs[n] size
470 (.magnifierSize[n]) Specifies the size of the window to be used
471 for the ``magnifying glass'' for Button n. The size may be giv‐
472 en as an integer (indicating that the magnifying glass is to be
473 square), or it may be given in the form widthxheight. See the
474 MOUSE ACTIONS section. Defaults are 200x150, 400x250, 700x500,
475 1000x800, and 1200x1200.
476
477 -mousemode [0|1|2]
478 (.mouseMode) Specifies the default mode of xdvi at startup: Mag‐
479 nifier (0), Text Selection Mode (1) or Ruler Mode (2). See the
480 section MODES, below, for more information.
481
482 -nocolor
483 (.color) Turns off the use of color specials. This option can
484 be toggled with the `C' keystroke. (Note: -nocolor corresponds
485 to color:off; +nocolor to color:on.)
486
487 -nofork
488 (.fork) With the -sourceposition and -unique options, the de‐
489 fault behavior is for xdvi to put itself into the background
490 (like a daemon) if there is no appropriate instance of xdvi al‐
491 ready running. This argument makes it run in the foreground in‐
492 stead. This is useful for debugging, or if your client applica‐
493 tion cannot deal well with a program self-backgrounding itself
494 in this way -- e.g., the IPC functions in emacs are known to
495 have problems with this. If no -sourceposition or -unique argu‐
496 ment is given, then this option has no effect. (Note: -nofork
497 corresponds to fork:off; +nofork to fork:on.)
498
499 -noghostscript
500 (.ghostscript) Inhibits the use of Ghostscript for displaying
501 PostScript<tm> specials. (Note: -noghostscript corresponds to
502 ghostscript:off; +noghostscript to ghostscript:on.)
503
504 -nogrey
505 (.grey) Turns off the use of greyscale anti-aliasing when print‐
506 ing shrunken bitmaps. (Note: -nogrey corresponds to grey:off;
507 +nogrey to grey:on.) See also the `G' keystroke.
508
509 -nogssafer
510 (.gsSafer) Normally, if Ghostscript is used to render PostScript
511 specials, the Ghostscript interpreter is run with the option
512 -dSAFER. The -nogssafer option runs Ghostscript without
513 -dSAFER. The -dSAFER option in Ghostscript disables PostScript
514 operators such as deletefile, to prevent possibly malicious
515 PostScript programs from having any effect. If the -safer op‐
516 tion is specified, then this option has no effect; in that case
517 Ghostscript is always run with -dSAFER. (Note: -nogssafer cor‐
518 responds to gsSafer:off; +nogssafer to gsSafer:on.)
519
520 -noinstall
521 (.install) Inhibit the default behavior of switching to a True‐
522 Color visual if one is available with more bits per pixel than
523 the current visual. (Note: -noinstall corresponds install:off;
524 there is no +noinstall option.) See also -install, and the
525 GREYSCALING AND COLORMAPS section.
526
527 -nomakepk
528 (.makePk) Turns off automatic generation of font files that can‐
529 not be found by other means. (Note: -nomakepk corresponds to
530 makePk:off; +nomakepk to makePK:on.)
531
532 -nomatchinverted
533 (.matchInverted) Don't highlight string search matches in in‐
534 verted color; instead, draw a rectangle in highlight color (see
535 the -hl option) around the match. This option is activated auto‐
536 matically if the display isn't running in TrueColor. (Note:
537 -nomatchinverted corresponds to matchInverted:off; +nomatchin‐
538 verted to matchInverted:on.)
539
540 -noomega
541 (.omega) This will disable the use of Omega extensions when in‐
542 terpreting DVI files. By default, the additional opcodes 129
543 and 134 are recognized by xdvi as Omega extensions and inter‐
544 preted as requests to set 2-byte characters. The only drawback
545 is that the virtual font array will require 65536 positions in‐
546 stead of the default 256 positions, i.e. the memory requirements
547 of xdvi will be slightly larger. If you find this unacceptable
548 or encounter another problem with the Omega extensions, you can
549 switch this extension off by using -noomega (but please do send
550 a bug report if you find such problems - see the bug address in
551 the AUTHORS section below).
552 (Note: -noomega corresponds to omega: off; +noomega to omega:
553 on.)
554
555 -noscan
556 (.prescan) By default, xdvi does a preliminary scan of the dvi
557 file to process any papersize specials; this is especially im‐
558 portant at startup since the paper size may be needed to deter‐
559 mine the window size. If PostScript<tm> is in use, then pres‐
560 canning is also necessary in order to properly process header
561 files. In addition, prescanning is needed to correctly deter‐
562 mine the background color of a page. This option turns off such
563 prescanning. (Prescanning will be automatically be turned back
564 on if xdvi detects any of the specials mentioned above.) (Note:
565 -noscan corresponds to prescan:off; +noscan to prescan:on.)
566
567 -not1lib
568 (.t1lib) This will disable the use of T1Lib to display Post‐
569 Script<tm> fonts. Use this option as a workaround when you en‐
570 counter problems with the display of T1Lib (but please don't
571 forget to send a bug report in this case, to the URL mentioned
572 in the section AUTHORS below).
573 (Note: -not1lib corresponds to t1lib:off; +not1lib to t1lib:on.)
574
575 -notempfile
576 (.tempFile) As mentined in the section DESCRIPTION above, xdvi
577 will create a temporary copy of the DVI file so that it can be
578 accessed without interruptions even while the file is being
579 rewritten by TeX. Since this introduces the overhead of copying
580 the file every time it has changed, the -notempfile allows you
581 to turn off this behaviour. In this case, exposing parts of the
582 window while the DVI file is being written by TeX will erase the
583 current window contents until the DVI file can be completely
584 reread.
585 (Note: -notempfile corresponds to tempFile:off; +notempfile to
586 tempFile:on.)
587
588 -offsets dimen
589 (.Offset) Specifies the size of both the horizontal and vertical
590 offsets of the output on the page. By decree of the Stanford
591 TeX Project, the default TeX page origin is always 1 inch over
592 and down from the top-left page corner, even when non-American
593 paper sizes are used. Therefore, the default offsets are 1.0
594 inch. The argument dimen should be a decimal number optionally
595 followed by any of the two-letter abbreviations for units ac‐
596 cepted by TeX (pt, pc, in, bp, cm, mm, dd, cc, or sp). By de‐
597 fault, the unit will be cm (centimeters). See also -xoffset and
598 -yoffset.
599
600 -p pixels
601 (.pixelsPerInch) Defines the size of the fonts to use, in pixels
602 per inch. The default value is 600. This option is provided
603 only for backwards compatibility; the preferred way is to set
604 both the resolution and the Metafont mode via the -mfmode option
605 (which see).
606
607 -paper papertype
608 (.paper) Specifies the size of the printed page. Note that in
609 most cases it's best to specify the paper size in the TeX input
610 file via the line
611
612 \usepackage[dvips]{geometry}
613
614 which will be recognized by both dvips and xdvi; in that case
615 the use of a `-paper' option should be unneccessary.
616 The paper size may be specified in the form widthxheight option‐
617 ally followed by a unit, where width and height are decimal num‐
618 bers giving the width and height of the paper, respectively, and
619 the unit is any of the two-letter abbreviations for units ac‐
620 cepted by TeX (pt, pc, in, bp, cm, mm, dd, cc, or sp). By de‐
621 fault, the unit is cm (centimeters).
622 There are also synonyms which may be used: us (8.5x11in), legal
623 (8.5x14in), foolscap (13.5x17in), as well as the ISO sizes
624 a1-a7, b1-b7, c1-c7. Each of these also has a landscape or `ro‐
625 tated' variant: usr (11x8.5in), a1r-a7r, etc. For compatibility
626 with dvips, the formats letter (8.5x11in), ledger (17x11in) and
627 tabloid (11x17in) are also supported (these don't have rotated
628 variants).
629 Any of the above sizes may be preceded by a plus sign (`+');
630 this causes the paper size given here to override any paper size
631 given in the dvi file. The default paper size is 21 x 29.7 cm
632 (A4 size).
633
634 -pause (.pause) This option provides a simple implementation of incre‐
635 mental (stepwise) display, which can be used for presentations.
636 When this option is used, xdvi will pause the display of the
637 current page whenever it encounters a special special-string
638 (xdvi:pause by default; the string can be customized via -paus‐
639 especial, see below), and the cursor will change its shape. The
640 action unpause-or-next() (by default bound to the Space key)
641 will display the next portion of the page up to the following
642 special-string, or until the end of the page is reached. When
643 the option is not used, specials containing special-string will
644 be ignored.
645
646 -pausespecial special-string
647 (.pauseSpecial) Sets the special string that causes xdvi to
648 pause when the -pause option is active. The default value of
649 special-string is xdvi:pause.
650
651 -postscript flag
652 (.postscript) If flag = 0, rendering of PostScript<tm> specials
653 is disabled; instead, bounding boxes will be displayed (if
654 available). A value of 1 (the default) switches PostScript<tm>
655 specials on. With a value of 2, the PostScript<tm> specials are
656 displayed along with their bounding boxes; this allows you to
657 visually check the correctness of the bounding boxes. The values
658 can also be toggled at runtime with the `v' keystroke and the
659 corresponding numerical prefix arguments 0, 1 and 2.
660
661 -ps2pdfpath path
662 (.ps2pdfPath) Use path as a conversion program from Postscript
663 to PDF. The program or script should accept two command-line ar‐
664 guments: The Postscript file as first argument, and the PDF out‐
665 put file as second argument.
666
667 -rulecolor color
668 (.ruleColor) Determines the color of the rules used for the the
669 magnifier (default: foreground color).
670
671 -q (.noInitFile) Ignore the $HOME/.xdvirc startup file (i.e. don't
672 read it at startup, and don't write it at exit). This forces the
673 defaults defined in $HOME/.Xdefaults to be used. See FILES for
674 more information on $HOME/.xdvirc.
675
676 -rv (.reverseVideo) Causes the page to be displayed with white char‐
677 acters on a black background, instead of vice versa.
678
679 -S density
680 (.densityPercent) Same as -density (which see).
681
682 -s shrink
683 (.shrinkFactor) Defines the initial shrink factor. The default
684 value is 8. If shrink is given as 0, then the initial shrink
685 factor is computed so that the page fits within the window (as
686 if the `s' keystroke were given without a number).
687
688 -safer (.safer) This option turns on all available security options; it
689 is designed for use when xdvi is called by a browser that ob‐
690 tains a dvi or TeX file from another site. This option selects
691 +nogssafer and +allowshell.
692
693 -sidemargin dimen
694 (.sideMargin) Specifies the side margin (see -margins).
695
696 -sourceposition line[:col][ ]filename
697 This option makes xdvi search in the dvi file for the place cor‐
698 responding to the indicated line (and, optionally, column) in
699 the .tex source file, and highlight the place found by drawing a
700 rectangle in the highlight color (see the -hl option) around the
701 corresponding text. In addition, when run with this argument
702 (and the -nofork option is not given, which see), xdvi will al‐
703 ways return immediately: if it finds another instance of xdvi
704 already showing dvi_file, then it will cause that instance to
705 raise its window and move to the given place in the dvi file;
706 otherwise it will start up its own instance in the background.
707 If several instances of xdvi are displaying the respective dvi
708 file, the instance which was last raised to the foreground will
709 be used.
710
711 The space before filename is only needed if the filename starts
712 with a digit. When the space is used, the argument needs to be
713 encosed in quotes to prevent the shell from misinterpreting the
714 space as argument separator.
715
716 This option requires that dvi_file be prepared with source spe‐
717 cial information. See the section on SOURCE SPECIALS for de‐
718 tails on how to do this.
719
720 Here is a more detailed description of how the filename in the
721 -sourceposition argument is matched with the filename in the
722 source specials:
723
724 1. If neither of the filenames contains a path name component,
725 the filenames are compared ignoring the `.tex' extensions in
726 both filenames.
727
728 2. Otherwise, if one of the filenames does contain a path compo‐
729 nent (e.g.: ./test.tex, ../test.tex, /my/homedir/tex/test.tex
730 or any combination of these), both filenames are expanded to
731 a full path, with any occurences of ../ and ./ expanded, and
732 multiple slashes removed.
733 The pathname in the -sourceposition is expanded relative to
734 the current working directory of the xdvi -sourceposition in‐
735 vocation, and the pathnames in the source specials are ex‐
736 panded relative to the path of the current DVI file being
737 viewed.
738 The path names are then compared ignoring the `.tex' exten‐
739 sions in both path names.
740
741 -statusline
742 (.statusline) This option is obsolete; use -expertmode flag in‐
743 stead (which see).
744
745 -thorough
746 (.thorough) Xdvi will usually try to ensure that overstrike
747 characters (e.g., \notin) are printed correctly. On monochrome
748 displays, this is always possible with one logical operation,
749 either and or or. On color displays, however, this may take two
750 operations, one to set the appropriate bits and one to clear
751 other bits. If this is the case, then by default xdvi will in‐
752 stead use the copy operation, which does not handle overstriking
753 correctly. The -thorough option chooses the slower but more
754 correct choice. See also -copy.
755
756 -topmargin dimen
757 (.topMargin) Specifies the top and bottom margins (see -mar‐
758 gins).
759
760 -unique
761 (.unique) This option will make another instance of xdvi running
762 on the same display act as a `server'. For example, the invoca‐
763 tion
764
765 xdvi -unique +5 file.dvi
766
767 will cause this other instance to load file.dvi on page 5 in
768 place of the file that it is currently displaying. If there is
769 already another instance of xdvi already displaying the file
770 file.dvi, then it will just jump to page 5. If the other in‐
771 stance of xdvi is displaying a different file, it will load
772 file.dvi instead. Otherwise, if no other instance of xdvi is
773 currently running on the display, this option instead starts a
774 new instance of xdvi in the background (unless the -nofork op‐
775 tion is specified, which see) displaying page 5 of file.dvi.
776 The filename and the +n option for the page number are the only
777 options available for controlling a remote instance of xdvi like
778 this; all other options are currently ignored.
779
780 -useTeXpages
781 Use logical TeX pages (the values of the \count0 register) in‐
782 stead of physical pages for the pagelist lables and when jumping
783 to a page in a document with the `g' keystroke (or the goto-
784 page() action). This option can be toggled via the `T' key‐
785 stroke.
786
787 -version
788 Print information on the version of xdvi.
789
790 -visitedlinkcolor
791 (.visitedLinkColor) Color used for visited hyperlinks (`Purple4'
792 by default). Hyperlinks become visited once you click on them.
793 As for linkColor, the value should be either a valid X color
794 name or a hexadecimal color string.
795
796 -warnspecials
797 (.warnSpecials) Causes xdvi to issue warnings about \special
798 strings that it cannot process.
799
800 -watchfile n
801 (.watchFile) If this option is set to a value larger than 0, xd‐
802 vi will check the DVI file for changes every n seconds. If the
803 DVI file has been completely written by TeX, it will be reloaded
804 automatically. Fractional values (e.g. `2.5') are possible. The
805 default for this option is 0, i.e. no watching.
806 Since xdvi cannot handle partial DVI files, it tries not to
807 reload the file while it is being rewritten. However, use of
808 the magnifier or switching of pages requires reading (a part of)
809 the DVI file, and if the tempfile option is switched off, this
810 will erase the current contents of the window until the DVI file
811 can be read entirely.
812
813 -wheelunit pixels
814 (.wheelUnit) Sets the number of pixels that a motion of a wheel
815 mouse will move the image up or down. If set to zero, the wheel
816 mouse functionality is disabled. The default value is 80.
817
818 -xoffset dimen
819 (.xOffset) Specifies the size of the horizontal offset of the
820 output on the page. See -offsets.
821
822 -yoffset dimen
823 (.yOffset) Specifies the size of the vertical offset of the out‐
824 put on the page. See -offsets.
825
827 Xdvi recognizes the following keystrokes when typed in its window.
828 Each may optionally be preceded by a (positive or negative) number, a
829 `prefix argument', whose interpretation will depend on the particular
830 keystroke. This prefix argument can be discarded by pressing the ``Es‐
831 cape'' key. If present, the ``Help'', ``Prior'' and ``Next'' keys are
832 synonyms for `?', `b', and `f' keys, respectively.
833
834 The key bindings listed here are those that xdvi assigns by default.
835 The names appearing in brackets at the beginning of the descriptions
836 are the names of the actions associated with the keys; these can be
837 used to customize the key bindings, as explained in more detail in the
838 section CUSTOMIZATION below. If only a lowercase binding is listed,
839 both upper- and lowercase keys will work for that binding.
840
841 ESC key
842 [discard-number()] The escape key discards the numerical prefix
843 for all actions (useful when you mistyped a number).
844
845 Delete key
846 [up-or-previous()] Moves down two-thirds of a window-full, or to
847 the top of the previous page if already at the bottom of the
848 page. With a float argument, moves down the corresponding frac‐
849 tion of a window-full. By default, the Space key is bound to the
850 action unpause-or-next() which does a similar thing; see there.
851 The `keep' flag is ignored by these actions.
852
853 Space key
854 [unpause-or-next()] Moves down two-thirds of a window-full, or
855 to the next page if already at the bottom of the page.
856 When the option -pause special-string is used and the display is
857 currenlty paused, this key will instead display the next portion
858 of the page until the next special-string or the end of the page
859 is encountered. See the description of the -pause option for
860 details.
861
862 Ctrl-Home (Xaw), Ctrl-osfBeginLine (Motif)
863 [goto-page(1)] Moves to the first page of the document.
864
865 Ctrl-End (Xaw), Ctrl-osfEndLine (Motif)
866 [goto-page()] Moves to the last page of the document.
867
868 Home (Xaw), osfBeginLine (Motif)
869 [home-or-top()] Move to the ``home'' position of the page, or to
870 the top of the page if the keep flag is set (in this case, the
871 page doesn't scroll horizontally).
872
873 End (Xaw), osfEndLine (Motif)
874 [end-or-bottom()] Move to the ``end'' position of the page (the
875 lower right-hand corner), or to the bottom of the page if the
876 keep flag is set (in this case, the page doesn't scroll horizon‐
877 tally).
878
879 Down arrow
880 [down(0.015)] Scrolls page down.
881
882 Up arrow
883 [up(0.015)] Scrolls page up.
884
885 Right arrow
886 [right(0.015)] Scrolls page right.
887
888 Left arrow
889 [left(0.015)] Scrolls page left.
890
891 Alt-Ctrl-+
892 [change-density(25)] Increase the darkness of the fonts in the
893 DVI window by adding to the gamma value (see also the `S' key‐
894 stroke).
895
896 Alt-Ctrl--
897 [change-density(-25)] Decrease the darkness of the fonts in the
898 DVI window by subtracting from the gamma value (see also the `S'
899 keystroke).
900
901 Ctrl-+ [set-shrink-factor(+)] Increase the shrink factor (see also the
902 `s' keystroke).
903
904 Ctrl-- [set-shrink-factor(-)] Decrease the shrink factor (see also the
905 `s' keystroke).
906
907 Ctr-[ [pagehistory-delete-backward()] Delete the current item in the
908 page history and move to the history item before the deleted
909 one. With a prefix argument n, delete n previous history items.
910 See PAGE HISTORY for details.
911
912 [ [pagehistory-back()] Move back in the page history (see PAGE
913 HISTORY for details). With a prefix argument n, move back n his‐
914 tory items.
915
916 Ctr-] [pagehistory-delete-forward()] Delete the current item in the
917 page history and move to the history item after the deleted one.
918 With a prefix argument n, delete n next history items. See PAGE
919 HISTORY for details.
920
921 ] [pagehistory-forward()] Move forward in the page history (see
922 PAGE HISTORY for details). With a prefix argument n, move for‐
923 ward n history items.
924
925 ^ [home()] Move to the ``home'' position of the page. This is
926 normally the upper left-hand corner of the page, depending on
927 the margins as described in the -margins option, above.
928
929 ? [help()] Same as the h key (which see).
930
931 B [htex-back()] This key jumps back to the previous hyperlink an‐
932 chor. See the section HYPERLINKS for more information on navi‐
933 gating the links.
934
935 b [back-page()] Moves to the previous page (or back n pages).
936 Synonyms are `p' and Ctrl-h.
937
938 C [set-color()] This key toggles the use of color specials. The
939 key sequences `0C' and `1C' turn interpretation of color spe‐
940 cials off and on, respectively. See also the -nocolor option.
941
942 c [center()] Moves the page so that the point currently beneath
943 the mouse cursor is moved to the middle of the window, and warps
944 the mouse cursor to the same place.
945
946 d [down()] Moves page down two thirds of a window-full. With a
947 float argument to ``down'', moves down the corresponding frac‐
948 tion of a window-full.
949
950 Ctrl-f [find()] Pop up a window to search for a string in the DVI file.
951 See the section STRING SEARCH, below, for more details.
952
953 f [forward-page()] Moves to the next page (or to the nth next page
954 if a number is given). Synonyms are `n', Return, and Line Feed.
955
956 G [set-greyscaling()] This key toggles the use of greyscale anti-
957 aliasing for displaying shrunken bitmaps. In addition, the key
958 sequences `0G' and `1G' clear and set this flag, respectively.
959 See also the -nogrey option.
960
961 If given a numeric argument that is not 0 or 1, greyscale anti-
962 aliasing is turned on, and the gamma resource is set to the val‐
963 ue divided by 100. E.g., `150G' turns on greyscale and sets gam‐
964 ma to 1.5.
965
966 Ctrl-g [find-next()] Find the next match string in the DVI file; this
967 can be used instead of pressing the `Find' button in the search
968 window.
969
970 g [goto-page()] Moves to the page with the given number. If no
971 page number is given, xdvi jumps to the last page.
972 If the option/resource useTeXpages is active, the numbers corre‐
973 spond the the actual page numbers in the TeX file; otherwise,
974 absolute page numbers (starting from 1) are used. In the latter
975 case, the page numbers can be changed with the `P' keystroke,
976 below. Note that with the useTeXpages option it is possible
977 that the same page number occurs multiple times; in such a case,
978 xdvi will use the first page number that matches.
979
980 h Pops up a help window with a short explanation of the most im‐
981 portant key bindings and concepts.
982
983 k [set-keep-flag()] Normally when xdvi switches pages, it moves to
984 the home position as well. The `k' keystroke toggles a `keep-
985 position' flag which, when set, will keep the same position when
986 moving between pages. Also `0k' and `1k' clear and set this
987 flag, respectively. See also the -keep option.
988
989 Ctrl-l [fullscreen(toggle)] Toggles fullscreen mode (see the descrip‐
990 tion of the -fullscreen option for more information on this).
991 This is even more flaky than using the command-line option:
992 There is no universal standard how a window could change its own
993 geometry or window decorations at run-time, so this will not
994 work with most window managers or desktops. Generally, it's bet‐
995 ter to use the window manager controls to change the size or
996 decorations of the xdvi window.
997
998 l [left()] Moves page left two thirds of a window-full.
999
1000 M [set-margins()] Sets the margins so that the point currently un‐
1001 der the mouse cursor defines the upper left-hand corner of the
1002 text in the page. Note that the command does not move the im‐
1003 age, but only determines the margins for the page switching com‐
1004 mands. For details on how the margins are used, see the -margins
1005 option.
1006
1007 m [toggle-mark()] Toggles the mark for the current page in the
1008 page list. When a page is marked, it is displayed with a small
1009 star `*' next to the page number. The marked pages can then be
1010 printed or saved to a file. A page or several pages can also be
1011 marked by clicking or dragging Mouse-2 in the page list.
1012
1013 Ctrl-n [toggle-mark()forward-page()] Toggles the mark for the current
1014 page in the page list, and moves to the next page. This lets you
1015 quickly mark a series of subsequent pages.
1016
1017 n [forward-page()] Moves to the next page (or to the nth next page
1018 if a number is given). Synonyms are `f', Return, and Line Feed.
1019
1020 Ctrl-o [select-dvi-file()] Read a new dvi file. A file-selection widget
1021 is popped up for you to choose the DVI file from. If a prefix
1022 argument n is given, the n th file from the file history is
1023 opened instead.
1024
1025 P [declare-page-number()] ``This is page number n.'' This can be
1026 used to make the `g' keystroke refer to a different page number
1027 than the physical page. (If you want to use `logical' or TeX
1028 page numbers instead of physical pages, consider using the op‐
1029 tion -useTeXpages instead.) The argument n should be given as
1030 prefix to this key.
1031
1032 Ctrl-p [print()] Opens a popup window for printing the DVI file, or
1033 parts of it. See the section PRINT DIALOG for an explanation of
1034 the options available, and the resources to customize the de‐
1035 fault behaviour.
1036
1037 p [back-page()] Moves to the previous page (or back n pages).
1038 Synonyms are `b' and Ctrl-h.
1039
1040 q [quit()] Quits the program.
1041
1042 Ctrl-r [forward-page(0)] Redisplays the current page.
1043
1044 R [reread-dvi-file()] Forces the dvi file to be reread. This al‐
1045 lows you to preview many versions of the same file while running
1046 xdvi only once.
1047
1048 r [right()] Moves page right two thirds of a window-full.
1049
1050 Ctrl-s [save()] Opens a popup window for saving the DVI file, or parts
1051 of it. See the section SAVE DIALOG below for more information on
1052 this.
1053
1054 S [set-density()] Sets the density factor to be used when shrink‐
1055 ing bitmaps. This should be a number between 0 and 100; higher
1056 numbers produce lighter characters. If greyscaling mode is in
1057 effect, this changes the value of gamma instead. The new value
1058 of gamma is the given number divided by 100; negative values are
1059 allowed.
1060
1061 s [set-shrink-factor()] Changes the shrink factor to the given
1062 number. If no number is given, the smallest factor that makes
1063 the entire page fit in the window will be used. (Margins are
1064 ignored in this computation.)
1065
1066 T [use-tex-pages()] Use logical TeX pages (the values of the
1067 \count0 register) instead of physical pages for the pagelist la‐
1068 bels and when jumping to a page in a document via goto-page().
1069 See also the -useTeXpages option.
1070
1071 t [switch-magnifier-units()] Switches the units used for the mag‐
1072 nifier tick marks, and for reporting the distance between the
1073 mouse pointer and the ruler centre in ruler mode (see the sec‐
1074 tion MODES). The default value is specified by the X resource
1075 tickUnits (`mm' by default). The units toggle through the fol‐
1076 lowing values; except for `px', they all correspond to TeX's
1077 units: mm (millimeters) pt (TeX points), in (inches), sp (scaled
1078 points, the unit used internally by TeX) bp (big points or
1079 `Postscript points'), cc (cicero points), dd (didot points), pc
1080 (pica), and px (screen pixels).
1081
1082 Ctrl-u [back-page()toggle-mark()] Moves to the previous page, and tog‐
1083 gles the mark for that page. This is the dual action to Ctrl-n.
1084
1085 u [up()] Moves page up two thirds of a window-full. With a float
1086 argument to ``up'', moves up the corresponding fraction of a
1087 window-full.
1088
1089 Ctrl-v [show-source-specials()] Show bounding boxes for every source
1090 special on the current page, and print the strings contained in
1091 these specials to stderr. With prefix 1, show every bounding box
1092 on the page. This is for debugging purposes mainly.
1093
1094 V [set-gs-alpha()] This key toggles the anti-aliasing of Post‐
1095 Script<tm> specials when Ghostscript is used as renderer. In
1096 addition the key sequences `0V' and `1V' clear and set this
1097 flag, respectively. See also the -gsalpha option.
1098
1099 v [set-ps()] This key toggles the rendering of PostScript<tm> spe‐
1100 cials between 3 states:
1101
1102 - specials (like EPS graphics) are displayed;
1103
1104 - specials are displayed along with their bounding box (if
1105 available);
1106
1107 - only the bounding box is displayed.
1108
1109 The states can also be selected directly by using `1v', `2v' and
1110 `0v' respectively. See also the -postscript option.
1111
1112 Ctrl-x [source-what-special()] Display information about the source
1113 special next to the mouse cursor in the statusline. This is the
1114 same special that would be found by source-special() , but with‐
1115 out invoking the editor. For debugging purposes.
1116
1117 x [set-expert-mode()] Toggles expert mode, in which the sta‐
1118 tusline, the scrollbars, the menu buttons, the toolbar (Motif
1119 only) and the page list are not shown. Typing `1x' toggles the
1120 display of the statusline at the bottom of the window. Typing
1121 `2x' toggles the scrollbars (if available). For Xaw, `3x' tog‐
1122 gles the menu buttons and the page list, for Motif, it toggles
1123 the page list. In Motif, the additional bindings `4x' toggle the
1124 toolbar, and `5x' the menu bar.
1125 Without a prefix argument, all of the mentioned GUI elements are
1126 either switched on (if they had been invisible before) or off.
1127 Toggling the scrollbars may behave erratically with the Xaw wid‐
1128 gets; e.g. the scrollbars may reappear after resizing the win‐
1129 dow, and at certain window sizes one of the scrollbars may fail
1130 to disappear.
1131 See also the option -expertmode (the numbers above correspond to
1132 the bits in the argument to -expertmode).
1133
1135 Mouse-1
1136 [do-href()magnifier(*1)]
1137
1138 Mouse-2
1139 [do-href-newwindow()magnifier(*2)] Usually, if a binding speci‐
1140 fies more then one action, all actions are executed in a se‐
1141 quence. The hyperlink bindings do-href() and do-href-newwindow()
1142 are special in that they are used as an alternative to other ac‐
1143 tions that might follow them if the mouse is currently located
1144 on a hyperlink. In this case, none of the other actions will be
1145 executed. Otherwise, only the other actions are executed.
1146 The action do-href() jumps to the link target in the current xd‐
1147 vi window (eventually switching to another page), and do-href-
1148 newwindow() opens a new instance of xdvi for the link target.
1149 In both cases, the location of the target is indicated by a
1150 small arrow drawn in the same color as a visited link in the
1151 left corner of the window.
1152
1153 Mouse-3
1154 [magnifier(*3)] The actions magnifier(n) will pop up a ``magni‐
1155 fying glass'' which shows the unshrunk image of the region
1156 around the mouse pointer. The magnifier disappears when the
1157 mouse button is released. Moving the mouse cursor while holding
1158 the button down will move the magnifier.
1159 In `Ruler Mode', the first button moves or sets a ruler cross
1160 instead; see the section MODES, below, for details.
1161 Different mouse buttons produce different sized windows, as in‐
1162 dicated by the the argument of the magnifier() action. Its argu‐
1163 ment is either a string of the form widthxheight, as in the
1164 -mgsn command-line option, or one of the strings *1 through *5,
1165 referring to the value specified by the corresponding -mgsn op‐
1166 tion. Note that in order to assign magnifier actions to the but‐
1167 tons 4 or 5, you need to use the resource wheelTranslations
1168 (more about this resource below), e.g.:
1169
1170 xdvi.wheelTranslations: <Btn4Down>: magnifier(*4)\n\
1171 <Btn5Down>:magnifier(*5)\n
1172
1173
1174 Shift-Mouse-1
1175 [drag(+)]
1176
1177 Shift-Mouse-2
1178 [drag(|)]
1179
1180 Shift-Mouse-3
1181 [drag(-)] Drags the page with the mouse. Shift-Mouse 1 allows
1182 dragging in all directions, Shift-Mouse 2 allows vertical drag‐
1183 ging only, and Shift-Mouse 3 allows horizontal dragging only. To
1184 access these actions via customization, use the drag action.
1185 This action should have one parameter, the character ``|'',
1186 ``-'', or ``+'', indicating vertical dragging, horizontal drag‐
1187 ging, or dragging in both directions.
1188
1189 Ctrl-Mouse-1
1190 [source-special()] Holding down the Ctrl key and clicking mouse
1191 button 1 starts a ``reverse search'', opening the editor at the
1192 location in the TeX file corresponding to the pointer location
1193 in the DVI file. See the section on SOURCE SPECIALS, below, for
1194 more information on this.
1195
1197 The following actions are not bound to a key by default, but are avail‐
1198 able for customization.
1199
1200 quit-confirm()
1201 Pops up a confirmation window to quit xdvi. To bind it to the
1202 `q' key instead of the default `quit()' action, put the follow‐
1203 ing into your ~/.Xdefaults file:
1204
1205 xdvi.mainTranslations: #override\
1206 <Key>q: quit-confirm()\n
1207
1208 down-or-next()
1209 Similar to unpause-or-next(): Moves down two-thirds of a window-
1210 full, or to the next page if already at the bottom of the page.
1211
1212 shrink-to-dpi()
1213 This action takes one (required) argument. It sets the shrink
1214 factor to an integer so as to approximate the use of fonts with
1215 the corresponding number of dots per inch. If xdvi is using
1216 fonts scaled for p dots per inch, and the argument to shrink-to-
1217 dpi is n, then the corresponding shrink factor is the ratio p/n,
1218 rounded to the nearest integer.
1219
1221 Key and mouse button assignments can be changed by setting the main‐
1222 Translations resource to a string of translations as defined in the
1223 documentation for the X toolkit. The actions should take the form of
1224 action names listed in the KEYSTROKES and MOUSE ACTIONS sections.
1225
1226 An exception to this are the Motif keys osfPageUp (PgUp), osfPageDown
1227 (PgDown), osfBeginLine (Home) and osfEndLine (End) which are currently
1228 not customizable in the Motif version.
1229
1230 Key actions will usually be without arguments; if they are passed an
1231 argument, it represents the optional number or `prefix argument' typed
1232 prior to the action.
1233
1234 Some key actions may take special arguments, as follows: The argument
1235 of goto-page may be the letter `e', indicating the action of going to
1236 the end of the document. The argument of set-shrink-factor may be the
1237 letter `a', indicating that the shrink factor should be set to the
1238 smallest value such that the page will fit in the window, or one of the
1239 signs `+' or `-', indicating that the shrink factor should be increased
1240 or decreased, respectively. Finally, actions that would perform a tog‐
1241 gle, such as set-keep-flag, may receive an argument `t', indicating
1242 that the action should toggle regardless of the current prefix argu‐
1243 ment.
1244
1245 Mouse actions should refer only to ButtonPress events (e.g.,
1246 <Btn1Down>:magnifier(*1)). The corresponding motion and release events
1247 will be handled internally. A key action may be bound to a mouse
1248 event, but not vice versa.
1249
1250 Usually the string of translations should begin with ``#override'', in‐
1251 dicating that the default key and mouse button assignments should not
1252 be discarded.
1253
1254 When keys or mouse buttons involving modifiers (such as Ctrl or Shift)
1255 are customized together with their non-modified equivalents, the modi‐
1256 fied keys should come first, for example:
1257
1258 xdvi.mainTranslations: #override \
1259 Ctrl<Btn1Down>: magnifier(*3)\n\
1260 Shift<Btn1Down>: magnifier(*2)\n\
1261 <Btn1Down>: magnifier(*1)\n
1262
1263
1264 Note: The additional `Modes' for Mouse-1 (Ruler Mode, Text Mode - see
1265 the section MODES) only work if Mouse-1 has the magnifier() action
1266 bound to it.
1267
1268 Because xdvi needs to capture pointer motion events, and because the X
1269 Toolkit translations mechanism cannot accommodate both motion events
1270 and double-click events at the same time, it is not possible to specify
1271 double-click actions in xdvi customizations. For information on this
1272 and other aspects of translations, see the X Toolkit Intrinsics docu‐
1273 mentation.
1274
1275 There is no command-line option to set the mainTranslations resource,
1276 since changing this resource on the command line would be cumbersome.
1277 To set the resource for testing purposes, use the -xrm command-line op‐
1278 tion provided by the X toolkit. For example, xdvi -xrm 'XDvi.main‐
1279 Translations: #override "z":quit()' ... or xdvi -xrm 'XDvi.mainTrans‐
1280 lations: #override <Key>z:quit()' ... will cause the key `z' to quit
1281 xdvi.
1282
1283 Support of wheel mice is controlled by the wheelTranslations resource.
1284 Generally the only action routine called by this resource should be
1285 wheel. The default value is
1286 ``<Btn4Down>:wheel(-1.)\n<Btn5Down>:wheel(1.)''. Because this resource
1287 is implemented differently from the others, it should not begin with
1288 ``#override''; when specifying a value for this resource, all wheel ac‐
1289 tions should be included.
1290
1291 Some resources are provided to allow customization of the geometry of
1292 the Xaw command buttons. Again, they are not changeable via command-
1293 line options, other than via the -xrm option. All of these resources
1294 take integer values.
1295
1296 buttonSideSpacing
1297 The number of pixels to be placed on either side of the buttons.
1298 The default value is 6.
1299
1300 buttonTopSpacing
1301 The number of pixels between the top button and the top of the
1302 window. The default value is 50.
1303
1304 buttonBetweenSpacing
1305 The number of pixels between the buttons. The default value is
1306 20.
1307
1308 buttonBetweenExtra
1309 The number of pixels of additional space to be inserted if the
1310 buttonTranslations resource string contains an extra newline
1311 character. The default value is 50.
1312
1313 buttonBorderWidth
1314 The border width of the button windows. The default value is 1.
1315
1317 The scrollable page list on the right of the main window allows you to
1318 jump directly to a page in the DVI file.
1319
1320 Mouse-1
1321 Jumps to the page the mouse is located on.
1322
1323 Mouse-2
1324 [toggle-mark()] Toggle the mark of the current page. The marks
1325 are used by the `Print' and `Save to file' dialogs to select on‐
1326 ly marked pages from the DVI file.
1327
1328 When the mouse pointer is inside the page list, the mouse wheel switch‐
1329 es to the next or previous page.
1330
1332 The scrollbars (if present) behave in the standard way: pushing Button
1333 2 in a scrollbar moves the top or left edge of the scrollbar to that
1334 point and optionally drags it; pushing Button 1 moves the image up or
1335 right by an amount equal to the distance from the button press to the
1336 upper left-hand corner of the window; pushing Button 3 moves the image
1337 down or left by the same amount.
1338
1339 The scrollbars can be removed via the -expertmode flag/keystroke (which
1340 see).
1341
1342 Wheel mice are supported: motion of the wheel on such a mouse moves
1343 the image up or down by the number of pixels indicated by the -wheelu‐
1344 nit option. To access this option via customization, use the wheel ac‐
1345 tion. This action takes one parameter, giving the distance to scroll
1346 the image. If the parameter contains a decimal point, the distance is
1347 given in wheel units; otherwise, pixels.
1348
1350 By default, the mouse buttons 1 to 5 will pop up a ``magnifying glass''
1351 that shows an unshrunken image of the page (i.e. an image at the reso‐
1352 lution determined by the option/X resource pixels or mfmode) at varying
1353 sizes. When the magnifier is moved, small ruler-like tick marks are
1354 displayed at the edges of the magnifier (unless the X resource de‐
1355 layRulers is set to false, in which case the tick marks will always be
1356 displayed). The unit of the marks is determined by the X resource
1357 tickUnits (mm by default). This unit can be changed at runtime via the
1358 action switch-magnifier-units(), by default bound to the keystroke `t'
1359 (see the description of that key, and of switch-magnifier-units() for
1360 more details on the units available).
1361 The length of the tick marks can be changed via the X resource tick‐
1362 Length (4 by default). A zero or negative value suppresses the tick
1363 marks.
1364
1366 Xdvi keeps a history of viewed pages, and you can move through the his‐
1367 tory and delete items using the keys [ (pagehistory-back()), ] (page‐
1368 history-forward()), Ctr-[ (pagehistory-delete-backward()) and Ctr-]
1369 (pagehistory-delete-forward()).
1370
1371 When one of the history commands is used, the page history is displayed
1372 in the status line at the bottom of the window, with the current list
1373 item marked by square brackets `[', `]' and a left and right context of
1374 at most 10 items. File boundaries are marked by `#'.
1375
1376 The size of the history can be customized with the X resource pageHis‐
1377 torySize (the default size is 1000 items). If the size is set to 0, the
1378 history commands are disabled.
1379
1381 The actions do-href() and do-href-newwindow() (by default bound to
1382 Mouse-1 and Mouse-2 if the pointer is currently located on a hyperlink)
1383 can be used to open the link target in the same window (do-href()) or
1384 in a new window (do-href-newwindow()).
1385
1386 If the link target is not a file on the local disk, xdvi tries to
1387 launch a web browser (as specified by the -browser command line option,
1388 the BROWSER environment variable or the wwwBrowser X resource, in this
1389 order) to retrieve the document. See the description of the BROWSER en‐
1390 vironment variable, below, for an example setting.
1391
1392 If the file is a local file, xdvi tries to determine if it is a DVI
1393 file. If it is, xdvi will try to display the file; otherwise it will
1394 try to determine the MIME type of the file, and from that an applica‐
1395 tion suitable for opening the file. This is done by parsing the files
1396 specified by the environment variable EXTENSIONMAPS for a mapping of
1397 filename extensions to MIME types, and the files determined by the en‐
1398 vironment variable MAILCAPS for a mapping of MIME types to application
1399 programs. See the descriptions of these variables in the section ENVI‐
1400 RONMENT, below, for a more detailed description and the default values
1401 of these variables. If no suitable files are found, a set of built-in
1402 default MIME types and applications is used.
1403
1404 Xdvi currently uses no heuristics apart from the filename suffix to de‐
1405 termine the mime type of a file. If a filename has no suffix, the value
1406 of the resource noMimeSuffix is used (by default application/x-un‐
1407 known). If the suffix doesn't match any of the suffixes in mime.types,
1408 the value of the resource unknownMimeSuffix is used (by default appli‐
1409 cation/x-unknown). If the mailcap entries do not list a viewer for a
1410 given mime type, xdvi will show a warning popup. If you want to avoid
1411 this warning, and for example want to always use the netscape browser
1412 for unknown MIME types, you could add the following line to your
1413 ~/.mailcap file:
1414
1415 application/xdvi-unknown; \
1416 netscape -raise -remote 'openURL(%s,new-window)'
1417
1418
1420 The keystroke Ctrl-f or the menu entry File > Find ... (or the `Binoc‐
1421 ulars' symbol in the toolbar, for Motif) opens a dialog window to
1422 search for a text string or a regular expression in the DVI file. The
1423 keystroke Ctrl-g jumps to the next match (like pressing the `Find' but‐
1424 ton in the search window).
1425
1426 By default, the matches are highlighted in inverted color. If the dis‐
1427 play isn't running in TrueColor, or if the X resouce matchHighlightIn‐
1428 verted is set to false or the command-line option -nomatchinverted is
1429 used, xdvi will instead draw a rectangle in highlight color (see the
1430 -hl option) around the match.
1431
1432 If a match crosses a page boundary, only the part on the first page is
1433 highlighted. Xdvi will scan up to 2 adjacent pages to match strings
1434 crossing page boundaries; but note that header or footer lines, or in‐
1435 tervening float pages will be treated as parts of the scanned text.
1436 Such text will usually cause multi-page matching to fail.
1437
1438 This emphasizes the fact that searching in the formatted text (the DVI
1439 output) works differently from searching in the source text: Searching
1440 in the DVI file makes it easier to skip formatting instructions, and
1441 makes it possible to search for e.g. hyphenation and equation numbers;
1442 but sometimes the formatting results can also get in the way, e.g. in
1443 the case of footnotes. In these cases it's better to search in the TeX
1444 source instead. The use of source specials will make switching between
1445 the xdvi display and the editor with the TeX source easier; see the
1446 section SOURCE SPECIALS below for more information on this.
1447
1448 The text extracted from the DVI file is in encoded in UTF-8 (you can
1449 view that text by saving the file in UTF-8 format via the File > Save
1450 as ... menu item). If xdvi has been compiled with locale, nl_langin‐
1451 fo() and iconv support, the search term is converted from the character
1452 set specified by the current locale into UTF-8. (See the output of lo‐
1453 cale -a for a list of locale settings available on your system). If
1454 nl_langinfo() is not available, but iconv is, you can specify the input
1455 encoding for iconv via the X resource textEncoding (see the output of
1456 iconv -l for a list of valid encodings). If iconv support is not avail‐
1457 able, only the encodings ISO-8859-1 and UTF-8 are supported (these
1458 names are case-insensitive).
1459
1460 Ideographic characters from CJKV fonts are treated specially: All white
1461 space (spaces and newlines) before and after such characters is ignored
1462 in the search string and in the DVI file.
1463
1464 To match a newline character, use \n in the search string; to match the
1465 string \n, use \\n.
1466
1467 If the checkbox Regular Expression is activated, the string is treated
1468 as a regular expression in extended POSIX syntax, with the following
1469 properties:
1470
1471 - a? matches a zero or one times.
1472
1473 - a* matches a zero or more times.
1474
1475 - a+ matches a one or more times. Note that * and + are greedy, i.e.
1476 they match the longest possible substring.
1477
1478 - The pattern . matches any character except for newline. To also
1479 match a newline, use `(.|\n)'.
1480
1481 - a{n} matches a exactly n times.
1482
1483 - a{n,m} matches a at least n and no more than m times.
1484
1485 - a|b matches a or b. Brackets can be used for grouping, e.g.:
1486 (a|b)|c.
1487
1488 - The string matched by the nth group can be referenced by \n, e.g.
1489 \1 refers to the first match.
1490
1491 - The characters ^ and $ match the beginning and the end of a line,
1492 respectively.
1493
1494 - [abc] matches any of the letters a, b, c, and [a-z] matches all
1495 characters from a to z.
1496
1497 - Each item in a regular expression can also be one of the following
1498 POSIX character classes:
1499 [[:alnum:]] [[:alpha:]] [[:blank:]] [[:cntrl:]] [[:digit:]]
1500 [[:graph:]] [[:lower:]] [[:print:]] [[:space:]] [[:upper:]]
1501
1502
1503 These can be negated by inserting a ^ symbol after the first brack‐
1504 et: [^[:alpha:]]
1505
1506 For more details on POSIX regular expressions, see e.g. the IEEE
1507 Std 1003.1 standard definition available online from:
1508
1509 http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap09.html
1510
1511 - As a non-standard extension, the following Perl-like abbreviations
1512 can be used instead of the POSIX classes:
1513
1514 Symbol Meaning POSIX Class
1515
1516 \w an alphanumeric character [[:alnum:]]
1517 \W a non-alphanumeric character [^[:alnum:]]
1518 \d a digit character [[:digit:]]
1519 \D a non-digit character [^[:digit:]]
1520 \s a whitespace character [[:space:]]
1521 \S a non-whitespace character [^[:space:]]
1522
1523
1524 - The following characters are special symbols; they need to be es‐
1525 caped with \ in order to match them literally: ( ) [ ] . * ? + ^ $
1526 \.
1527
1528 - Matches of length zero are silently skipped.
1529
1530 The dialog also provides checkboxes to:
1531
1532 - search backwards;
1533
1534 - match in a case-sensitive manner (the default is to ignore case,
1535 i.e. a search string Test will match both the strings test and TEST
1536 in the DVI file);
1537
1538 - ignore line breaks and hyphens: This removes all hyphens at the
1539 ends of lines and the following newline characters, and replaces
1540 all remaining newline characters by white spaces. So hyphenated
1541 words will appear as one word to the search, and a search for two
1542 words with a space in between will also match the words if they are
1543 separated by a linebreak.
1544 Note that the hyphen removal may cause unwanted side effects for
1545 compound words containing hyphens that are wrapped after the hy‐
1546 phen, and that replacing the newlines affects the interpretation of
1547 regular expressions as follows: The . pattern will also match new‐
1548 lines, and ^ and $ won't match begin and end of lines any more.
1549 (Since currently there is no option for turning off the greediness
1550 of * and +, turing on this option will usually result in matches
1551 that are longer than desired.)
1552
1553 The current checkbox settings are saved in the ~/.xdvirc file.
1554
1556 The print dialog window allows you to print all pages, marked pages
1557 (click or drag Mouse-2 in the page list to mark them), or a range of
1558 pages. Note that the page numbers always refer to physical pages, so if
1559 you're using the option `use TeX pages', you may want to disable it to
1560 make it easier to determine the correct page numbers (or avoid this
1561 problem altogether by marking the pages to be printed).
1562
1563 The value of the Printer text filed is passed to dvips via the -o!
1564 mechanism, as a single argument after the `!'. Any arguments listed in
1565 the Dvips options field are segmeted at whitespaces and passed as sepa‐
1566 rate arguments to dvips. If you e.g. want to print the file 2-up, you
1567 should enter the following string into the Printer field:
1568
1569 psnup -2 -q | lpr -Plp
1570
1571
1572 There are several resources for customizing the behaviour and the de‐
1573 fault entries of the print dialog:
1574
1575 dvipsPrinterString
1576
1577 dvipsOptionsString
1578 These can be used to provide default entries for the Printer and
1579 the Dvips options text fields, respectively. If no paper size is
1580 specified in the DVI file (via e.g. \usepackage[dvips]{geometry}
1581 - this is the preferred method), the input field is initialized
1582 with the current value of the command line option/X resource pa‐
1583 per. E.g., the option -paper a4r is translated into the dvips
1584 options -t a4 -t landscape. Note that no check is performed
1585 whether dvips actually understands these options (it will ignore
1586 them if it can't); currently not all options used by xdvi are
1587 also covered by dvips.
1588
1589 dvipsHangTime
1590
1591 dvipsFailHangTime
1592 These specify the time (in milliseconds) that the printing
1593 progress window will stay open after the dvips process has ter‐
1594 minated. The value of dvipsHangTime is used if the process ter‐
1595 minates successfully; dvipsFailHangTime is used if it terminates
1596 with an error. The default values are 1.5 and 5 seconds, respec‐
1597 tively. If both values are negative, the window will stay open
1598 until it is closed by the user.
1599
1601 This dialog allows you to save all or selected/marked pages in the cur‐
1602 rent DVI file. You can save in one of the following formats:
1603
1604 - Postscript (uses dvips to convert the DVI file to a Postscript
1605 file, just like when printing to a Postscript file).
1606
1607 - PDF (first uses dvips to convert the DVI file to a Postscript file,
1608 then uses ps2pdf to convert the Postscript file to PDF).
1609
1610 - Plain text in ISO-8859-1 or UTF-8 encoding (the latter will pre‐
1611 serve more of the special LaTeX characters e.g. from mathematical
1612 mode). If a character cannot be displayed in the selected charset,
1613 it is replaced by `\' followed by the hexadecimal character code.
1614 If a character is not recognized at all, it is replaced by `?'. If
1615 you think that xdvi should recognize a character but doesn't,
1616 please send a feature request to the address given in AUTHORS be‐
1617 low. Likewise, if you observe spurious spaces or unwanted line‐
1618 breaks in the output, please report this as a bug.
1619
1620 The programs for Postscript and PDF conversion can be customized via
1621 the command line options or X resources -dvipspath/.dvipsPath and
1622 -ps2pdfpath/.ps2pdfPath, respectively; see the explanation of these op‐
1623 tions above for more details.
1624
1626 The keystroke Ctrl-m [switch-mode()] switches between three different
1627 bindings for Mouse-1, which can also be activated via the Modes menu
1628 (in Motif, this is a submenu of the Options menu called Mouse Mode).
1629 The default mode at startup can be customized via the X resource mouse‐
1630 Mode or the command-line option -mousemode. The default startup mode
1631 is Magnifier Mode.
1632
1633 Note: The modes are implemented by changing the magnifier() action.
1634 Switching the mode will not work if Mouse-1 has been customized to an
1635 action sequence that does not contain the magnifier() action.
1636
1637 Magnifier Mode
1638 In this mode, the mouse buttons 1 to 5 pop up a ``magnifying
1639 glass'' that shows an unshrunken image of the page (i.e. an im‐
1640 age at the resolution determined by the option/X resource pixels
1641 or mfmode) at varying sizes. When the magnifier is moved, small
1642 ruler-like tick marks are displayed at the edges of the magnifi‐
1643 er (unless the X resource delayRulers is set to false, in which
1644 case the tick marks are always displayed). The unit of the
1645 marks is determined by the X resource tickUnits (mm by default).
1646 This unit can be changed at runtime via the action switch-magni‐
1647 fier-units(), by default bound to the keystroke `t' (see the de‐
1648 scription of that key, and of switch-magnifier-units() for more
1649 details on the units available).
1650 The length of the tick marks can be changed via the X resource
1651 tickLength (4 by default). A zero or negative value suppresses
1652 the tick marks.
1653
1654 Text Selection Mode
1655 This mode allows you to select a rectangular region of text in
1656 the DVI file by holding down Mouse-1 and moving the mouse. The
1657 text is put into the X primary selection so that it can be past‐
1658 ed into other X applications with Mouse-2 as usual.
1659 If xdvi has been compiled with locale, nl_langinfo() and iconv
1660 support, the selected text is converted into the character set
1661 of the current locale (see the output of locale -a for a list of
1662 locale settings available on your system). If nl_langinfo() is
1663 not available, but iconv is, you can specify the input encoding
1664 for iconv via the X resource textEncoding (see the output of
1665 iconv -l for a list of valid encodings). If iconv support is not
1666 available, only the encodings ISO-8859-1 and UTF-8 are supported
1667 (these names are case-insensitive).
1668 Note that UTF-8 is the only encoding that can render all charac‐
1669 ters (e.g. mathematical symbols) of a DVI file. If ISO-8859-1 is
1670 active, characters that cannot be displayed are replaced by `\'
1671 followed by the hexadecimal character code. For other encod‐
1672 ings, such characters may trigger iconv error messages. If a
1673 character is not recognized at all, it is replaced by `?'.
1674 To extract larger portions of text, you can alternatively save
1675 selected pages or the entire file in text format via the File >
1676 Save as ... menu.
1677
1678 Ruler Mode
1679 This mode provides a simple way of measuring distances on the
1680 page.
1681 When this mode is activated, the mouse cursor changes into a
1682 thin cross, and a larger, cross-shaped ruler is drawn in the
1683 highlight color at the mouse location. The ruler doesn't have
1684 units attached to it; instead, the current distance between the
1685 ruler and the mouse cursor is continously printed to the sta‐
1686 tusline.
1687 When activating Ruler Mode, the ruler is at first attached to
1688 the mouse and can be moved around. It can then be positioned at
1689 a fixed place by clicking Mouse-1. After that, the mouse cursor
1690 can be moved to measure the horizontal (dx), vertical (dy) and
1691 direct (shortest) (dr) distance between the ruler center point
1692 and the mouse.
1693 Clicking Mouse-1 again will move the ruler to the current mouse
1694 position, and holding down Mouse-1 will drag the ruler around.
1695 In Ruler Mode, the following special keybindings extend or re‐
1696 place the default bindings:
1697
1698 o [ruler-snap-origin()] Snap the ruler back to the origin
1699 coordinate (0,0).
1700
1701 t [overrides switch-magnifier-units()] Toggle between vari‐
1702 ous ruler units, which can be specified by the X resource
1703 tickUnits (`mm' by default).
1704
1705 P [overrides declare-page-number()] Print the distances
1706 shown in the statusline to standard output.
1707
1709 The Motif toolbar can also be customized. The XPM file used for the
1710 toolbar icons can be specified via the resource toolbarPixmapFile,
1711 which should contain a filename that can be found in one of XFILE‐
1712 SEARCHPATH or XDVIINPUTS (see the section FILE SEARCHING below for more
1713 information on these variables). Xdvi will try to split this pixmap
1714 horizontally into n pieces, where each piece is as wide as the pixmap
1715 is high and is treated as an image for toolbar button n. This means
1716 that each icon should be a square, and that the entire pixmap should
1717 have width n x h if h is the height of the pixmap.
1718
1719 The resource toolbarTranslations can be used to map icons/buttons to
1720 specific actions. The resource should contain a string separated by
1721 newline characters, similar to the resources mainTranslations and menu‐
1722 Translations. Every line must contain either a spacer definition, or
1723 an icon definition:
1724
1725 A spacer definition is a string SPACER(n), where n is the number of
1726 pixels inserted as separator to the following button.
1727
1728 An icon definition is a colon-separated list containing the following
1729 elements:
1730
1731 - the index of an icon in the pixmap file (starting from zero);
1732
1733 - a long tooltip string, displayed in the status area;
1734
1735 - a short tooltip string, displayed as popup;
1736
1737 - a sequence of actions to be performed when the corresponding tool‐
1738 bar button is pushed.
1739
1740 To illustrate this, the default value of toolbarTranslations looks as
1741 follows:
1742
1743 xdvi.toolbarTranslations: \
1744 SPACER(5)\n\
1745 0:Open a new document (Key\\: Ctrl-f):\
1746 Open file:select-dvi-file()\n\
1747 SPACER(10)\n\
1748 1:Reread this document (Key\\: R):\
1749 Reread file:reread-dvi-file()\n\
1750 SPACER(10)\n\
1751 2:Go to the first page of this document (Key\\: 1g):\
1752 Go to first page:goto-page(1)\n\
1753 3:Go to the previous page of this document (Key\\: p):\
1754 Go to previous page:back-page(1)\n\
1755 4:Go to the next page of this document (Key\\: n):\
1756 Go to next page:forward-page(1)\n\
1757 5:Go to the last page of this document (Key\\: g):\
1758 Go to last page:goto-page()\n\
1759 SPACER(10)\n\
1760 6:Enlarge the display (Key\\: Ctrl-+):Zoom in:\
1761 set-shrink-factor(+)\n\
1762 7:Shrink the display (Key\\: Ctrl--):Zoom out:\
1763 set-shrink-factor(-)\n\
1764 SPACER(10)\n\
1765 8:Jump back to the previous hyperlink (Key\\: B):\
1766 Back hyperlink:htex-back()\n\
1767 SPACER(10)\n\
1768 10:Print this document:Print:print()\n\
1769 SPACER(10)\n\
1770 11:Toggle marks for odd pages (Key\\: 1m):\
1771 Toggle odd:toggle-mark(1)\n\
1772 12:Toggle marks for even pages (Key\\: 2m):\
1773 Toggle even:toggle-mark(2)\n\
1774 13:Toggle mark for current page (Key\\: 2m):\
1775 Toggle current:toggle-mark()\n\
1776 14:Unmark all pages (Key\\: 0m):\
1777 Unmark all:toggle-mark(0)\n\
1778 SPACER(10)\n\
1779 18:Display fonts darker (Key\\: Alt-Ctrl-+):\
1780 Fonts darker:change-density(5)\n\
1781 19:Display fonts lighter (Key\\: Alt-Ctrl--):\
1782 Fonts lighter:change-density(-5)\n
1783
1784
1785 When the mouse remains over a toolbar button for a certain period, a
1786 `tooltip' window is shown, describing what the button does using the
1787 short tooltip string from the above resource. At the same time, the
1788 long tooltip string is displayed in the statusline. The appearance and
1789 behaviour of these tooltips can be customized via the following re‐
1790 sources:
1791
1792 tipShell.background
1793 Background color of the tooltip window.
1794
1795 tipShell.fontSet
1796 Font used for the tooltip.
1797
1798 tipShell.waitPeriod
1799 The time (in milliseconds) the mouse pointer needs to be over
1800 the button before the tooltip is shown. Set it to a negative
1801 value to suppress the tooltips altogether.
1802
1803
1805 The greyscale anti-aliasing feature in xdvi will not work at its best
1806 if the display does not have enough colors available. This can happen
1807 if other applications are using most of the colormap (even if they are
1808 iconified). If this occurs, then xdvi will print an error message and
1809 turn on the -copy option. This will result in overstrike characters
1810 appearing wrong; it may also result in poor display quality if the num‐
1811 ber of available colors is very small.
1812
1813 Typically this problem occurs on displays that allocate eight bits of
1814 video memory per pixel. To see how many bits per pixel your display
1815 uses, type xwininfo in an xterm window, and then click the mouse on the
1816 root window when asked. The ``Depth:'' entry will tell you how many
1817 bits are allocated per pixel.
1818
1819 Displays using at least 15 bits per pixel are typically TrueColor visu‐
1820 als, which do not have this problem, since their colormap is permanent‐
1821 ly allocated and available to all applications. (The visual class is
1822 also displayed by xwininfo.) For more information on visual classes
1823 see the documentation for the X Window System.
1824
1825 To alleviate this problem, therefore, one may (a) run with more bits
1826 per pixel (this may require adding more video memory or replacing the
1827 video card), (b) shut down other applications that may be using much of
1828 the colormap and then restart xdvi, or (c) run xdvi with the -install
1829 option.
1830
1831 One application which is often the cause of this problem is Netscape.
1832 In this case there are two more alternatives to remedying the situa‐
1833 tion. One can run ``netscape -install'' to cause Netscape to install a
1834 private colormap. This can cause colors to change in bizarre ways when
1835 the mouse is moved to a different window. Or, one can run ``netscape
1836 -ncols 220'' to limit Netscape to a smaller number of colors. A small‐
1837 er number will ensure that other applications have more colors avail‐
1838 able, but will degrade the color quality in the Netscape window.
1839
1840
1842 Xdvi can display Encapsulated PostScript (EPS) files included in the
1843 dvi file. Such files are first searched for in the directory where the
1844 dvi file is, and then using normal Kpathsea rules. There is an excep‐
1845 tion to this, however: if the file name begins with a backtick (`),
1846 then the remaining characters in the file name give a shell command
1847 (often zcat) which is executed; its standard output is then sent to be
1848 interpreted as PostScript. Since the execution of arbitrary shell com‐
1849 mands with the user's permissions is a huge security risk, evaluation
1850 of these backtick commands is disabled by default. It needs to be acti‐
1851 vated via the -allowshell command-line option. NOTE: You should never
1852 use this option when viewing documents that you didn't compile your‐
1853 self. The backtick specials are not needed for uncompressing gzipped
1854 Postscript files, since xdvi can do that on the fly if the filename
1855 ends with .eps.gz or .eps.Z (and if the first bytes of the file indi‐
1856 cate that the file is indeed compressed). This is both safer and more
1857 flexible than the backtick approach, since the default file searching
1858 rules will apply to such filenames too.
1859
1861 Using T1Lib, a library written by Rainer Menzner (see ftp://sun‐
1862 site.unc.edu/pub/Linux/libs/graphics/), xdvi can render Postscript<tm>
1863 Type1 fonts directly, without the route via TeX pixel (pk) fonts. The
1864 advantage of this is that only one size of each font needs to be stored
1865 on disk. Unless the -not1lib option is used, xdvi will try to render
1866 every font using T1Lib. Only as a fallback it will invoke an external
1867 program (like mktexpk, which in turn may invoke utilities like ps2pk or
1868 gsftopk) to generate a pixel font from the Type1 source. The direct
1869 rendering of the Computer Modern fonts should work out-of-the box,
1870 whereas other Type1 fonts such as the 35 `standard' Postscript<tm>
1871 fonts resident in printers may need to be made accessible for use with
1872 xdvi, unless your system administrator or TeX distribution has already
1873 done so (which is the case e.g. for current teTeX systems). The xdvik
1874 distribution comes with a utility called t1mapper to make these fonts
1875 available for xdvi; see the manual page for t1mapper(1) for usage de‐
1876 tails.
1877
1879 Any of the specials used by xdvi may be preceded by the characters
1880 ``xdvi:''. Doing so does not change the behavior of the special under
1881 xdvi, but it tells other dvi drivers (such as e.g. dvips) to ignore the
1882 special.
1883
1885 Some TeX implementations or macro packages provide the facility to au‐
1886 tomatically include so-called `source specials' into a DVI file. These
1887 contain the line number, eventually a column number, and the filename
1888 of the .tex source. This makes it possible to jump from a .dvi file to
1889 the corresponding place in the .tex source and vice versa (also called
1890 `inverse search' - jumping from the DVI file to the TeX file is also
1891 known as `reverse search', and jumping from the TeX file to the DVI
1892 file as `forward search').
1893
1894 To be usable with xdvi, source specials in the dvi file must have one
1895 of the following formats:
1896
1897 src:line[ ]filename
1898 src:line:col[ ]filename
1899 src:line
1900 src:line:col
1901 src::col
1902
1903 If filename or line are omitted, the most recent values are used. The
1904 first source special on each page must be in one of the first two
1905 forms, since defaults are not inherited across pages.
1906
1907 You will need a TeX implementation that provides an appropriate switch
1908 (e.g. -src) or a macro package (such as srcltx.sty or srctex.sty,
1909 available from CTAN:macros/latex/contrib/supported/srcltx/) to insert
1910 such source specials into the DVI file.
1911
1912 For reverse search, the combination Ctrl-Mouse 1 will make xdvi open an
1913 editor (the value of the -editor command line option) with the file and
1914 the line number of the .tex source. See the description of the -editor
1915 option for more information and example settings.
1916
1917 For forward search, xdvi has a -sourceposition option that makes xdvi
1918 jump to the page in the DVI file corresponding to the given line (or
1919 the closest line having a source special) of the specified file and
1920 highlight the found region. See the description of the -sourceposition
1921 option for more details.
1922
1923 More information on setting up various editors for use with source spe‐
1924 cials can be found at:
1925
1926 http://xdvi.sourceforge.net/inverse-search.html
1927
1928
1930 xdvi accepts specials to set the paper size for the document. These
1931 specials should be of the form
1932
1933 papersize=[*]width,height
1934
1935
1936 where width and height give the width and height of the paper, respec‐
1937 tively. Each of these should appear in the form of a decimal number
1938 followed by any of the two-letter abbreviations for units accepted by
1939 TeX (pt, pc, in, bp, cm, mm, dd, cc, or sp). If an asterisk (*) ap‐
1940 pears just before the width, then the measurements refer to the docu‐
1941 ment dimensions (e.g., pt as opposed to truept). This allows a macro
1942 package to vary the page size according to elements of the document;
1943 e.g.,
1944
1945 \special{xdvi: papersize=*\number\wd\mybox sp,
1946 \number\ht\mybox sp}
1947
1948
1949 Except for the asterisk, this format is compatible with dvips.
1950
1951 The last papersize special on a page determines the size of that page.
1952 If there is no such special on a given page, the most recent papersize
1953 is used, or, if there are no papersize specials on any preceding page,
1954 then the value of the paper resource (or -paper option on the command
1955 line) is used. Thus the paper size may vary for different pages of the
1956 dvi file.
1957
1958 If the paper resource (or -paper command-line option) begins with a
1959 plus sign (`+'), then all papersize specials in the dvi file are ig‐
1960 nored.
1961
1963 The color specials supported by xdvi are the same as those supported by
1964 dvips, except that the literal PostScript color specification (as in
1965 the AggiePattern example in the dvips documentation) is not supported.
1966 There are also some restrictions due to the way xdvi's drawing rou‐
1967 tines are implemented; e.g. the \colorbox and \fcolorbox macros don't
1968 work with xdvi. See the section LIMITATIONS below for more information
1969 on these restrictions. Xdvi supports the same list of named colors as
1970 with dvips, namely:
1971
1972 Apricot, Aquamarine, Bittersweet, Black, Blue, BlueGreen, BlueViolet,
1973 BrickRed, Brown, BurntOrange, CadetBlue, CarnationPink, Cerulean, Corn‐
1974 flowerBlue, Cyan, Dandelion, DarkOrchid, Emerald, ForestGreen, Fuchsia,
1975 Goldenrod, Gray, Green, GreenYellow, JungleGreen, Lavender, LimeGreen,
1976 Magenta, Mahogany, Maroon, Melon, MidnightBlue, Mulberry, NavyBlue,
1977 OliveGreen, Orange, OrangeRed, Orchid, Peach, Periwinkle, PineGreen,
1978 Plum, ProcessBlue, Purple, RawSienna, Red, RedOrange, RedViolet, Rho‐
1979 damine, RoyalBlue, RoyalPurple, RubineRed, Salmon, SeaGreen, Sepia,
1980 SkyBlue, SpringGreen, Tan, TealBlue, Thistle, Turquoise, Violet, Viole‐
1981 tRed, White, WildStrawberry, Yellow, YellowGreen, YellowOrange.
1982
1983 Note that these names are case sensitive.
1984
1985 The documentation of the LaTeX color package provides more details on
1986 how to use such specials with LaTeX; see the dvips documentation for a
1987 detailed description of the syntax and semantics of the color specials.
1988
1990 When xdvi receives a SIGUSR1 signal, it rereads the dvi file.
1991
1993 Xdvik uses the same environment variables and algorithms for searching
1994 for font files as TeX and friends. See the documentation for the
1995 Kpathsea library, kpathsea.dvi, for a detailed description of these.
1996
1997 In addition, xdvik accepts the following variables:
1998
1999 DISPLAY
2000 Specifies which graphics display terminal to use.
2001
2002 KPATHSEA_DEBUG
2003 Trace Kpathsea lookups; set it to -1 (= all bits on) for com‐
2004 plete tracing.
2005
2006 EXTENSIONMAPS
2007 A list of files to be searched for mime types entries (as for
2008 Acrobat Reader). Earlier entries in one of these files override
2009 later ones. If this variable is not set, the following default
2010 path is used:
2011
2012 $HOME/.mime.types:/etc/mime.types:\
2013 /usr/etc/mime.types:/usr/local/etc/mimetypes
2014
2015
2016
2017 MAILCAPS
2018 A list of files to be searched for mailcap entries, as defined
2019 by RFC 1343. See this RFC or the mailcap(4) manual page for a
2020 detailed description of the mailcap file format. Currently, on‐
2021 ly the following mailcap features are supported:
2022
2023 test=command
2024 The entry is only used if command can be executed via the
2025 system() call and if the system() call returns with value
2026 0 (success). The command string may contain the format
2027 string %s, which will be replaced by the file name.
2028
2029 needsterminal
2030 If this flag is used, the command will be executed in a
2031 new xterm window by prepending ``xterm -e '' to the com‐
2032 mand string.
2033
2034 All other fields in the mailcap entry are ignored by xdvi. Ear‐
2035 lier entries in one of these files override later ones. If the
2036 variable is not defined, the following default path is used:
2037
2038 $HOME/.mailcap:/etc/mailcap:/usr/etc/mailcap:\
2039 /usr/local/etc/mailcap
2040
2041 For security reasons, some special characters (i.e.: ( ) ` \ ;)
2042 are escaped in the argument before passing it to system().
2043
2044 BROWSER
2045 Determines the web browser used to open external links (i.e.,
2046 all URLs that don't start with the `file:' scheme and are not
2047 relative links in the local DVI file), and to open links for
2048 which no viewer has been specified in the mailcap files. The
2049 value of this variable is a colon-separated list of commands.
2050 Xdvi will try each of them in sequence until one succeeds (i.e.
2051 doesn't immediately return with status 0). This allows you to
2052 specify your favourite browser at the beginning, and fallback
2053 browsers at the end. Every occurrence of %s in the string is re‐
2054 placed by the target URL; every occurrence of %% is replaced by
2055 a single %. If no %s is present, the URL string is added as an
2056 extra argument.
2057 An example setting is:
2058
2059 netscape -raise -remote 'openURL(%s,new-window)':xterm -e lynx
2060 %s:xterm -e wget %s:lynx %s:wget %s
2061
2062 See
2063
2064 http://www.catb.org/~esr/BROWSER/
2065
2066 for more details on the BROWSER environment variable.
2067
2068 TMPDIR The directory to use for storing temporary files created when
2069 uncompressing PostScript files.
2070
2071 XEDITOR
2072 Determines the editor command used for source special `reverse
2073 search', if neither the -editor command-line option nor the .ed‐
2074 itor resource are specified. See the description of the -ed‐
2075 itor command line option for details on the format.
2076
2077 VISUAL Determines an editor to be opened in an xterm window if neither
2078 of -editor, .editor, or XEDITOR is specified.
2079
2080 EDITOR Determines an editor to be opened in an xterm window if neither
2081 of -editor, .editor, XEDITOR or VISUAL is specified.
2082
2083 WWWBROWSER
2084 Obsolete; use BROWSER instead.
2085
2087 xdvi accepts many but not all types of PostScript specials accepted by
2088 dvips. For example, it accepts most specials generated by epsf and ps‐
2089 fig. It does not, however, support bop-hook or eop-hook, nor does it
2090 allow PostScript commands to affect the rendering of things that are
2091 not PostScript (for example, the ``NEAT'' and rotated ``A'' examples in
2092 the dvips manual). These restrictions are due to the design of xdvi;
2093 in all likelihood they will always remain.
2094
2095 LaTeX2e rotation specials are currently not supported.
2096
2097 MetaPost files containing included text are not supported.
2098
2099 Xdvi's color handling doesn't support the \colorbox and \fcolorbox
2100 macros; this is not likely to change in the near future. This also
2101 means that e.g. colored tables (as created by the colortbl package)
2102 may render incorrectly: Text in colors different from the default fore‐
2103 ground color may not not be displayed. When the page is redrawn (e.g.
2104 after using the magnifier), the background color of the cells may over‐
2105 draw the text.
2106
2108 $HOME/.xdvirc
2109 A file that holds all settings that the user changed via the
2110 keys, the `Options' and the Xaw `Modes' menu and the dialogs, as
2111 X resources. These resources override the settings in
2112 $HOME/.Xdefaults. This file is ignored if the -q option is used
2113 or the noInitFile X resource is set.
2114
2115 xdvi.cfg
2116 A configuration file for the T1 font setup which needs to be
2117 supplied in the directory determined by the XDVIINPUTS environ‐
2118 ment variable. Please see the file http://xdvi.source‐
2119 forge.net/README.t1fonts if that file is missing.
2120
2122 X(1), dvips(1), mktexpk(1), ps2pk(1), gsftopk(1), t1mapper(1), mail‐
2123 cap(4), the Kpathsea documentation, and the Xdvik home page at
2124 http://xdvi.sourceforge.net/.
2125
2127 Eric Cooper, CMU, did a version for direct output to a QVSS. Modified
2128 for X by Bob Scheifler, MIT Laboratory for Computer Science. Modified
2129 for X11 by Mark Eichin, MIT SIPB. Additional enhancements by many oth‐
2130 ers.
2131
2132 The current maintainer of the original xdvi is Paul Vojta, U.C. Berke‐
2133 ley.
2134
2135 Code for the xdvik variant has been contributed by many people, whose
2136 names are scattered across the source files. Xdvik is hosted on
2137 CTAN:dviware/xdvik and on SourceForge; for the most up-to-date informa‐
2138 tion, please visit:
2139
2140 http://xdvi.sourceforge.net
2141
2142 Please report all bugs to the SourceForge bug tracker:
2143
2144 http://sourceforge.net/tracker/?func=add&group_id=23164&atid=377580
2145
2146Xdvik 22.84.10 2005/04/28 XDVI(1)