Miller PDF
Miller PDF
Miller PDF
Abstract
In this paper, we present HA-prosper, a LATEX package for creating overhead
slides. We describe the features of the package and give examples of their
use. We also discuss what advantages there are to producing slides with LATEX
versus the presentation software typically bundled with todays office suites.
Introduction
Creating attractive overhead presentations has long been the domain of proprietary software packages such as Harvard Graphics and Microsoft PowerPoint.
Though this trend has been changing in recent years with the advent of free1 presentation programs such as OpenOffice.org Impress and and KPresenter, from a
LATEX users point of view these packages still have a number of shortcomings
which make them inadequate or inappropriate for many purposes. Though presentation packages for LATEX have been available since 1993, it was not until relatively recently that these packages have matured to the point where a novice user
1 Free here is used in the sense of the user being allowed to run, copy, distribute, study, change,
could use them to produce layouts matching those of their proprietary counterparts.
In this article we introduce HA-prosper2 , one such LATEX package for producing
overheard slides.3 Among its many features are overlays, animated slide transitions, an automatically generated table of contents, split slides, hidden author
annotations, and internal and external hyperlinks. It can output to PDF for online
viewing or to portrait- or landscape-orientation PostScript for printed transparencies. As with any LATEX class, the layout parameters are near-infinitely configurable, but helpfully a number of prefabricated styles and templates are available.
This article assumes that you have a basic familiarity with editing and compiling LATEX documents. It also assumes that you either have the requisite packages
for HA-prosper (see Appendix A) already installed on your system, or know how
to fetch them from CTAN4 and install them yourself.
The motivation for using a text-based document processor to produce slides may
not be readily apparent to those who normally use WYSIWYG presentation software. However, there are a number of important benefits to using LATEX for presentations, even for those who do not normally use it for writing papers. Many of
these benefits are typical of LATEX in general and will be already familiar to critics
of the word processor paradigm (see e. g., [2, 1]). However, for completenesss sake
we review them here briefly.
Portability. Most LATEX slide packages, including HA-prosper, are designed to produce PostScript or PDF files. These formats are standard in the computing industry
and viewers for them are widely available for all common platforms. This means,
for example, that its easy to start writing a presentation on your office Unix machine and then take it home to finish and preview on your MS-Windows PC. More
2 HA-prosper
importantly, having a PDF version of your presentation means that there is no need
to arrange for your venue to have PowerPoint, StarOffice, or other uncommon or
expensive software; nor do you need to bring along your own laptop with custom
software. Most computers nowadays have some sort of PDF viewer installed, but
even if not, there are several zero-cost viewers available. In most cases, you can
simply copy your PDF presentation to a floppy, CD, or USB keydrive, slip it in your
pocket, and head to your presentation venue.
Ease of collaboration. Because LATEX files are plain text, it is easy for multiple
authors to collaborate to write a presentation, even if not all of them have LATEX.
Furthermore, keeping track of versions is easy and storage-efficient using, for example, CVS. Even without sophisticated versioning software, changes from colleagues can be merged in using standard text processing tools such as diff and
patch. Compare this to the situation with most presentation software, which use
non-human-readable binary file formats and may not have built-in support for
collaboration and versioning.
Free licence and community support. HA-prosper and its attendant programs
(LATEX, Ghostscript, etc.) are free software, not just in the sense that you can legally
obtain copies without paying for them, but also in that you are free to run, copy,
distribute, study, change, and improve them for any purpose. If HA-prosper doesnt
work exactly the way you want, you can examine and adjust the code yourself, or
hire a knowledgeable programmer to do it for you. Furthermore, LATEX and its
packages have an extensive support network through public mailing lists, user
groups, publications, Usenet newsgroups, and private consulting firms.
Content before style. An inherent problem with the WYSIWYG paradigm used
by most presentation software is that it conflates the tasks of composition (fixing
ones ideas into words in a logically and semantically structured document) and
typesetting (determining the superficial physical appearance of a document via, for
example, colour and font settings). LATEX, however, encourages writers to concentrate on content rather than style. Unlike with WYSIWYG editors, which do not
always distinguish between semantic and physical markup, the physical appearance of an HA-prosper presentation is trivial to change even after the document has
been written.
3
Reuse LATEX code. Those who already use TEX or LATEX to write their papers can
leverage their existing knowledge rather than learn a whole new program for making slides. And for conference presentations based on existing papers, using LATEX
to produce the slides can save you a lot of time. For example, its much easier to
copy and paste complex equations, figures, and tables from the source document
than it is to tediously re-key them in a GUI editor. The same goes for incorporating
citations and a list of references from your papers B IBTEX bibliography.
HA-prosper syntax
3.1 Overview
The basic structure of the source code for an HA-prosper presentation is illustrated
in Figure 1. (Mandatory items are printed in boldface, and items modifiable by
the author are printed in italics.) Anyone familiar with LATEX will immediately
note that its not much different than any of the standard document classes. The
only thing new is the slide environments, which, as you might guess, define the
contents of individual slides.
[options]
!
[options]
"#$
%
Title of presentation
&
Name of author
'
!%(
\maketitle
'
!%(
%
[options] Slide title
Material for the slide
%
Figure 1: The basic structure of an HA-prosper document
Use the named layout template. This can be one of the ten templates included in the HA-prosper distribution, or one of your own
devising. See Appendix B for a gallery of the prepackaged styles.
This option creates a table of contents and displays it on each slide,
typically as a sidebar. The table of contents is hyperlinked, making
it easy to jump around your presentation with the click of a mouse.
5
With this option, the current slide is always highlighted on the table
of contents. Useful for letting your audience keep track of where
you are in your presentation.
%
This option specifies that the current section in the table of contents
is to be highlighted.
This option tells HA-prosper to create slides with landscape orientation. Since monitor resolutions are typically wider than they are
tall, this is the default behaviour.
To override landscape mode, use this option. Only certain slide
styles support portrait orientation.
HA-prosper allows you to embed authors notes in your document.
They are normally hidden, but specifying the notes option includes
them in the output.
Use this option to output notes only; no slides. This is useful for
making printed notes to accompany a computer presentation.
3.2.3 Footers
HA-prosper allows you to define left and right footers which appear on every slide.
This is accomplished with the \HAPsetup command, which takes a list of commaseparated variablevalue pairs as arguments. The variables controlling the left
and right footers are lf and rf, respectively. Thus to put a copyright notice in the
left footer and the current date in the right footer, you might use something like
the following:
\HAPsetup{
lf={\copyright 2005 Gnu Enterprises},
rf={\today}
}
Another useful variable is sn. It controls the formatting of the page numbers,
which are placed to the right of the right footer. The default value of sn is
{-~p.~\thepage\ifallPages/\totalpages\fi}
6
where \thepage prints the current slide number, \totalpages prints the total number of slides, and \ifallPages. . . \fi is a conditional branch which is skipped
when the nototal document class option is used.
3.2.4 Title and author
Just as with the standard document classes, the title and author of your slide presentation are specified with the \title and \author commands, respectively. HAprosper also allows you to specify a subtitle to your presentation with the \subtitle
command. More than one author can be specified by separating them with the
\and command inside the argument to \author. Also within the \author command you can specify an \institution and \email for each author. For example:
\title{Nursing Homes and the Modern Ungulate}
\subtitle{A Guide for Geriatric Gnus}
\author{
Will de Beest\\
\institution{Catoblepas Assisted Living}\\
\email{will@catoblepas.za}
\and
Sally Springbok\\
\institution{Cervid Retirement Castle}\\
\email{springbok@cervidrc.bw}
}
The output of \maketitle with the above example is illustrated in Figure 2.
3.3 The
environment
Now that the basics of your layout have been established, you can start producing
your slides. Generally speaking, all you need to do is enclose the material for each
slide in its own slide environment, the only mandatory argument to which is the
slides title. Almost any sort of text or LATEX environment, including figures, can
appear inside a slide. Figure 3 shows a sample slide environment along with its
output.
Sally Springbok
will@catoblepas.za
springbok@cervidrc.bw
- p. 1/1
Example
\begin{slide}{Example}
This is a simple slide.
\begin{itemize}
\item It contains a bulleted list.
\item And math: $x^2 + y^2 = z^2$
\item And a graphic:
\includegraphics[width=4cm]{GNU}
\end{itemize}
\end{slide}
And math: x2 + y 2 = z 2
And a graphic:
- p. 1/1
Early retirement
Pros:
Cons:
less income
shuffleboard
boredom
- p. 1/1
3.5 Overlays
Overlays are created by wrapping a slide environment in the \overlays command, and then using the \onSlide command to specify which material appears
5 The
\dualslide command also takes three optional arguments which can use PSTricks commands to further modify the appearance of the two columns and the divider between them. We
dont use them here, but theyre explained in further detail in the HA-prosper and PSTricks documentation.
on which overlay. \onSlide takes two mandatory arguments: the first is a commadelimited list of overlay numbers or ranges (in the form x -y , x -, or -x ), and the
second is the content to be placed on those overlays. This is best illustrated with
an example:
\overlays{3}{%
\begin{slide}{A list}
Gnu\\
\onSlide{2}{Gnat\\}
\onSlide{1,3}{Gnome\\}
\onSlide{2-}{Gnits\\}
\end{slide}
}
This code defines a slide with three overlays.6 The slide title, A list, plus the text
Gnu appear on all three overlays. The text Gnat appears only on the second
overlay, its place being occupied by a blank line on the first and third overlays. The
line Gnome appears on the first and third overlays, but is blank on the second.
Finally, the line Gnits is displayed on the second and third slides, but not on the
first. (The output is shown in Figure 5.)
A list
A list
A list
Gnu
Gnu
Gnat
Gnu
Gnome
Gnome
Gnits
Gnits
- p. 1/1
- p. 1/1
- p. 1/1
properly, the slide consists of a basic invariant background plus two overlays, but to
simplify things we refer to the background as the first overlay.
10
\overlays{3}{%
\begin{slide}{An animation}
The incredible shrinking gnu:\\
\onSlide*{1}{\includegraphics[width=6cm]{GNU}}
\onSlide*{2}{\includegraphics[width=4cm]{GNU}}
\onSlide*{3}{\includegraphics[width=2cm]{GNU}}
\end{slide}
}
An animation
An animation
An animation
- p. 1/1
- p. 1/1
- p. 1/1
A list
A list
Gnu
Gnu
Gnu
Gnat
Gnat
Gnat
Gnome
Gnome
Gnome
- p. 1/1
- p. 1/1
- p. 1/1
12
title
This command simply indicates that the next slide marks the beginning of a new section in the table of contents. No separate title
slide is created.
%
title
To start a new section in the table of contents and create a title card,
use this command.
3.7 Notes
As briefly mentioned earlier, HA-prosper provides a mechanism to embed notes in
your presentation. These notes are normally suppressed from the output, though
using the package options in 3.2.2 you can print out the notes separately and refer
to them when giving your talk.
To create notes for a given slide, simply start a notes environment after said
slide. Like the slide environment, notes requires a title as an argument:
\begin{note}{Notes for the first slide}
Remember to grunt greetings to the herd.
\end{note}
(Note that HA-prosper is not designed to work with pdflatex; the PostScript file
generated by latex + dvips must be converted to PDF using Ghostscript (ps2pdf)
or Adobe Distiller.) It bears mentioning that HA-prosper is designed to produce
slides for US letter paper (8.511) only. If you have configured dvips to produce
A4 or other-size output by default, you will need to use the -t letter commandline option.
per Emacs convention, the notation M-x means to use the meta modifier key with xi. e.,
hold down your META or ALT key while pressing x, or hit ESC and then x.
14
4.2 Troubleshooting
A problem sometimes encountered with HA-prosper is that ligatures such as fi and
ff are not typeset correctly. This is actually due to a bug with how Ghostscript
(i. e., ps2pdf) up to and including version 7.21 produces level 1.2 PDF files. To
avoid the problem, you can either upgrade to a newer version of Ghostscript, or
force Ghostscript to generate level 1.3 output by invoking it as ps2pdf13.
15
4.3 Conclusion
In this article we have endeavoured to give the reader a general idea of the capabilities of LATEX for producing high-quality presentation slides. However, the
techniques presented in this article, while certainly enough to generate attractive
and structured presentations, are actually only a subset of HA-prospers full features. The package offers many more commands and configuration options to
control your slides appearance and navigation capabilities. For example, there
are advanced features for creating hidden sections, PDF bookmarks, bibliography slides, and embedded sound files. All these and more are outlined in more
detail in the official HA-prosper documentation.
Installing HA-prosper
HA-prosper is bundled with the MiKTEX and TEX Live distributions, so users of
those systems likely already have it installed or can install it from their source media. For most other distributions, including teTEX, it must be installed manually.
This entails downloading the latest version of the package from CTAN or directly
from the authors home page. HA-prosper also depends on a number of other packages, though most of them are fairly standard and will probably be already present
on any reasonably recent system. However, a few of them, most likely xkeyval and
prosper, may require manual installation. The list below indicates the most important packages and other tools you require, the minimum version number (if any),
and where they can be found.
HA-prosper 4.21
CTAN directory: macros/latex/contrib/ha-prosper/
http://stuwww.uvt.nl/~hendri/Downloads/haprosper.html
prosper 1.58
CTAN directory: macros/latex/contrib/prosper/
8 At
the time of this writing, the prosper package distributed on the official prosper website,
http://prosper.sourceforge.net/, is the obsolete version 1.1. This version is incompatible with
HA-prosper.
16
xkeyval
CTAN directory: macros/latex/contrib/xkeyval/
http://stuwww.uvt.nl/~hendri/Downloads/xkeyval.html
For teTEX users with operating systems that support RPM, the present author
has made available RPMs for each of the above three packages at http://www.
nothingisreal.com/tetex.
Slide styles
The screenshots in this section are reproduced from the HA-prosper documentation.
17
18
Acknowledgments
A GNU head from Figures 3 and 6 is probably originally by Etienne Suvasa. The version
used in this article is by Aurelio A. Heckert and is reproduced under the terms of the Free
Art license (http://artlibre.org/).
19
References
[1] Allin Cottrell. Word processors: Stupid and inefficient. Available at http://ricardo.
ecn.wfu.edu/~cottrell/wp.html, June 1999.
[2] Conrad Taylor. What has WYSIWYG done to us? The Seybold Report on Publishing
Systems, 26(2):312, September 1996.
[3] Michael Wiedmann. Screen presentation tools: Tools for creating screen or online presentations. Available at http://www.miwie.org/presentations/, January 2005.
20