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.
STYDIR in Makefile to a place where LaTeX can find style files.
BINDIR in Makefile to a place where executables can be found.
gmake install.
doc directory contains this manual in several formats (postscript, emacs info, manl, ...). You should probably install them in a public area.
Note: Depending on your system setup you may need to be root to complete one or more of the steps above.
If you find problems with the procedure above, you can perform the installation as follows:
images directory (.ps files to make the slides more appealing) to a place where LaTeX can find them.
*.cls,*.sty) to a place where LaTeX can find it (otherwise, put the whole path when using it).
xdvipresent to a place that is in your executable (bin) search path.
texhash (this depends a bit on your LaTeX installation) so that LaTeX can find the new styles and files.
doc directory contains this manual in several formats (postscript, emacs info, manl, ...). You should probably install them in a public area.
Note: Depending on your system you may need to be root to complete one or more of the steps above.
Use the file example.tex as a template. Observe how the front matter, slide boundaries, headers and footers, etc. are set up. Essentially:
xdvislides as the document class, using the type of display on which you will present. For example, use
\documentclass[svga]{xdvislides}
if you plan to view the slides on an SVGA screen, and
\documentclass[a4paper]{xdvislides}
if you plan to print them on A4 paper. There is also a special option, htmlslides, which is intended for generating an HTML version of the slides using latex2html. The idea is that simpler macros are used which do not confuse latex2html.
example.tex.
\itemize), because the style typesets them in color.
\subsection{...}. This has the advantage that latex2html creates a new HTML page for each slide.
\fontfamily{phv} \selectfont just after \begin{document}, as in the example.tex file.
Once installation is completed, you are ready to test the package. To test viewing on, for example, an svga screen:
example.tex and comment in and out the right lines at the beginning of example.tex as appropriate for producing svga-sized output.
emacs editor, also move the uncommented line to the top (this is so that AucTeX can see the format that you have chosen --See section Automating xdvi startup from emacs/AucTeX).
example.tex.
xdvipresent svga example.dvi
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).
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.
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:
xdvi unfortunately does not understand color commands included in the LaTeX source (e.g., by using \package{colordvi}). However, embedded postscript figures are rendered in color. This is used in the style definition to include some color in the presentation: a blue line between the slide title and the body, colored buttons as item bullets, and a red line to separate the footer. This is done in the *.cls/*.sty style files. When printing on a B/W printer this is all really superfluous and a different style, which uses no color, is used. For printing on a color printer the slides prepared for on-line presentation can be used.
xdvi to produce output in such a way that it fits exactly on the screen of a portable. This is solved by:
xdvislides.cls (and the older xdvi_slide.sty) format. See example.tex for a typical use. Note that some lines in the LaTeX file have to be commented out and others in depending on whether the file should be formatted for a vga screen, an svga screen, an xga screen, a printer, etc.
xdvi start with the right parameters, by using the xdvipresent script instead of calling xdvi directly. The idea is to make the image fit exactly in the screen and avoid the presence of side bars, buttons, etc. The script takes at least two arguments. The first argument must be vga, svga, a4paper, etc., depending on the display to be used (entries such as a4paper mean view the slides as they will be printed). The second argument must be the .dvi file name (including the suffix). Any other arguments are passed directly to xdvi. Here are some possibilities:
fvwm (this may need adjustment for other window managers). It is also assumed that the xdvi window does not have a title bar (which would take up precious display space). In order to ensure this in fvwm, add the line
Style xdvi Notitle
to your .fvwmrc (similar commands should be available in other window managers). If your setting is different from that assumed, you may have to tweak these values a bit.
In fvwm and other window managers that support several working spaces it is sometimes useful to display the slides in another "page" of the display. This can be done by adding offsets (which will be applied >from the page in which the xdvi is started). E.g., -geometry 790x590+0+1024 will start the xdvi in the screen below the current one in a standard X86Free 1280x1024 virtual display.
-display <machine_name>:0.0).
xdvi documentation for more details on options).
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.