Go to the first, previous, next, last section, table of contents.


xdvipresent

xdvipresent provides glue for developing slides for on-line presentation using LaTeX and xdvi, and a (portable) computer with a sxga+ (1400x1050), sxga (1280x1024), xga (1024x768), svga (800x600), vga (640x480), or sun (1152x900) screen running Xwindows.The idea is that you prepare the slides in LaTeX with the enclosed style file(s) and you use the " xdvipresent" script (which simply calls xdvi with an appropriate set of options) to show the slides on the screen. The package also provides tips on preparing presentations with xdvi, for starting xdvipresent from emacs, etc.

Installation

Installation using (g)make

Note: Depending on your system setup you may need to be root to complete one or more of the steps above.

Manual installation

If you find problems with the procedure above, you can perform the installation as follows:

Note: Depending on your system you may need to be root to complete one or more of the steps above.

Preparing the slides

Use the file example.tex as a template. Observe how the front matter, slide boundaries, headers and footers, etc. are set up. Essentially:

Displaying slides on the screen

Once installation is completed, you are ready to test the package. To test viewing on, for example, an svga screen:

This should start an xdvi window containing the slides. The xdvi window should cover the whole screen, and should have no controls or sliders, i.e., only the slides should appear, and covering the whole screen. If this is not the case, this is probably due to your window manager settings. Right "out of the box" xdvipresent works very well for example with fvwm or with the lightweight wondow managers that come with modern gnome desktops. If you use fvwm then simply add the line:

Style xdvi Notitle

to your .fvwmrc file to ensure that the xdvi window started by xdvipresent does not have a title bar (which would take up precious display space). Otherwise, things should work right away, unless you have set unusually wide borders for the windows. If you use other window managers then you may want to fine tune some things (see later for explanations on how to do this).

Printing the slides

To print the slides, uncomment the appropriate line in the example.tex file (e.g., the one containing [a4paper]), run LaTeX again to generate the appropriate .dvi file, and print normally, using a command such as:

dvips -P <printer> example.dvi

Yo can use:

dvips -f < example.dvi > example.ps

to generate a postscript file. Also, you can produce pdf output by coverting the ps file with, e.g., ps2pdf.

Selecting printing options, such as "[a4paper]", produces output in which the slides have a border. Note that this border looks good on paper but would only take up precious screen space duing a presentation.

More details on what it does and why and some usage tips

You may ask, why use xdvi and not, e.g., ghostscript/ ghostview? I prefer xdvi for a number of reasons. First, xdvi is soemwhat faster and seems to do somewhat better dithering of the fonts on the screen, which means that the text is more readable (although more recent versions of ghostview do a much better job). Also, xdvi can be started with no borders or buttons, which is more difficult to do with, e.g., ghostview. Also, with xdvi it is very easy and quick to move forwards and backwards with the keyboard during the presentation. The big drawback is that xdvi does not show (at least at the time time of writing this) text in color, such as that generated when using the colordvi package. Another alternative is to use html (perhaps generated with latex2html, in order to be able to have nice math notation) and a browser, but I find that it is very difficult to produce consistent results with this approach.

You may also consider using more sophisticated tools like prosper. This is a tool developed after xdvipresent and is an improvement in many ways. It provides very nice styles but on the other hand it almost requires that you generate pdf every time you want to see the slides, which results in a slower development cycle. I tend to use xdvipresent most of the time and prosper in some special cases, when addressing audiences used to animated slides with transitions, etc.

Given the considerations above, and assuming that you buy the idea that xdvi is the way to go, there are two main problems that this package solves:

Automating xdvi startup from emacs/AucTeX

If you are using AucTeX and emacs, then by putting some additional lines in the tex-site.el file it is possible to make emacs automatically invoke xdvipresent with the right parameters when doing C-c C-c View or C-c C-c Print. The selection will be based automatically on the presentation option (vga, svga, xga, sun, svga, svga+, a4paper, letterpaper, ...) that you are using in the documentclass line in the latex file. Note that if you change this you will have to delete the buffer and open the file again for emacs to notice the changes. Also note that, if another, commented out documentclass line appears in the file before the one being used, then the commented one may be one seen by emacs instead. Thus, it is best to keep the active documentclass line the first one in the file.

These are examples of the entries that you may want to add to the tex-site.el file:

(defvar TeX-view-style '(
    ;; xdvipresent entries
    ("^sxga\+" "xdvipresent sxga+ %d")
    ("^sxga$" "xdvipresent sxga %d")
    ("^sun$" "xdvipresent sun %d")
    ("^xga$" "xdvipresent xga %d")
    ("^svga$" "xdvipresent svga %d")
    ("^vga$" "xdvipresent vga %d")
    ("^a4paper$" "xdvipresent a4paper %d")
    ("^letterpaper$" "xdvipresent letterpaper %d")
    ;;
    ("^landscape$" "xdvi %d -paper a4r -s 4")
    ("^a5$" "xdvi %d -paper a5")
    ("." "xdvi %d -s 7 -hushspecials -hl green -bd red -cr blue
         -expert -paper a4 -geometry -0+0")
    )

(Note that if you are indeed an emacs/AucTex user you could also simply copy the xdvi commands with the right parameters from the xdvipresent script into this file and not use the xdvipresent script at all!)

In a portable, and running a window manager that supports several work surfaces, such as fvwm, it is convenient to start the xdvi in an adjacent work surface. These are examples:

(defvar TeX-view-style '(
    ;; xdvipresent entries
    ("^sxga\+" "xdvipresent sxga+ %d -geometry 1390x1040+0+1050")
    ("^sxga$" "xdvipresent sxga %d -geometry 1270x1014+0+1024")
    ("^sun$" "xdvipresent sun %d -geometry 1142x890+0+900")
    ("^xga$" "xdvipresent xga %d -geometry 1014x758+0+768")
    ("^svga$" "xdvipresent svga %d -geometry 790x590+0+1024")
    ("^vga$" "xdvipresent vga %d -geometry 630x470+0+800")
    ("^a4paper$" "xdvipresent a4paper %d")
    ("^letterpaper$" "xdvipresent letterpaper %d")
    ;;
    ("^landscape$" "xdvi %d -paper a4r -s 4")
    ("^a5$" "xdvi %d -paper a5")
    ("." "xdvi %d -s 7 -hushspecials -hl green -bd red -cr blue
          -expert -paper a4 -geometry -0+0")
    )

In your .emacs file you should put something like:

  ;; Auc-TeX
  (setq load-path (cons "....../auctex-9.6" load-path))
  (load "tex-site")
  (setq-default TeX-parse-self t) ;; Forces parsing of options in file!


Go to the first, previous, next, last section, table of contents.