Active-DVI FAQ

# Active-DVI: Frequently asked questions

## Version @@VERSION@@

Is there a Win 32 version ?
  Answer: Unfortunately, there is no native Win 32 version. However, you can also use Cygwin and build advi from sources after proper configuration with the special configuration command `configure_Cygwin`.
  Additional answer: you can also use the DemoLinux CD-ROM that includes a version of Active-DVI: if you can reboot the Windows machine, boot it from the CD-ROM and launch advi. After the presentation, just reboot the machine: DemoLinux does not write files on the hard disk, hence the machine is left unmodified.
How to get a full-screen presentation ?
  Answer: Just launch Active-DVI and type `^F` (control-F) in the Active-DVI window.
How to revert from full-screen to normal size ?
  Answer: Just type `^F` (control-F) again in the Active-DVI window!
How to center the slide when full-screen mode is active ?
  Answer: Just use the mouse to move the bounding box of the slide: pressing control key and the left button draws the bounding box, then if you continue pressing the key and button you can drag the bounding box where you want to.
How to get online help for Active-DVI keys ?
  Answer: Just press `?` in the Active-DVI window.
How to get examples of talks ?
  Answer: Look in the distribution, sub-directory `examples`. The sub-directories are `basics` (from simple to moderately advanced style effects), `slitex` with simple and easy to use templates (four presentations), `prosper` (two presentations in directories `LL`, and `Join`), `seminar` (two examples). You may also consider the sub-directory `test` of the source main directory and look at the various `*.tex` files. Just type`make` in any of those sub-directories to build the corresponding DVI presentations.
How to ensure safety, since unknown applications can be launched from the DVI file that I am previewing ?
  Answer: Active-DVI's default behavior is not to automatically launch embedded applications: when a presentation attempts to launch an application, the presentation is stopped and a dialog box appears to tell you the name of the application and ask you for confirmation before launching.
How do I know in advance the set of applications that a DVI file can launch ?
  Answer: Just launch Active-DVI with the `-n` option. `advi -n file.dvi` will analyze the file `file.dvi` and print out the list of embedded commands it contains.
How to print my slides for real on paper or slides for a retro-projector ?
  Answer: Easy. Just use the `ignore` option of the `advi.sty` package, it is especially devoted to that task! Write `usepackage[ignore]{advi}` in the header of the document, then use LaTeX to recompile your source file: the Active-DVI package will suppress the effects that cannot be rendered and render the effects that it knows how to emulate via postscript.
  Additional answer: Impossible. How could you ever believe that somebody or something could render on a mere sheet of paper all those text dancing movements and those fancy, fascinating, and creative effects that your presentation features ? No hope: you really need Active-DVI to play your talk!
  Additional2 (preventive) answer: The additional answer which immediately precedes this one is a joke; in fact, the truth is: we worked hard such that the `ignore` option of `advi.sty` does a good job; however, it is clear that the Active-DVI style can just do its best to perform a task that cannot be done perfectly.
How do I write on my slide during the presentation ?
  Answer: Just type `s` to write text and `S` to draw lines.
How to write on my slides some programs that have colored parts ?
  Answer: Just use the environment `alltt`; then colors (and other text annotations and typographic indications) are available within a type-writer font setting. For instance:

      \begin{alltt}
      {\it{(* Remark that double semi-colon is mandatory here. *)}}
      let x = 1\textcolor{red}{;;}
      let r = \{foo = 1; bar = "toto"\};;
      \textcolor[named]{Red}{let} z = r.foo;;
      \end{alltt}

  Renders (much better than the following :)

      (* Remark that double semi-colon is mandatory here. *)
      let x = 1;;
      let r = {foo = 1; bar = "toto"};;
      let z = r.foo;;

How to write on my slides programs which have mathematical formulas in them ?
  Answer: If you need mathematical formulas into your programs, use the environment `alltt` and insert the formulas into fancy parens `\(` and `\)`.
Some part (or every) material on my slides is invisible when using `advi` (whereas everything goes well with `xdvi`). What happens ?
  Answer: You should be using some virtual fonts and Active-DVI does not natively handle those; you must preprocess the DVI file to expand virtual fonts using the command dvicopy. For instance:

              dvicopy foo.dvi foo.advi && advi foo.advi

  usually works fine.
How to visualize Adobe PostScript fonts like `ptmr8t` using Active-DVI ?
  Answer: You have to preprocess the file with the command dvicopy which expands virtual fonts. For instance:

              dvicopy foo.dvi foo.advi && advi foo.advi

  usually works fine.
  Additional answer: Active-DVI can display only PK based fonts whose sources are provided in `.mf` files. Adobe fonts having no `.mf` source files, hence METAFONT cannot create the corresponding `.pk` files for Active-DVI.
  The workaround is to use an equivalent of the problematic font in the Computer-Modern font set, that has been designed by Donald Knuth to be the default fonts for TeX.
How to solve the margin problems of Active-DVI (margins are wrong with `advi` while `xdvi` works perfect) ?
  Answer: `xdvi` and `advi` do not use the same margins. `Advi` uses the specification that TeX emits into the DVI file (bounding box) and does not add extra space for margins. Unfortunately, many LaTeX styles and packages do not give a relevant value to the bounding box.
  The workaround is to modify margins, either by moving the bounding-box around with the mouse (Control+button), or to use the relevant option on the command line when launching `advi` (the `-vmargin` and `-hmargin` options).
How to display the target of an HTML anchor in an already running browser ?
  Answer: to render hyper links that are HTML pages, you must properly set up the `-browser` option of `advi`, or explicitly call the browser you want with the proper option in an `adviembed` command. You could use for instance:

      netscape -remote 'openURL(http://www.acm.org)'

  To insert such a command into an `adviembed` command, a little trickery is necessary, since `'` characters are interpreted by LaTeX. To prevent this behavior, you can write for instance:

      {\catcode `\' 12 \catcode `\: 12, \catcode `\' 12
        \adviembed {netscape -remote 'openURL(http://www.acm.org)'}
      }

  For `mozilla`, you must also use the option `mozilla -remote`. Similarly to the previous question, this option supposes that a mozilla browser is already up and running. If you want to have a command that works in any case, even if no mozilla is launched, you could use a shell script like:

      #!/bin/bash

      # Here you write the path corresponding to your mozilla binary command,
      # for instance
      #MOZILLA=/usr/local/mozilla/mozilla
      MOZILLA=`which mozilla`

      case $# in
       1)
         if \$MOZILLA -remote "ping()" 2>/dev/null
         then
           \$MOZILLA -remote "openURL($1,new-window)" || \
           \$MOZILLA "$@"
         else
           \$MOZILLA "$@"
         fi;;
       *)
         \$MOZILLA "$@";;
      esac

  (Instead of the `new-window` behavior specification, you can use `new-tab` or nothing, as you wish.)
How to avoid spurious messages from `advi` related to `dvips` ?
  I got for instance

      dvips: Unknown keyword (proc) in \special will be ignored
      dvips: Unknown keyword (koyaa) in \special will be ignored
      dvips: Unknown keyword (record) in \special will be ignored
      dvips: Unknown keyword (start) in \special will be ignored
      dvips: Couldn't find figure file advi:; continuing
      dvips: Unknown keyword (embed) in \special will be ignored
      dvips: Unknown keyword (name) in \special will be ignored
      dvips: Unknown keyword ("xmms") in \special will be ignored

  Answer: As written in the messages, those errors are not reported by `advi` by issued by `dvips` that cannot understand the `\special` instructions that the `advi.sty` LaTeX style inserts into the DVI file. This behavior is normal and properly specified by the DVI format: interpreters of DVI files are required to ignore the `\special` instructions they do not understand. However, nothing prevents interpreters from emitting a warning when facing an unknown instruction.