Making Presentations with LaTeX and Prosper

If you write a lot of technical documents,especially those containing formulas you've probably used LaTeX. LaTeX is basically a set of macros written using TeX. TeX, in turn, is a powerful typesetting system first developed by Donald Knuth. It has become an important tool for people who prefer to look at a document as series of logical units, leaving the actual presentation or layout to the software. LaTeX was developed by Leslie Lamport to aid in the writing of classes of documents such as journal articles, book chapters and even letters. Essentially LaTeX abstracts many of the nitty gritty details of TeX such as margin widths, line offsets etc, allowing the user to simply decide on a document class and leave the style and format to the macros.

Numerous people have written macro packages that can be used with LaTeX. These packages provide an enormous range of functionalities, ranging from formatting of citations to drawing Feynman diagrams. These packages together with features such as automatic index generation and bibliographies (using the BibTeX package) of LaTeX, provides the technical writer with an extremely powerful tool to create beautiful documents, concentrating on the logical flow, rather than having to worry about the underlying details of formatting and layout.

However, documents are not the only the things that need to be written. Many a time, a presentation must be made. Under Linux, tools such as KPresent and MagicPoint exist and of course Windows users have MS PowerPoint. These are the traditional GUI tools. However, when one has to make a presentation containing formulas, these tools seem a little clunky and you're stuck with whatever the package provides. Furthermore, if your documents are written using LaTeX, it would be nice if we could use those documents to generate slides for a presentation.

TeX and LaTeX being the all powerful peices of software they are, this is indeed possible. However, the problem with making presentations in LaTeX is the large number of packagaes available to do so. I've listed a few of the packages available, but there are quite a few more which I have'nt mentioned.

In this article I'll be discussing the Prosper package in some detail. You can find a good review of presentation tools for both PDF & HTML formats here.

Prosper

All LaTeX documents have a common basic structure. The first line always defines the document type - article, letter, chapter or in this case slides. After that comes the preamble. In the case of Prosper, this is where you specify the title slide. The next section is the document proper. When using Prosper this is where you define the contents of successive slides. I'll cover the individual sections of a document written with Prosper in detail but the first step is to install the package.

Installation:

As I mentioned above the Prosper package provides a set of macros which define functional elements of a presentation - the slides, how slides should transition etc. The package can be downloaded from prosper.sourceforge.net. To use the package you will require the seminar, pstricks and hyperref packages (which comes with the standard TeX distribution on RedHat). To generate the final output you'll also need dvips, GhostScript and ps2pdf. After downloading the tarball, extract it into a directory. To make use of the package and associated style files you can place the required files (prosper.cls, the style file that your are using and any associated graphics images, such as for bullets) into the directory that contains your LaTeX document. However a neater method is to put the Prosper directory into your TEXINPUTS environment variable:

            ~: export TEXINPUTS=~/src/tex/Prosper:$TEXINPUTS
        

where ~/src/tex/Prosper is the directory into which I extracted the Prosper files. That completes your installation.

The prosper Document Class

To make a presentation using the Prosper package you need to specify it in your \documentclass (alternatively you can also specify it in a \usepackage command in the preamble). Thus the first line in the LaTeX file should be of the form

            \documentclass[ OPTIONS ]{prosper}
        

There are several options that can be specified to the package. You can read about all the options in detail in the documentation that comes along with Prosper. I'll just give a brief overview of some of common and useful options: There are also options to specify slide background colors, slide numbers etc. In general, unless you require black and white slides (say for printing purposes) you won't need to set any color options in the \documentclass -the style files will manage them for you.

The Preamble

The next section in your document is the preamble (ie the part between \documentclass & \begin{document}). In this section you specify the contents of the title page of the slide as well as some options (such as logo's and slide caption) that can be applied to all the slides. The normal LaTeX macros have been redefined to generate the title and associated text with proper font sizes etc. Some of the macros available for designing the title slide include Since the hyperref package is included by Prosper, you can use the \href command to include mailto: links or direct hyperlinks to web pages in the above commands (and of course the rest of your document). As in standard LaTeX the title slide is generated by the \maketitle command in the document body.

The slide Environment

The Prosper package defines the slide environment. This represents the basic unit of a presentation - a single slide and is placed in the document body (ie after the \begin{document} command). Within a slide environment all the usual LaTeX commands may be used. Images, formulas, tables, footnote commands, page structure commands etc can all be used within a slide environment. The Prosper package does redfine the itemize environment so that the text is no longer justified. In addition it supplies images for the bullets. Thus a single slide containing a bulleted list can be represented by the following LaTeX source.Alongside you can see what the final PDF output for this slide would look like.
\begin{slide}{The Title of the Slide}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{slide}
                    

The environment does not provide any means to divide the slide area into colums or rows - it simply provides a rectangular display area (the dimensions of which may vary from style to style). However, using the minipage environment its very easy to make a two column slide. For example, the following slide would make a 2 column slide, with a picture in one column and a bulleted list on the other. Alongside is the PDF representation of the LaTeX source.
\begin{slide}{Another Example Slide}
\begin{minipage}{4cm}
\epsfig{file=./picture.eps}
\end{minpage}  
\begin{minipage}{7cm}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{minipage}     
\end{slide}
                    
Prosper also defines some commands which are allowed to appear in a slide environment. Examples include In general the above macros are not usually used when writing a presentation. They are however, useful when you create slide styles of your own.

Page Transitions

An important command is \PDFtransition, which can be used to specify how the current slide should appear. However, the usual way to specify a slide transition for a specific slide is to put the transition mode into the \begin{slide} command as
            \begin{slide}[Glitter]{Slide Title}
        
The Prosper package support several types of transitions: The above transition modes provide you with ample opportunity to make flashy presentations - if thats what you're into :) You can see a PDF which displays each of the transition mentioned above here.

Overlays

A very useful feature of computer based presentations is the ability to make overlay slides - that is, parts of the same slide will appear at different times. Prosper provides commands to implement this in a very simple fashion. The \overlay command is used to specify that a given \slide environment will consist of a sequence of overlays. You must specify the number of overlays that make up the slide. Furthermore, there are several commands that can be used to specify exactly what material should appear on which slide within an overlay. These commands are There are also three more macros analogous to the above (obtained by capitalizing the first letter) which causes all material after the occurence of the macro to be included (rather than specifically defining material). The macros in the above list also have starred counterparts (ie \fromSlide* etc). These versions are useful when the succesive overlays need to replace previuous overlays. Below I've provided an example of a slide that consists of several overlays and uses the itemstep environment to allow an itemized list to progress through succesive overlays. Along side is an animation of what the PDF version of the slide would look like:
\overlays{5}{
\begin{slide}{The Effects of Power}
\begin{tabular}{rc}
\begin{minipage}{4cm}
\onlySlide*{1}{\epsfig{file=stage1.eps}}
\onlySlide*{2}{\epsfig{file=./stage2.eps}}
\onlySlide*{3}{\epsfig{file=./stage3.eps}}
\onlySlide*{4}{\epsfig{file=./stage4.eps}}
\onlySlide*{5}{\epsfig{file=./stage5.eps}}
\end{minipage} &
\begin{minipage}{6cm}
\begin{itemstep}
\item Alignment
\item Deformation
\item Coulomb explosion
\item X-ray emission
\item Nuclear reaction
\end{itemstep}
\end{minipage}
\end{tabular}
\end{slide}}
An important point to note about the overlay commands is that they are only valid when the Prosper package is used with the pdf option. However the package does provide a set of macros which allow you to include different material depending on whether the LaTeX document is compiled in PS or PDF mode. An example of the use of these macros would be
\overlays{3}{
\begin{slide}{An Example Slide}
\onlySlide*{1}{\epsfig=./pic1.eps}
\onlySlide*{2}{\epsfig=./pic2.eps}
\onlySlide*{3}{\epsfig=./pic3.eps}
\onlyInPS{\epsfig=./epspic.eps}
\end{slide}}
    
In the case that the snippet was converted to a PDF we would get a slide which would successively display pic1.eps, pic2.eps and pic3.eps. However if the snippet was compiled to PS format then the slide would only contain the image epspic.eps.

Presentation Styles

The Prosper package comes with several style files. Essentially these provide predefined background colors and patterns, title fonts bullet styles etc. Thus you can easily change the look of your presentation by including a different style file. Which style to use is specified in the \documentclass. Below you can see a slide generated using the different slide styles.


Default

Alienglow

Autumn

Azure

Blends

Contemporain

Dark Blue

Frames

Lignes Bleues

Nuance trois
It should be noted that all the styles do not provide the same display area for the actual slide material. You can see this in some of the slide examples above. So, if you decide to change the slide style of your presentation, you might need to tweak things such as spacing (\hspace, \vspace etc) or line lengths etc. Furthermore, if a given style does not really suit your taste, it is possible to make modifications such as font type, colors etc using the Prosper macros, rather than digging into the source of the style in question.

Assuming you're comfortable with the pstricks package designing a new slide is made easier with a number of macros defined by Prosper. You have access to a number of boolean macros which allows you to include features depending on the current environment (PDF or PS, color or black & white etc). The main macro that Prosper provides to design a new style is \NewSlideStyle command. After designing the style, you need to tell Prosper the details such as how much display area you are providing, where it should be located etc using this macro.

Processing the LaTeX File

At this point you should be able to write up your presentation. The last step is to convert the LaTeX source to a PDF file. The steps involved are pretty simple
  1. latex file.tex
  2. dvips -Ppdf -G0 file.dvi -o file.ps
  3. ps2pdf -dPDFsettings=/prepress -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode file.ps file.pdf
Some points to note:

Miscelaneous Features

Conclusion

After reading this I hope I've been able to convey some of the features and benefits that the Prosper package provides. Granted, for a person who does'nt use LaTeX, a GUI alternative would be easier. But for all the TeXnicians out there, the Prosper package allows one to generate well designed and stylish slides efficiently, at the same time allowing the knowledgable user to extend the package using predefined macros as well as pure TeX.

The Prosper community has a very useful mailing list which can be accessed at the Prosper website. In addition the Prosper tarball contains comprehensive documentation explaining the available commands nd macros provided by the package. The tarball also contains a document displaying the capabilities of the package. The LaTeX source of these documents are the best way to learn how to use the various features of Prosper.

I for one have finally been able to get rid of MS Powerpoint and use Prosper to develop all my presentations. Using this package I'm able to create presentations rivaling those produced by more popular GUI packages, which can be viewed with the very common Acrobat Reader (and converted to clean HTML when required!). You can take a look at presentations I've made using prosper on my website

For all the LaTeX users I strongly recommend taking a look at Prosper.



© Rajarshi Guha , State College, November 2002