Presentations With Beamer
Presentations With Beamer
1 27
Introduction to presentations with beamer of the title slide, and alter the appearance of the
presentation.
Thomas Thurnherr
3.1 Presentation title
Abstract
Beamer reuses the standard LATEX macros to create
The document class beamer provides flexible com- the title page: \title, \author, and \date.
mands to prepare presentations with an appealing
look. Here I introduce the basics of the beamer class \title{Beamer presentation title}
intended for new users with a basic knowledge of \author{Presenter’s name}
LATEX. I cover a range of topics from how to create \date{\today}
a first slide to dynamic content and citations.
We use these further below to create a title page
1 Introduction frame.
The LATEX document class beamer [1] was written to 3.2 Presentation appearance
help with the creation of presentations held using a
In beamer, “themes” change the appearance of a
projector. In German, the English word Beamer de-
presentation. Themes define the style and the color
scribes a projector, which is likely the reason for Till
of a presentation. By default, beamer loads the
Tantau, the package author, to choose this particular
rather bland default theme. To change the theme to
name. Many macros available in the standard LATEX
something more appealing, we can use the following
document classes are used in beamer, although some-
command in the preamble with a theme name we
times the result might look different. The beamer
like:
package comes with extensive documentation, which
is included in most TEX distributions (such as TEX \usetheme{default} % default theme
Live) and available online on CTAN. As with other
document classes, the output document is likely in There are a great number of themes distributed
portable document format (PDF). This imposes with LATEX. They are often named after cities. Try
certain limitations on animations well-known from for example: Berkeley, Madrid, or Singapore, to
commercial software. However, it has always been name a few (figure 1). Also, look for beamer theme
a strength of (LA)TEX to let the author focus on the galleries online.
content, and beamer extends this concept to slide 4 Presentation slides
presentations.
4.1 Creating a basic frame
2 The very basics A frame may contain a number of different things,
To create a presentation, we set the document class including simple text, formulas, figures, tables, etc.
to beamer: Most often, however, a frame contains numbered or
\documentclass{beamer} bulleted lists. To create lists, we use the standard list
environments: enumerate and itemize. An example
The main difference between standard LATEX of a bulleted list is shown below:
document classes and beamer is that content does \begin{frame}
not continuously “flow” across multiple pages, but \frametitle{List types in \LaTeX}
is limited to a single slide. The environment name \begin{itemize}
frame is used for slides, usually to produce a single \item Bulleted list: itemize
slide (sometimes several, but we will get to that later). \item Numbered list: enumerate
A frame contains a title and a body. Furthermore, \item Labeled list: description
at the bottom of every frame, beamer automatically \end{itemize}
adds a navigation menu. \end{frame}
A basic
beamer
example
Thomas
A basic beamer example A basic beamer example
Thurnherr
Introduction
Methods
A basic beamer example
Thomas Thurnherr
Thomas Thurnherr Results
Conclusion
Thomas Thurnherr
February 19, 2014
February 19, 2014
February 19, 2014
Figure 1: Title page frames for beamer themes: default, Singapore, and Berkeley.
{some-figure-file}
\begin{frame} \end{frame}
\titlepage
% alternatively \maketitle can be used Similarly with tables, we omit the table envi-
\end{frame} ronment and directly use tabular.
\begin{frame}
5 Simple animations
\frametitle{Adding a figure to a frame}
\centering It may be an exaggeration to use the word “ani-
\includegraphics[width=0.8\linewidth] mations”. What I will show is merely how to add,
Thomas Thurnherr
TUGboat, Volume 35 (2014), No. 1 29
remove and replace parts of the content, primar- Hide and show list items
ily text. However, I believe this is good enough to
keep the audience interested, everything else is just
a distraction.
5.1 Add items dynamically I First item, shown with the slide
I Next item, revealed after pressing some button
The beamer command \pause adds content gradu-
ally, by pausing and waiting for the presenter to press
I Show this item with the first
a button. For example, we can use \pause in a list
to reveal one item after another. You might wonder
how this is possibly translated into a PDF. There
is really no magic to it; LATEX just produces three
slides with the same page number, adding an extra
item one each subsequent slide. Try for yourself:
\begin{frame} Figure 2: Hide and show list items.
\frametitle{Usage of pause}
\begin{itemize}
\item First item, shown with the slide
\pause \begin{frame}
\item Next item, revealed after pressing \frametitle{Hide and show content}
a button \uncover<1> { % adds content }
\pause \uncover<2> { % add additional content }
\item Last item, revealed after pressing \end{frame}
a button again
\end{itemize} \begin{frame}
\end{frame} \frametitle{Hide and overwrite content}
\only<1> { % adds content }
5.2 Hide and show content \only<2> { % replaces previous content }
\end{frame}
“Overlays” is a slightly more sophisticated concept.
Overlays use pointed brackets to hide, reveal and
Similar to the itemize example above, much
overwrite content. For example, the specification
more sophisticated overlays can be created using
\item<1-> means: “from slide 1 on” (see figure 2).
\uncover and \only.
\begin{frame}
\frametitle{Hide and show list items} 5.3 Highlighting items
\begin{itemize} Besides hiding and revealing, we can also highlight
\item<1-> First item, shown with the slide text upon a button press. In beamer, this is called
\item<2-> Next item, revealed after an alert (see figure 3):
pressing some button
\item<3-> Last item, revealed again after \begin{frame}
pressing some button \frametitle{Highlight items of a list}
\item<1-> Show this item with the first \begin{itemize}
\end{itemize} \item<alert@1> Highlight first item
\end{frame} \item<alert@2> Highlight second item
\item<alert@3> Highlight third item
We can also combine ranges of numbers. As- \item<4- | alert@4> Combine reveal and
suming more than 7 overlays, to show an item on highlight
all but slides 3 and 6, we use: \item<-2,4-5,7->. \end{itemize}
Items always occupy their space, even if they are \end{frame}
not shown. Joseph Wright’s article elsewhere in this
issue provides more examples [5].
This syntax works with other content too, as 6 Citations and bibliography
implemented in the commands \uncover and \only. You can generate a bibliography the same way as with
The difference between them is that \uncover occu- a standard LATEX document class. Personally, I prefer
pies space when hidden, whereas \only does not, and to show the bibliography entries on the same slide
can therefore be used to overwrite previous content. where they are cited. I use the biblatex package [2]
% Citations
\footcustomcite{knuth86}
Thomas Thurnherr