# Creating a Presentation with LaTeX Beamer – Getting Started

July 2, 2010
By

(This article was first published on Software for Exploratory Data Analysis and Statistical Modelling, and kindly contributed to R-bloggers)

The LaTeX beamer package can be used to create appealing presentations for many applications. A working knowledge of LaTeX is required but once the initial learning curve and transition is made from a visual word processor to a markup based approach the benefits are worth the initial investment of time.

Title Pages

In a previous post we considered creating a title page for a presentation which follows the same general approach to creating titles in other LaTeX document types.

Fast Tube by Casper

An example of the commands needed to create the title of a presentation are shown below, where the square brackets are used to indicate the short information that is used in places like the running headers of a document:

title[ggplot2 Tutorial]{An Introduction to the ggplot2 package} subtitle[GM-RAM]{http://www.wekaleamstudios.co.uk} author[GM-RAM]{GM-RAM Technical Staff}

Then we need to create a frame in the document to display the title page via the frame environment:

begin{frame} titlepage end{frame}

Document Structure

Most LaTeX documents make use of the sectioning commands to create a logical structure to the contents of a document. Headings can be defined at various levels starting from chapter moving down to sections then subsections.

Fast Tube by Casper

These sections commands can be used in beamer and behave slightly differently to other document classes and the display of the section headings depends on the theme and the use of tables of contents which can be interspaced around the presentation, for example appearing at the start of each section to remind the audience of progress through the presentation.

The sections are defined in the same way as with other LaTeX documents:

section{Introduction}   section{Basic Graphs}

begin{frame} frametitle{Outline} tableofcontents[currentsection] end{frame}

We can specify a title for the slide with the table of contents using the frametitle command.

Fast Tube by Casper

We can generate a recurring table of contents at the start of each section with the AtBeginSection command like this:

AtBeginSection[] { begin{frame} frametitle{Outline} tableofcontents[currentsection] end{frame} }

Other useful resources are provided on the Supplementary Material page.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...