Authors Top

If you have a few years of experience in Computer Science or research, and you’re interested in sharing that experience with the community, have a look at our Contribution Guidelines.

1. Introduction

Currently, multiple programs enable us to create presentations. However, most of these programs are proprietary. It means that the presentations may depend on resources available only in particular versions of these programs.

To avoid problems with proprietary software versioning, we can employ open-source and holistic programs to create presentations. This category of programs enables the user to focus on the presentation content instead of its theme.

So, we can choose the presentation theme after defining the presentation content. Furthermore, we can apply the different themes by only modifying a few lines in the presentation document.

An example of such a program is LaTeX/Beamer. Beamer is a LaTeX package that enables users to create presentations through a LaTeX fashioned document.

In this tutorial, we’ll explore the LaTeX/Beamer program. First, we’ll have a brief conceptual review on Latex and a presentation of the Beamer package. So, we’ll investigate several resources provided by Beamer to create presentations. Moreover, we’ll create a sample Beamer presentation to see how Beamer’s resources work in practice.

2. LaTeX and Beamer

LaTeX is a well-known program for typesetting typically employed to write medium-large scientific documents. However, LaTeX also supports importing packages that extend its resources and enables the user to use LaTeX for several purposes.

An example of these packages is TikZ. TikZ is a graphical package that makes it possible to create images with LaTeX. Through TikZ, we can easily, for instance, draw charts, flowcharts, and graphs.

Another relevant LaTeX package is Beamer. Beamer consists of a powerful package to make presentations with LaTeX. With Beamer, we can use straightforward and clean themes or create new themes with particular and exclusive designs for the presentations.

Beamer was developed to be fully compliant with LaTeX. So, the presentations created with Beamer are provided to the user as PDF files.

Employing PDF files for rendering presentations is a great choice since most hardware (computers, printers, smartphones, …) and software (Windows, Linux, macOS, …) support this file format.

2.1. A Little Bit Deeper on Beamer

There are many advantages to using Beamer for creating presentations. Among them, we can cite, for instance, Beamer compatibility with different LaTeX compilers, such as pdflatex, dvips, and lualatex.

Furthermore, most of the widely known LaTeX commands and packages are available to use with Beamer. In this way, we have excellent resources for, for example, mathematical and source code typesetting.

Finally, Beamer provides a library with different themes. Thus, we can customize the presentation layout by changing just a few lines in the LaTeX code. It is also possible to create and import new themes, making the presentation customization process even more powerful.

The most challenging about Beamer is that the learning curve is steeper. This challenge gets higher proportions if the user is not familiar with LaTeX. So, the user may find it hard to give the first steps with this package.

Another typical challenge is the syntax of the Beamer/LaTeX commands, which are quite unusual when compared to other text/presentation editing programs.

Furthermore, Beamer uses coordinates to position graphical resources. So, the positioning is very precise but can be harder to define for non-experienced users.

In such a way, this tutorial will present the first steps on Beamer, discussing multiple challenges of this package and showing how to tackle them.

3. Beamer in Practice

In this section, we’ll study the process of creating LaTeX/Beamer presentations from scratch. First, we’ll have an explanation of the Beamer basic structure. Thus, we’ll see some particular Beamer resources.

3.1. Beamer Basics

So, we opened an empty LaTeX document, and we want to create a Beamer presentation. The very first thing to do is define our document class as a Beamer document. We do that by adding the following line to the document:


Next, we do the definition of the presentation core information. The most common information in this step consists of the presentation title, the authors’ name, the institute or company name, and the date. We can do these definitions using the lines below:

\title{Beamer Presentation Title}
\author{Presentation Authors' Name}
\institute{Institute or Company Name}
\date{Presentation Date}

With these predefinitions done, we can finally start to build our presentation frames. So, we insert the following line to the LaTeX document:


The aforementioned line indicates to the LaTeX compiler that the following commands, flags, and text should be present as part of the presentation. Similarly, we show that the presentation ended with the line next (which is typically the last line of the document):


Between the beginning and end flags, we build the presentation itself. A Beamer presentation is organized with frames (slides). Usually, the first frame is the presentation title one. Thus, with the previously stated information, we create the presentation title frame with the following line:


Compiling the document at this point will generate the following frame:


Other frames (let’s call them content frames) are quite different: they require a beginning and end flag to delimitate their scope. So, we define a content frame with the lines next:


Inside a frame, we have its content. The frame content is from text to images, besides other flags and commands to define some frame features. In the following subsection, we’ll explore the building of a frame from scratch.

3.2. Frame Building

At first, we should consider that all the commands, flags, and content defined in this subsection are included in the scope of a frame.

In such a way, the first thing that we typically define in a frame is its title. We can do that in Beamer by using the following line:

\frametitle{Frame Title Goes Here}

After defining the frame title, we can work on the frame content. By default, only typing into a frame scope results in a justified text vertically centralized in the frame after being compiled. Thus, let’s consider the following content of a frame:

This is some text in the first line of a frame.\\
\textbf{This is some bold text in the second line of a frame.}\\
\textit{This is some italic text in the third line of a frame.}

So, this frame has three lines. It is relevant to note that the symbol \\ indicates a line breaking for the LaTeX compiler. Furthermore, we can see basic text formatting with a bold line (\textbf{}) and an italic line (\textit{}).

Moreover, it is possible to change the text alignment in the frame. We can do that by inserting the text between begin (\begin{}) and end (\end{}) flags defining the scope of a different alignment. The available alignments are right (flushright), left (flushleft), and center (center). Let’s see the example below:

This is a centered line.

At last, we can add images to a presentation frame. We do that by using the standard figure scope of LaTeX. An example is provided next:


This example includes a centered image called Lena.png (available in the same folder of the LaTeX project) in the frame. The caption appears below the image, and we can employ the label to refer to the figure in any presentation frame.

So, the following image shows the compiled frame with the previously presented texts and images:

3.3. Theme Gallery

Besides the default theme (employed in the examples of the previous sections), the Beamer package natively provides a set of themes. This set encompass 25 themes: AnnArbor; Antibes; Bergen, Berkeley, Berlin, Boadilla, CambridgeUS, Copenhagen, Darmstadt, Dresden, Frankfurt, Goettingen, Hannover, Ilmenau, JuanLesPins, Luebeck, Madrid, Malmoe, Marburg, Montpellier, Pittsburgh, Rochester, Singapore, Szeged, and Warsaw.

To change the presentation theme, we need to add a theme flag before the beginning of the document scope (\begin{document}). Let’s see this flag for the Frankfurt theme:


In this way, the previously presented frames with the Frankfurt theme are shown next:

In addition to the native Beamer themes, we can use custom themes from third-party repositories, such as the Overleaf repository.

4. Conclusion

In this tutorial, we learned about how to create presentations with LaTeX. We took into account a popular LaTeX package to build presentations: the Beamer package. In this way, we first reviewed some fundamental concepts about LaTeX and, especially, about Beamer. So, we in-depth explored the process of building presentations in practice. 

Specifically, we studied the basic structure of a LaTex/Beamer presentation, the creation of frames, inserting and formatting the frame content, and how to change the Beamer default theme.

We can conclude that LaTeX and Beamer compose a powerful solution to build presentations. The main benefits of using them consist of a generic and precise way to define graphical resources and the compiling process that automatically generates a PDF file with the presentation.

Authors Bottom

If you have a few years of experience in Computer Science or research, and you’re interested in sharing that experience with the community, have a look at our Contribution Guidelines.

1 Comment
Inline Feedbacks
View all comments
Comments are closed on this article!