Previous Up Next

5 Using the Active-DVI presenter

5.1 Launching Active-DVI

Active-DVI is invoked with the following command syntax

advi [options] dvifile [dvifile]

Once Active-DVI is launched, just press ? to get help on the keys you can use to control the presenter (type ^f (Control-F) to get full screen, < or > to change the magnification of the text).

When two file names are provided Active-DVI displays them both: see section ‍5.12 for details on the use of a secondary DVI file.

5.2 Command line options

The advi commands recognized the following options:

Help and info options

-vPrints the advi current version and exits
--versionPrints the full advi current version and exits
-helpShort command line options help

Window and display specifications

-geometry geomGeometry of Active-DVI’s window specification

Geometry geom is specified in pixels, using the standard format for X-Window geometry specifications (i.e: WIDTHxHEIGHT[+XOFFSET+YOFFSET]).

-fullwidthAdjust the size of the window to the width of the screen
-nomarginsCancel horizontal and vertical margins
-hmargin dimenHorizontal margin specification (default: 1cm)
-vmargin dimenVertical margin specification (default: 1cm)

Dimensions are specified as numbers optionally followed by two letters representing units. When no units are given, dimensions are treated as numbers of pixels. Currently supported units are the standard TeX units as specified in the TeX book (D. Knuth, Addison-Wesley, (C) 1986): ‘pt’ (point), ‘pc’ (pica), ‘in’ (inch), ‘bp’ (big point), ‘cm’ (centimeter), ‘mm’ (millimeter), ‘dd’ (didot point), ‘cc’ (cicero) and ‘sp’ (scaled point). Note that dimensions are specified w.r.t the original TeX document, and do not correspond to what is actually shown on the screen, which can be displayed at a different resolution than specified in the original TeX source.

-cropCrop the window to the best size (default)
-nocropDisable cropping

Color specifications

-fgcolor <color>Specify the color of the foreground color
-bgcolor <color>Specify the color of the background color
-rvSpecify that reverse video should be simulated by exchanging
 the background and foreground colors
-gamma <float>Specify gamma correction (>0.0) of glyphs

Helpers specification

-pagerSpecify the name of the pager to launch on a txt link
-browserSpecify the name of the browser to a html link

Debugging options

--debugGeneral debug option
--debug_pagesDebug page motion
--show_psPrint a copy of Postscript sent to gs to stdout
--verbose_image_accessChange the cursor while loading images

Rendering options

-AToggle Postscript anti-aliasing
-passiveInhibit effects that are visible when redrawing the page
 (Transitions, delays, embedded applications)

Safety options

-execSet safety policy to “always execute embedded applications”
-askSet safety policy to “ask user before execution of embedded applications”
-saferSet safety policy to “never execute embedded applications”

Option files option

-option-file <filename>Load filename as a file containing a list of options
 as given on the command line to advi.

Miscelleanous options

-autoswitchSet the autoswitch flag, which allows implicit switch to master
 on usr1 signal (default is off).

5.3 Cut and paste

Text can be copied from the Active-DVI previewer to another application. However, this uses the XBuffer and not the XSelection mechanism.

Moreover, Shift left-click dump an ASCII representation of the region under the mouse pointer in the source file. This expects the DVI to have been instrumented with line numbers of the form

line:line⟩ ⟨ file

where ⟨ line⟩ and ⟨ file⟩ are the current source line and current source file.

The position is exported in ASCII, in the form

#line before⟩, ⟨ after<<prefix>><<suffix>>file

where ⟨ before⟩ and ⟨ after⟩ are the enclosing line numbers, ⟨ prefix⟩⟨ suffix⟩ the word constituent surrounding the mouse position, and file is the name of the current file.

Line numbers default to 0 when not found. Note that line numbers may be inconsistent if there \special-line commands have not been inserted close enough to the position.

5.4 Hyper-text references

Active-DVI supports the LATEX hyperref package with both internal and cross-file references. For cross-file references, it launches a new advi process to view the target.

Active-DVI improves the treatment of hyper-refs over conventional previewers, by emphasizing the hyper-target text of an hyper-link. Thus, an hyper-target definition:


should make the activation of the link ⟨ text⟩ not only move to the page where ⟨ tag⟩ occurs, but also emphasize the destination target ⟨ tag⟩. However, since \hypertarget does include its second argument within the target, we use the following command instead:


  {\special{html:<a name=\hyper@quote#1\hyper@quote>}#2%

(If you are viewing this document with Active-DVI, you may move over this area or click on this one to see the effect.)

Similarly, to define a link target we use:

  {\special{html:<a href=\hyper@quote\hyper@sharp#1\hyper@quote>}#2%

5.5 Floating table of contents and thumbnails

There are two ways to include a floating table of contents while previewing.

By default, the binding T processes thumbnails and the binding t displays thumbnails if already processed, or shows the table of contents if available. Otherwise pressing t has no action. Thumbnails computation is explicit, so that incidentally hitting the t key does not lead to an unexpected computation, hence an unexpected delay.

5.6 Moving around

See the key bindings in the appendix.

5.7 Scratching on slides

During the show you can annotate your slides, entering the scratching mode. There are two modes, one for writing characters (the writing mode, entered by pressing s during the show) and the other to draw lines or figures on the slides (the drawing mode, entered by pressing S). In each of this modes, you can enter the scratch setting mode to set various properties of the scratching process. See the relevant key bindings for writing mode and drawing mode in the appendix.

5.8 Using the laser pointer

If you press ^X-l (Control-X then l) the laser pointer appears on the slide; the pointer sticks to the mouse pointer and allows easy pointing to parts of the presentation. The laser pointer size and color can be set on the command line (options -laser-pointer-color and laser-pointer-size).

5.9 Saving slides

You can save a snapshot of the current slide at any time by pressing ^X-^S (Control-X then Control-S). An image file is written (by default a png file). The name of the file produced can be set via the command line (see advi -help for details) or directly from within the LATEX source file with commands \advisavepageimage and \advisavepageimagefile{filename}).

5.10 Creating events from the LATEX source file

Active-DVI provides the command \advipushkeys that provides key presses to the presenter as if you had pressed it when viewing the presentation. For instance:


ends the talk immediately.

Note that control keys must be encoded inside key strings passed to Active-DVI: we use the Emacs textual convention. For instance, the character “Control-A” (ASCII 1) is denoted by the two charcters ^X (i.e. a carret character immediately followed by an X). Hence, the command


switches to full screen mode.

5.11 Using and making special effects

Presentation examples can be found in the examples directory. Don’t miss to play them! Then, feel free to read their source code and copy the effects they provide.

Active-DVI can be used as is, but will shine when driven by a user with a bias towards programming: special effects can easily be realized by using the LATEX packages provided with the distribution.

Creative advanced users may program the presenter at various levels, either using or defining simple LATEX macros, writing new LATEX package files, or by implementing extensions to the previewer itself.

5.12 Viewing multiple files simultaneously

Active-DVI can be invoked with several DVI files (currently only two). The first file is always used as the master file and others are client files. The user can switch between files explicitly (see key bindings) or implicitly. There is an implicit switch from the master to the client file c when an hyperlink that is not found in the master file can be found in the client file c; there is also a switch from the client c to the master when using the history stack and the previous event on the stack was an implicit switch from the master to the client c.

If autoswitch flag is set, there is also an implicit switch to the master, whenever Active-DVI receives signal usr1 (to mean immediate refresh).

Previous Up Next