HomeContact
Archive
First Beamer Presentation with LaTeX and Sublime Text 2
Jon Page
July 04, 2013
2 min

Table Of Contents

01
Create beamer_test.tex
02
Adding slides (um,... I mean frames)
03
Adding a title page
04
Changing alignment
05
Adding themes
06
The finished presentation
07
Conclusion

This tutorial will walk you through the creation of your first beamer presentation using LaTeX and Sublime Text 2. I will assume you have at least made your first PDF with LaTeX in Sublime Text 2 (Mac-specific setup instructions).

Create beamer_test.tex

Start by opening Sublime Text 2, and saving a new document as ”beamer_test.tex”. On the first line we’ll set the document class to ”beamer“:

\documentclass{beamer}

On the next line, type ”begin”, then press the TAB key. This should paste the following snippet and place cursors selecting ”env” in both the begin and end tags:

\begin{env}
\end{env}

Now type ”document” so that environment tags look as follows:

\begin{document}
\end{document}

Adding slides (um,… I mean frames)

Frames in beamer presentations are (for our purposes) the equivalent of slides in PowerPoint presentations. To add a frame inside of our document environment, simply type ”frame” and press the TAB key (this and the last snippet assumes you have LaTeXTools installed). Go ahead and change ”title” to ”My First Slide”. Add some content inside the frame (I’m going to add a bulleted list). Your new slide should look similar to the following:

\begin{frame}[t]
  \frametitle{My First Slide}
  \begin{itemize}
    \item My first point
    \item My second point
    \item My third point
  \end{itemize}
\end{frame}

Here I added an itemized list, but inside of these frames you can place figures, tables, equations and anything else defined in LaTeX. Ok, now that we have one of the most basic presentations known to man, let’s hit CTRL+B (or COMMAND+B on OS X) to build this presentation (if you get a few font warnings, don’t worry, fixing these is not important). Your finished slide should look like this:

First Slide
First Slide

Now, I admit, this is a little underwhelming. So, let’s add a title page, make it so the frame content is not top-aligned, and play around with some themes while we’re at it.

Adding a title page

What presentation would be complete without a title page. First we need to define the elements of the title page. Paste the following commands between the document class statement and before the beginning of the document environment.

\title[Short Presentation]{The shortest presentation in \LaTeX}
\subtitle[title edition]{Now with a title}
\author[F. Lastname]{Firstname Lastname}
\institute[UIR]{ The University of Irreproducible Results }

Making the title page is pretty easy. Just paste the following frame above the first one we made earlier.

\begin{frame}[[plain]]
\titlepage
\end{frame}

Here we replace the frame title and the t (top-align) option with the plain option. Go ahead and build the PDF. Here’s what the first slide should look like:

Beamer Title Slide
Beamer Title Slide

Changing alignment

So let’s say you don’t want the frame content vertically aligned to the top. Simply change the ”[t]” to ”[c][/c]” (or ”[b]” if you want it bottom-aligned). You can also remove ”[t]” entirely to use the default which is centered.

Adding themes

Time to spice up our rather bland presentation. Hop on over to the Beamer Theme Matrix and pick out a theme. The city names along the side are beamer themes which will go inside a usetheme command and the animal names along the top are color themes which will go inside a usecolortheme command. I’ve chosen beamer theme ”Szeged”, and color theme ”dove.” Add the next commands between the document class command and the title info we inserted earlier (replace Szeged and dove for themes you chose).

\usetheme{Szeged}
\usecolortheme{dove}

The finished presentation

Here’s what the slides for our completed presentation look like.

Title with Dove theme
Title with Dove theme

Slide with Dove theme
Slide with Dove theme

Here’s the complete source:

\documentclass{beamer}
\usetheme{Szeged}
\usecolortheme{dove}
\title[Short Presentation]{The shortest presentation in \LaTeX}
\subtitle[title edition]{Now with a title}
\author[F. Lastname]{Firstname Lastname}
\institute[UIR]{The University of Irreproducible Results}

\begin{document}
  \begin{frame}[[plain]]
    \titlepage
  \end{frame}

  \begin{frame}
    \frametitle{My First Slide}
    \begin{itemize}
      \item My first point
      \item My second point
      \item My third point
    \end{itemize}
  \end{frame}
\end{document}

Conclusion

While this is a presentation short on finesse and content, I hope it helps get you started. Be sure to come back for a follow-up tutorial taking your skills with ST2 and beamer to the next level. In the meantime here are some resources I have found useful:

  • Rouben Rostamian’s Beamer Quickstart Guide
  • The beamer documentation
  • Beamer Theme Matrix

And here are a few of our tutorials on Sublime Text 2 and LaTeX in general:


Tags

#beamer, #LaTeX, #sublime-text-2

Related Posts

Creating Your First PDF with LaTeX and Atom
February 27, 2016
2 min
© 2022, All Rights Reserved.

Quick Links

About UsContact Us

Social Media