The beamer Class: a L
A
T
E
X Presentation System
Clifford E. Weil
1
1
Department of Mathematics
Michigan State University
East Lansing, MI USA
June 16, 2010
Clifford E. Weil The beamer Class
Outline
1
Preamble Items
2
Basics of Frames and Slides
\pause
\only
\onslide
Buttons
Movies and Animations
3
Additional Comments
Frames and Themes
Clifford E. Weil The beamer Class
The beamer Document Class
The beamer class was written by Till Tantau beginning in 2003.
A beamer file begins with \documentclass[options]{beamer}.
Some Options:
t, b, c (default) preferred is t
handout Sets options to be suitable for handouts
draft
10pt, 11pt(default), 12pt, and additional sizes but they
require the extsize package
To eliminate the navigation bar, issue the command
\setbeamertemplate{navigation symbols}{}.
Clifford E. Weil The beamer Class
Options for Automatically Loaded Packages
Beamer automatically loads the amsmath, amsthm, array,
enumerate, hyperref, xcolor packages and perhaps others.
The user may load additional packages but with caution. Load
them only as needed! Options for the automatically loaded
packages are entered as options for the \documentclass
command. For example to load the table option for the xcolor
package, type \documentclass[xcolor=table]{beamer}.
Clifford E. Weil The beamer Class
Other Preamble Items
These items are needed to create a title page.
\title[short title]{title}. The short title is used
elsewhere.
\subtitle{subtitle}
\author[short name(s)]{author 1 name\inst{1} \and
author 2 name\inst{2}}.
\institute{\inst{1}author 1 address
\and\inst{2}author 2 address}.
\date{desired date}.
If no date is entered, the current date is automatically entered.
If no date is wanted, type \date{}.
Clifford E. Weil The beamer Class
A Simple Preamble with One Author
\documentclass[t]{beamer}
\title[The \texttt{beamer} Class]
{The \texttt{beamer} Class: a \LaTeX\ Presentation System}
\author[Clifford E. Weil]{Clifford E. Weil\inst{1}}
\institute{\inst{1} Department of Mathematics\\
Michigan State University\\
East Lansing, MI USA}
\date{June 16, 2010}
\begin{document}
Clifford E. Weil The beamer Class
A Simple Preamble with Two Authors
\title[The \texttt{beamer} Class]
{The \texttt{beamer} Class: a \LaTeX\ Presentation System}
\author[C. E. Weil and L. Larson]{Clifford E. Weil\inst{1}
\and Lee Larson\inst{2}}
\institute{\inst{1}Department of Mathematics\\
Michigan State University\\
East Lansing, MI USA\\
\inst{2}Department of Mathematics\\
University of Louisville\\
Louisville, KY}
\date{June 16, 2010}
\begin{document}
Clifford E. Weil The beamer Class
Some beamer Terminology
1
frame: an environment
2
slide: the output of a frame environment
3
overlay specifications: determine how many slides from one
frame environment
4
themes: different formats for slides
Clifford E. Weil The beamer Class
The frame Environment
The material to be covered in a beamer presentation is
contained in “frames”. Frames are environments that contain
text and standard L
A
T
E
X structures; text, commands and
environments. Care must be taken not to put too much
material into a single frame. \begin{frame}<overlay
specifications>[options]{Frame Title} begins a frame. Options:
allowframebreaks
allowdisplaybreaks
b, t, c (default)
fragile (=singleslide)
label=hname for framei
plain
squeeze
shrink (=minimum
shrinkage percent)
\end{frame} ends the frame.
Clifford E. Weil The beamer Class
Title Page
With the information in the arguments of
\title, \author, \institute, and \date the title page is
created by typing
\begin{frame}{}
\titlepage
\end{frame}
Clifford E. Weil The beamer Class
The beamer Class: a L
A
T
E
X Presentation System
Clifford E. Weil
1
1
Department of Mathematics
Michigan State University
East Lansing, MI USA
June 16, 2010
Clifford E. Weil The beamer Class
The Table of Contents
The divisions listed in the table of contents are the same as
those for the article class. The user must insert \section
commands etc. outside of frames for them to be recognized and
listed in the table of contents. To creates the table of contents
type \begin{frame}{Name of table of contents; e.g., Outline}
\tableofcontents
\end{frame}
To present the table of contents one section at a time, type
\tableofcontents[pausesections].
Clifford E. Weil The beamer Class
Outline
1
Preamble Items
2
Basics of Frames and Slides
\pause
\only
\onslide
Buttons
Movies and Animations
3
Additional Comments
Frames and Themes
Clifford E. Weil The beamer Class
Special beamer Commands
\alert{Text to stress}. For example this is an alert.
\againframe{Frame name}. With the option label=Title
Page for that frame, type \againframe{Title Page} and
the Title Page will appear again as above.
\begin{columns} and \column[pos]{width}.
For example in the next slide the two columns were produced
by
\begin{columns}
\column[t]{.5\textwidth}
\begin{itemize}
\item allowframebreaks
\item allowdisplaybreaks
\item \texttt{b, t, c} (default)
\item fragile
\end{itemize}
\column[t]{.5\textwidth}
\begin{itemize}
\item label=$\langle$
\textit{name for frame}$\rangle$
\item plain
\item squeeze
\end{itemize}
\end{columns}
Clifford E. Weil The beamer Class
Slides
While the material to be presented is contained in frames, the
output; that is, what’s in the compiled file and what’s seen on
the screen, is contained in slides. Slides are composed of all or
part of what’s in the frame. There are several ways to
determine what parts of a frame appear in any one slide and
how many slides will be constructed from one frame.
Clifford E. Weil The beamer Class
The \pause Command
The easiest method for creating multiple slides from one frame
is with the \pause command.
\begin{itemize}
\item Item for all slides\pause
\item Item for slides 2 & 3\pause
\item Item for slide 3 only
\end{itemize}
Item for all slides
Item for slides 2 & 3
Item for slide 3 only
The \pause command and similar ones to follow don’t work
inside of the amsmath environments.
Clifford E. Weil The beamer Class
The \pause Command
The easiest method for creating multiple slides from one frame
is with the \pause command.
\begin{itemize}
\item Item for all slides\pause
\item Item for slides 2 & 3\pause
\item Item for slide 3 only
\end{itemize}
Item for all slides
Item for slides 2 & 3
Item for slide 3 only
The \pause command and similar ones to follow don’t work
inside of the amsmath environments.
Clifford E. Weil The beamer Class
The \pause Command
The easiest method for creating multiple slides from one frame
is with the \pause command.
\begin{itemize}
\item Item for all slides\pause
\item Item for slides 2 & 3\pause
\item Item for slide 3 only
\end{itemize}
Item for all slides
Item for slides 2 & 3
Item for slide 3 only
The \pause command and similar ones to follow don’t work
inside of the amsmath environments.
Clifford E. Weil The beamer Class
First Encounter with overlay specifications
The \alert command can be used to emphasize one of the
items on each slide using overlay specifications.
\begin{itemize}
\item<alert@1,3> Item for all
slides\pause
\item<alert@2> Item for slides
2 & 3\pause
\item<alert@3> Item for slide 3 only
\end{itemize}
Item for all slides
Item for slides 2 & 3
Item for slide 3 only
Clifford E. Weil The beamer Class
First Encounter with overlay specifications
The \alert command can be used to emphasize one of the
items on each slide using overlay specifications.
\begin{itemize}
\item<alert@1,3> Item for all
slides\pause
\item<alert@2> Item for slides
2 & 3\pause
\item<alert@3> Item for slide 3 only
\end{itemize}
Item for all slides
Item for slides 2 & 3
Item for slide 3 only
Clifford E. Weil The beamer Class
First Encounter with overlay specifications
The \alert command can be used to emphasize one of the
items on each slide using overlay specifications.
\begin{itemize}
\item<alert@1,3> Item for all
slides\pause
\item<alert@2> Item for slides
2 & 3\pause
\item<alert@3> Item for slide 3 only
\end{itemize}
Item for all slides
Item for slides 2 & 3
Item for slide 3 only
Clifford E. Weil The beamer Class
The \only Command
\only<overlay specifications>{content} is used to specify on
which slides specific content will appear.
This text will be on all slides.
\only<2,4>{This text, on slides
2 \& 4.}
\only<1,3->{This text, on slides
1, 3 and all subsequent slides.}
\only<3>{This text, on slide
3 only.}
And this text will be
on all slides.
(Slide 1)
This text will be on all
slides. This text, on
slides 1, 3 and all
subsequent slides. And
this text will be on all
slides.
Clifford E. Weil The beamer Class
The \only Command
\only<overlay specifications>{content} is used to specify on
which slides specific content will appear.
This text will be on all slides.
\only<2,4>{This text, on slides
2 \& 4.}
\only<1,3->{This text, on slides
1, 3 and all subsequent slides.}
\only<3>{This text, on slide
3 only.}
And this text will be
on all slides.
(Slide 2)
This text will be on all
slides. This text, on
slides 2 & 4. And this
text will be on all slides.
Clifford E. Weil The beamer Class
The \only Command
\only<overlay specifications>{content} is used to specify on
which slides specific content will appear.
This text will be on all slides.
\only<2,4>{This text, on slides
2 \& 4.}
\only<1,3->{This text, on slides
1, 3 and all subsequent slides.}
\only<3>{This text, on slide
3 only.}
And this text will be
on all slides.
(Slide 3)
This text will be on all
slides. This text, on
slides 1, 3 and all
subsequent slides. This
text, on slide 3 only. And
this text will be on all
slides.
Clifford E. Weil The beamer Class
The \only Command
\only<overlay specifications>{content} is used to specify on
which slides specific content will appear.
This text will be on all slides.
\only<2,4>{This text, on slides
2 \& 4.}
\only<1,3->{This text, on slides
1, 3 and all subsequent slides.}
\only<3>{This text, on slide
3 only.}
And this text will be
on all slides.
(Slide 4)
This text will be on all
slides. This text, on
slides 2 & 4. This text,
on slides 1, 3 and all
subsequent slides. And
this text will be on all
slides.
Clifford E. Weil The beamer Class
The \onslide Command
The effect of the \only command is as if all material not
selected for a slide by \only were removed from the frame. The
\onslide command has the same syntax as the \only
command but the effect is as if the material not selected for the
slide was simply covered up. Here’s the previous frame with
\only replaced by \onslide.
Clifford E. Weil The beamer Class
An \onslide Example
This text will be on all slides.
\onslide<2,4>{This text, on
slides 2 \& 4.}
\onslide<1,3->{This text, on
slides 1, 3 and all subsequent
slides.}
\onslide<3>{This text, on
slide 3 only.}
And this text will be
on all slides.
(Slide 1)
This text will be on all
slides.
This text, on
slides 2 & 4.
This text,
on slides 1, 3 and all
subsequent slides.
This
text, on slide 3 only.
And
this text will be on all
slides.
Clifford E. Weil The beamer Class
The \only Command
\only<overlay specifications>{content} is used to specify on
which slides specific content will appear.
This text will be on all slides.
\only<2,4>{This text, on slides
2 \& 4.}
\only<1,3->{This text, on slides
1, 3 and all subsequent slides.}
\only<3>{This text, on slide
3 only.}
And this text will be
on all slides.
(Slide 1)
This text will be on all
slides. This text, on
slides 1, 3 and all
subsequent slides. And
this text will be on all
slides.
Clifford E. Weil The beamer Class
An \onslide Example
This text will be on all slides.
\onslide<2,4>{This text, on
slides 2 \& 4.}
\onslide<1,3->{This text, on
slides 1, 3 and all subsequent
slides.}
\onslide<3>{This text, on
slide 3 only.}
And this text will be
on all slides.
(Slide 2)
This text will be on all
slides. This text, on
slides 2 & 4.
This text,
on slides 1, 3 and all
subsequent slides.
This
text, on slide 3 only.
And
this text will be on all
slides.
Clifford E. Weil The beamer Class
An \onslide Example
This text will be on all slides.
\onslide<2,4>{This text, on
slides 2 \& 4.}
\onslide<1,3->{This text, on
slides 1, 3 and all subsequent
slides.}
\onslide<3>{This text, on
slide 3 only.}
And this text will be
on all slides.
(Slide 3)
This text will be on all
slides.
This text, on
slides 2 & 4.
This text,
on slides 1, 3 and all
subsequent slides.
This
text, on slide 3 only. And
this text will be on all
slides.
Clifford E. Weil The beamer Class
An \onslide Example
This text will be on all slides.
\onslide<2,4>{This text, on
slides 2 \& 4.}
\onslide<1,3->{This text, on
slides 1, 3 and all subsequent
slides.}
\onslide<3>{This text, on
slide 3 only.}
And this text will be
on all slides.
(Slide 4)
This text will be on all
slides. This text, on
slides 2 & 4. This text,
on slides 1, 3 and all
subsequent slides.
This
text, on slide 3 only.
And
this text will be on all
slides.
Clifford E. Weil The beamer Class
A Second \onslide Example
One great advantage of the \onslide command over the \only
command is that the text that is “covered” can be made
slightly transparent with the command
\setbeamercovered{transparent= % of transparency}. Here
the % is 40.
This text will be on all slides.
This text, on slides 2 & 4.
This text, on slides 1, 3 and all following slides
This text, on slide 3 only.
And this text will be on all slides.
Clifford E. Weil The beamer Class
A Second \onslide Example
One great advantage of the \onslide command over the \only
command is that the text that is “covered” can be made
slightly transparent with the command
\setbeamercovered{transparent= % of transparency}. Here
the % is 40.
This text will be on all slides.
This text, on slides 2 & 4.
This text, on slides 1, 3 and all following slides
This text, on slide 3 only.
And this text will be on all slides.
Clifford E. Weil The beamer Class
A Second \onslide Example
One great advantage of the \onslide command over the \only
command is that the text that is “covered” can be made
slightly transparent with the command
\setbeamercovered{transparent= % of transparency}. Here
the % is 40.
This text will be on all slides.
This text, on slides 2 & 4.
This text, on slides 1, 3 and all following slides
This text, on slide 3 only.
And this text will be on all slides.
Clifford E. Weil The beamer Class
A Second \onslide Example
One great advantage of the \onslide command over the \only
command is that the text that is “covered” can be made
slightly transparent with the command
\setbeamercovered{transparent= % of transparency}. Here
the % is 40.
This text will be on all slides.
This text, on slides 2 & 4.
This text, on slides 1, 3 and all following slides
This text, on slide 3 only.
And this text will be on all slides.
Clifford E. Weil The beamer Class
Hyperlinks and Buttons
The beamer command that will produce a button to jump from
a current slide to a target slide is
\hyperlink{target}{button text}<hoverlay specificationi>.
It goes in the frame that produces the current slide. If that
frame produces more than one slide, the overlay specification
determine on which slide(s) the button appears and the
command must be so placed that it will be included in the fist
slide in the list. There are many different buttons to indicate
the type of jump that will occur when clicking the button, such
as skipping the next slide, skipping all remaining slides
produced from the current frame, or returning to an earlier
slide. The next slides presents the choices for button text.
Clifford E. Weil The beamer Class
Meaning of the button text Argument
The button text refers to the appearance of a button that can
be made into a hyperlink. The choices are:
\beamerbutton{Just a Button};
Just a Button
\beamergotobutton{Go to Button};
Go to Button
\beamerreturnbutton{Return From};
Return From
\beamerskipbutton{Skip to Button};
Skip to Button
How to name and designate the target of the button is next.
Clifford E. Weil The beamer Class
The target
The target identifies the frame that produces the target slide.
Use the label= option to give the target frame a name. If the
frame produces more than one slide, include the number of the
slide in the target. For example, name<2> makes the second
slide produced by the frame, name the target slide. If only one
slide is produced by the frame, the overlay specification may be
omitted.
Clifford E. Weil The beamer Class
A button Example
For example the next button was created by typing
\hyperlink{bibliography}{\beamergotobutton{Go to
Refs}}.
Go to Refs
The \hyperlink command must appear at
the precise point where the button is to appear. Watch what
happens when the button is clicked.
Clifford E. Weil The beamer Class
Animations and Movies
To include a movie or animation in a presentation, first put
\usepackage{multimedia} in the preamble. The command for
including a movie in a slide is
\movie[options]{banner}{movie filename}. As options,
specify the height and width of the box in which the movie
will appear. Other options can be found in [?, page 126]. For
banner text or graphics that can be used to introduce the
movie. Any movie file that can be displayed with QuickTime
should work but the file must be in the same folder as the
source file. Clicking the banner in the slide will run the movie,
but the pdf file must be opened in Acrobat.
Clifford E. Weil The beamer Class
An Example
Typing \movie[height=.6\textheight,width=.8\textheight]
{Destruction}{100_2073.MOV} will play the following movie.
Destruction
Clifford E. Weil The beamer Class
Navigation Bar
Bar Test
1
Slides
2
Frames
3
Subsubsections
4
Subsections
5
Sections
6
Search
Clifford E. Weil The beamer Class
The Structure of a Frame
headline and/or footline
left or right sidebar
navigation bar
logo
background color
content
Clifford E. Weil The beamer Class
Beamer Themes
themes: 26 Loaded with \usetheme{theme name}.
outer themes: 9 Loaded with
\useoutertheme{outer theme name}.
inner themes: 5 Loaded with
\useinnertheme{inner theme name}.
color themes: 15 Loaded with
\usecolortheme{color theme name}.
Suggestions: \usefonttheme{serif} to use the roman font
family. \useinnertheme{rounded} to replace triangles by
bullets in an itemize list.
Clifford E. Weil The beamer Class
Beamer Modes
beamer (default)
presentation
handout
trans (transparencies)
article
all
These modes are loaded with \mode<mode name>. They may
also appear in the <overlay specification> option in the
\begin{frame} command or as an option to the
\documentclass.
Clifford E. Weil The beamer Class
The handout Mode
To produce handouts, change the \documentclass command to
\documentclass[handout]{beamer} and add
\usepackage{pgfpages} This disables hyperlinks.
\pgfpagesuselayout{4 on 1} Puts 4 slides on each page.
\setbeamertemplate{navigation symbols}{} Turns on
navigation bars at the bottom of each slide.
Clifford E. Weil The beamer Class
References
Till Tantau,
User Guide to the Beamer Class,
http://latex-beamer.sourceforge.net
George Gr¨atzer,
More Math Into L
A
T
E
X: fourth edition, Chapter 14,
Springer, 2007.
M. Goossens, F. Mittelbach, S. Rahtz, D. Roegel, H. Voß,
The L
A
T
E
X Graphics Companion, second edition,
Addison-Wesley, 2007.
Return
Clifford E. Weil The beamer Class