These pages are no longer maintained. See my new webpage
Brian P. Gerkey

Home
CV
Publications
Research
Player/Stage
Tools/Resources
Photo gallery
Adbusting

pdfLaTeX presentation How-To

by brian gerkey
Translations:

What is this?

This document describes one method for making PowerPoint-style presentations with PDFs created by pdfLaTeX, with the help of some other nifty free software packages.

I assume that you are already familiar with LaTeX, and I'll just go over the basics of how I make PDF presentations. For more information on the topic of non-PowerPoint presentation methods in general, see:

Why is this?

There are many advantages to making presentations with pdfLaTeX instead of PowerPoint, including:

  • You don't need PowerPoint, Windows, or any other non-free software in order to create or view your presentation. You'll probably end up using Acrobat's closed-source acroread to view your presentation since it currently renders better than open-source PDF viewers, but at least it's free.

  • You can write your talk in normal LaTeX, using tables, math mode, citations, cross-references, and all the other nifty things that make LaTeX great.

  • You can use your editor of choice to write your presentation, instead of being forced to use PowerPoint's WYSIAYG (what you see is all you've got) "editor".

  • In the end your presentation is a PDF, which can be viewed by anyone on just about any computing platform, and it looks the same everywhere. No more problems with your presentation being formatted differently because you wrote it with Office2000 in WindowsXP and presented it with Office1066 in WindowsLX-sedan.

  • You can archive and otherwise manage your presentations just as you would your papers and other LaTeX documents. For me, this means that I can keep my presentations in CVS, as described here.

Packages to be used

You'll need the following packages in order to create presentations:
  • LaTeX (you've already got that installed)
  • pdfLaTeX (you've probably already got that installed)
  • FoilTeX (you'll probably have to install that; look here)
  • some standard LaTeX packages that you probably already have installed, including hyperref, color, and geometry

Overview

The necessary steps:
  • Write the talk as a LaTeX document.
  • Run pdflatex on your LaTeX document to create a PDF.

Writing the presentation

Most of the work is done by the foils document class, which is provided by FoilTeX. You should consult the FoilTeX manual for details on how to use the foils class, and I won't replicate that information here. However, I will address some common questions and provide examples to get you on your way.

Examples

Since all of these tools are fully documented in their respective manuals, the most useful thing will probably be example code, so here are some:

Previewing your presentation

When you write a normal LaTeX document, you usually use xdvi to preview the result. Since pdfLaTeX directly creates a PDF, you can't use xdvi, but you still need to periodically (probabaly frequently) look at the typeset version of your presentation as you're writing it. Unfortunately, acroread doesn't work very well for these purposes, because it doesn't properly reload documents. Instead, I use xpdf, which renders poorly, but reloads well (Alt-R).

Setting the page geometry

To setup the document for landscape display and to maximize usage of screen real estate, I always use the geometry package:

  \usepackage[pdftex]{geometry}
  \geometry{headsep=2.0em,hscale=0.80}


UPDATE: Bryan Lepore gives this example of how to modify margins to get more out of a page.

Hyperlinking and fullscreen display

Although it's not strictly necessary, you'll probably want to use the hyperref package, since it allows hyperlinking and gives you control over some display options for your presentation.

See the hyperref manual for details on using the package. I usually include something like the following in my preamble:

  \usepackage{hyperref}
  \hypersetup{
    pdftitle={Simple Talk},
    pdfauthor={Brian P. Gerkey, USC Robotics Research Lab},
    pdfpagemode={FullScreen},
    pdfborder={0 0 0}
  }

These arguments to hypersetup set some document meta-data, configure acroread to automatically go to fullscreen mode when the document is opened, and disable the border that is normally placed around hyperlinks in the document (I find them distracting).

Colors

Although black-on-white is a great color scheme for technical papers, it's a little bland for presentations. Luckily you can easily add colors to your document with the color package:

  \usepackage[pdftex]{color}
A variety of standard colors (e.g., red, white) are predefined, and you can define new ones with the \definecolor command:
  \definecolor{myred}{rgb}{0.6,0,0}
  \definecolor{myblue}{rgb}{0,0.2,0.4}
You can set the default text color with the \color command:
  \color{myblue}
You can change the color of a block of text with the \textcolor command:
  {\textcolor{myred} Hello World}

Including graphics

You can include graphics in pretty much the same way as you normally do in LaTeX, with an important difference: pdfLaTeX does not support the inclusion of postscript (.ps) or encapsulated postscript (.eps) files. As far as i know, the only supported graphics formats are:

  • JPEG (.jpg)
  • PDF (.pdf)
  • PNG (.png) thanks to Hannes Böhm for pointing this out
This is not so bad, since it is very easy to convert pretty much anything into a PDF. Depending on what format your graphics are in now, you can use ghostscript or the convert tool of ImageMagick to do the conversion. To convert encapsulated postscript, I recommend the nifty script epstopdf, which tickles ghostscript just right to produce good quality PDFs.

As a corollary, you cannot use the epsf or epsfig packages; instead use graphics or graphicsx.

Including movies


UPDATE: According to Geert Jan van Oldenborgh, it is possible to include movies in a PDF, by the following black magic:

  \href{movie:ssts.avi#/ShowControls true /Mode /Open}%
  {\begin{pspicture}(9,8)SST movie\end{pspicture}}
combined with the even blacker magic in the this file. There are some portability issues, so that not all movies play on all platforms, so the technique below may still be useful.


As far as I know, you cannot include movies or animations in PDFs. However, with a couple of tricks, you can make it seem like you have done so. Here's the way that I do it:

  • Create a graphic still (probably JPEG) of the first frame of the movie and insert in the talk as a placeholder.
  • Using the \href command from the hyperref package, make that graphic a hyperlink, pointing to the URL of the movie file (presumably on the harddrive).
  • Configure acroread to pass off URLs to the right web browser.
  • Configure the web browser to spawn the appropriate player for the movie.
Having done all this, when you click on the graphic still, acroread passes the URL for the movie to your browser, which spawns a player to display it. Here's an example of the LaTeX code:
  \begin{center}
  \fbox{\href{file:///mnt/win/users/gerkey/videos/fail_push_hi.avi}{
  \includegraphics[height=100mm]{fail_push_hi}}}
  \end{center}

See the next section for some extra tips about movies.

Finessing the display

To make the presentation super-smooth, I've also done the following things:
  • Configure my window manager to:
    • display acroread without a title bar
    • display my movie player (xanim) without a title bar
    • place acroread at position +0+0
  • Configure my browser (netscape) to:
    • place my movie player in the middle of the screen
    • redirect any movie-player console output to /dev/null in order to prevent the browser from popping up a dialog.
The exact string that I've told netscape to use when spawning my movie player is:
/usr/bin/X11/xanim +q +Ss2 -Zr -geometry +192+175 %s >/dev/null 2>/dev/null


Last updated $Date: 2004/12/08 16:16:39 $