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.
The advi commands recognized the following options:
-v | Prints the advi current version and exits |
--version | Prints the full advi current version and exits |
-help | Short command line options help |
-geometry geom | Geometry 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]
).
-fullwidth | Adjust the size of the window to the width of the screen |
-nomargins | Cancel horizontal and vertical margins |
-hmargin dimen | Horizontal margin specification (default: 1cm) |
-vmargin dimen | Vertical 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.
-crop | Crop the window to the best size (default) |
-nocrop | Disable cropping |
-fgcolor <color> | Specify the color of the foreground color |
-bgcolor <color> | Specify the color of the background color |
-rv | Specify that reverse video should be simulated by exchanging |
the background and foreground colors | |
-gamma <float> | Specify gamma correction (>0.0) of glyphs |
-pager | Specify the name of the pager to launch on a txt link |
-browser | Specify the name of the browser to a html link |
--debug | General debug option |
--debug_pages | Debug page motion |
--show_ps | Print a copy of Postscript sent to gs to stdout |
--verbose_image_access | Change the cursor while loading images |
-A | Toggle Postscript anti-aliasing |
-passive | Inhibit effects that are visible when redrawing the page |
(Transitions, delays, embedded applications) |
-exec | Set safety policy to “always execute embedded applications” |
-ask | Set safety policy to “ask user before execution of embedded applications” |
-safer | Set safety policy to “never execute embedded applications” |
-option-file <filename> | Load filename as a file containing a list of options |
as given on the command line to advi. |
-autoswitch | Set the autoswitch flag, which allows implicit switch to master |
on usr1 signal (default is off). |
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.
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:
\edef\hyper@quote{\string"} \edef\hyper@sharp{\string#} \newcommand{\softtarget}[2]% {\special{html:<a name=\hyper@quote#1\hyper@quote>}#2% \special{html:</a>}}
(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:
\newcommand{\softlink}[2]% {\special{html:<a href=\hyper@quote\hyper@sharp#1\hyper@quote>}#2% \special{html:</a>}}
There are two ways to include a floating table of contents while previewing.
t
. The first stroke on t
shows the first page
of the table of contents. Successive stokes will show the following
pages. (As usual, prefix integer argument may be used to directly
access a specific page of the table of contents.)The package advi described below redefines the macro \tableofcontents so that it automatically inserts the reserved hyper-targets markers around the table of contents. It also provides two new macros, \advitoc and \endadvitoc, that serve to insert these markers when the table of contents is hand-made.
Normally, thumbnails are drawn for all the pages. However, thumbnail pages can also be defined manually, with an hyper-target whose anchor is of the form /page.⟨ suffix⟩. In this case, all the desired thumbnails must be explicitly marked.
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.
See the key bindings in the appendix.
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.
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).
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}
).
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:
\advipushkeys{"q"}
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
\advipushkeys{"^X^F"}
switches to full screen mode.
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.
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).