×
Trykk her for å bruke ShareLaTeX på Engelsk

To see the corresponding video for this blog post click here.

In the next few blog posts we’re going to teach you how to make professional presentations in LaTeX using the Beamer class. We’re also creating a corresponding video series that these posts will be based on which you can find here. For this series we are going to be using ShareLaTeX as our LaTeX editor but you could follow along with whichever LaTeX editor you feel most confident with. If you’ve never used LaTeX you may want check out our beginners guide first which can be found here.

To start our presentation we need to set the document class to ‘beamer’. Next we’ll select a theme using the \usetheme command. For our example we’ll use the ‘Boadilla’ theme.

\documentclass{beamer}
\usetheme{Boadilla}

We’ll look at a number of different themes that can be used later on in the series. Now to complete the preamble we’ll enter title, subtitle, author, institute and date information.

\title{My Presentation}
\subtitle{Using Beamer}
\author{Joe Bloggs}
\institute{University of ShareLaTeX}
\date{\today}

Just like any other LaTeX document we need to enclose the document in the document environment.

\begin{document}
<document goes here>
\end{document}

Now to add slides in we use the ‘frame’ environment. We’ll make our first frame the title page by entering the \titlepage command.

\begin{frame}
\titlepage
\end{frame}

Just like with a normal LaTeX document we want to split our presentation up into sections and subsections. Let’s add in some sections and then add some frames to each section. Then we can give our frames titles using the \frametitle command and add in some text. For example:

\section{Section 1}
\subsection{sub a}

\begin{frame}
\frametitle{Title}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{frame}

Finally let’s create a frame with a table of contents using the \tableofcontents command.

\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}

Now if we compile the code we’ll see that the information we added in the preamble has been neatly put together on the title page.

titlepage

We’ll also see that the table of contents slide has automatically numbered the sections and displayed them along with their corresponding subsections.

contents

At the bottom of every slide a bar has been automatically generated with the author name, institute, presentation title, date and frame number.

example

To show the presentation, we download the project, open it in a PDF reader and put it in a fullscreen view. You will notice that in the bottom right hand corner beamer has given us some navigation buttons.

nav

The first one and it’s arrows allow us to navigate between slides, the second lets us navigate between frames, the third lets us navigate between subsections and the fourth between sections. We’ll talk more about the difference between slides and frames later in the series. The next button along that doesn’t have arrows either side takes us to the last page of the presentation if we click on the right had side of the icon or to the first slide if we click on the left. Then the circular arrows are like undo and redo buttons and take us back through the history of which slides we have visited. The search icon allows you search through your presentation.

This concludes our discussion on setting up a basic presentation. In the next post we’ll look at adding different types of content to our slides. Please do keep in touch with us via Facebook, Twitter & Google+.

###Other posts in this series:

pt 2 - Lists, Columns, Pictures, Descriptions & Tables

pt 3 - Blocks, Code, Hyperlinks & Buttons

pt 4 - Overlay Specifications

pt 5 - Themes and Handouts

Posted by Josh Cassidy on 13 Aug 2013