No Search Results
How to create a basic slideshow presentation in LaTeX with Beamer
This is the 19th video in a series of 21 by Dr Vincent Knight of Cardiff University. Here we see how to create a very basic presentation in LaTeX, using the beamer document class. We see how to use the \frame command to create slides, and in the next tutorial we'll see how to add a title page and more.
The example given in the video is also provided here as a template. To get started, click here to open the 'Presentation' example .
See the full list of tutorial videos .
- Documentation Home
- Learn LaTeX in 30 minutes
Overleaf guides
- Creating a document in Overleaf
- Uploading a project
- Copying a project
- Creating a project from a template
- Using the Overleaf project menu
- Including images in Overleaf
- Exporting your work from Overleaf
- Working offline in Overleaf
- Using Track Changes in Overleaf
- Using bibliographies in Overleaf
- Sharing your work with others
- Using the History feature
- Debugging Compilation timeout errors
- How-to guides
- Guide to Overleaf’s premium features
LaTeX Basics
- Creating your first LaTeX document
- Choosing a LaTeX Compiler
- Paragraphs and new lines
- Bold, italics and underlining
Mathematics
- Mathematical expressions
- Subscripts and superscripts
- Brackets and Parentheses
- Fractions and Binomials
- Aligning equations
- Spacing in math mode
- Integrals, sums and limits
- Display style in math mode
- List of Greek letters and math symbols
- Mathematical fonts
- Using the Symbol Palette in Overleaf
Figures and tables
- Inserting Images
- Positioning Images and Tables
- Lists of Tables and Figures
- Drawing Diagrams Directly in LaTeX
- TikZ package
References and Citations
- Bibliography management with bibtex
- Bibliography management with natbib
- Bibliography management with biblatex
- Bibtex bibliography styles
- Natbib bibliography styles
- Natbib citation styles
- Biblatex bibliography styles
- Biblatex citation styles
- Multilingual typesetting on Overleaf using polyglossia and fontspec
- Multilingual typesetting on Overleaf using babel and fontspec
- International language support
- Quotations and quotation marks
Document structure
- Sections and chapters
- Table of contents
- Cross referencing sections, equations and floats
- Nomenclatures
- Management in a large project
- Multi-file LaTeX projects
- Lengths in L a T e X
- Headers and footers
- Page numbering
- Paragraph formatting
- Line breaks and blank spaces
- Text alignment
- Page size and margins
- Single sided and double sided documents
- Multiple columns
- Code listing
- Code Highlighting with minted
- Using colours in LaTeX
- Margin notes
- Font sizes, families, and styles
- Font typefaces
- Supporting modern fonts with X Ǝ L a T e X
Presentations
- Environments
Field specific
- Theorems and proofs
- Chemistry formulae
- Feynman diagrams
- Molecular orbital diagrams
- Chess notation
- Knitting patterns
- CircuiTikz package
- Pgfplots package
- Typesetting exams in LaTeX
- Attribute Value Matrices
Class files
- Understanding packages and class files
- List of packages and class files
- Writing your own package
- Writing your own class
Advanced TeX/LaTeX
- In-depth technical articles on TeX/LaTeX
Get in touch
Have you checked our knowledge base ?
Message sent! Our team will review it and reply by email.
Email:
- How to make a presentation with Latex - Introduction to Beamer
- exampleblock
- compilation
- beamergotobutton
- presentation
We shall see in this article how to make a presentation with LaTeX, using the powerful class Beamer. If you want to make an outstanding “stressfree” presentation and bring your ideas or your work under a whole new light, let’s get started!!!
Installing the Beamer class
You will first need to install the package Beamer . Under Debian or Ubuntu, you can type the following command:
Once the latex-class Beamer is installed, you are definitely ready to stat your first presentation!!!
Basic presentation with Beamer
A few explanations:
means that our document is a Beamer presentation
this package enables us to use special letters (with accents, cedillas, etc). You can discard this command when the presentation is in English.
This is our outer theme (color and background). As you can imagine, there are tons of themes. You can refer to Beamer documentation for more details.
this defines the title of the presentation. As you can see, there are two titles:
- the first one, between brackets. [Making a LaTeX presentation with Beamer] is a substitute title which appears at the bottom of the page. This is useful especially if the original title is long. Since this is anoption only, if it is not mentioned, then the original title is the one shown in the bottom of the page.
- the second one, between braces, is the principal title of the presentation. The command
defines Nadir Soualem and Astozzia (us!) as the authors of the presentation.
defines where the presentation was held. Finally, we use
as the date.
To define the document, we use the markers
To define a slide of the presentation, we use the markers
To define a page title (frame), we mention it as follows
Introduction will be the title of the page. To define the first page, which contains details such as the title, the author, the date, etc - we use a frame in which we include the \titlepage command
To define a frame containing the layout of the presentation, we proceed as follows:
The layout is therefore mentioned at every section and subsection. You should insert \section and \subsection throughout the presentation and out of the frames:
Animations – Overlays
A good presentation is one that is dynamic and attracts the audience’s interest. Generally, we resort to a dynamic type of presentations. Alternatively stated, when we speak, we simultaneously show significant points of the talk, or hide others, or keep just the important ones. We shall see in this section how animations function in Beamer.
Item-by-item list view: the \pause command
In order to view several items of a list on the same slide, we type the following commands inside a frame:
We will thus see the items of our list, one by one.
Item-by-item list view: the \item<n-> command
An alternative way to visualize the elements of a list item by item is to use the \item<n-> command, where n is a natural number referring to the slide, beginning from which the item appears.
List item interval and isolated items: the \item<n-> and \item<p> commands
An example is worth a long speech:
\item<n-> means that the list item will appear on slides numbered n to m, whereas \item<p> means that the item will appear on slide p.
Item-by-item long list view: the [<+->] command
Sometimes the lists you want to display are long and it is not practical to use the \item<n-> command. An alternative solution is the use of the [<+->] command
Up to now, we have dealt with lists. We shall now see how to use text and slides.
Displaying and hiding text in slides: the \uncover<n->, \uncover<n-> and \uncover<p> commands
\uncover<n-> will display the text from slide n on; \uncover<n-> means the text element will appear from slide n to m. Finally, \uncover<p> means that the text will appear on slide p. Here is a case in point of a frame containing the \uncover command.
Be careful not to forget the braces after the \uncover command. The syntax is as follows:
Displaying and hiding text in slides: the \only<n->, \only<n-> and \only<p> commands
\only works like \uncover with the exception that the \only command is not as “cumbersome” on slides. Here is an example:
Here is an other example to better grasp the difference between \only and \uncover
Hide text in slides: the \invisible<n> commands
\invisible<n> makes text invisible on slide n
Another alternative: the \alt<n>{…}{…} commands
As an alternative, one can use the \alt<n>{…}{…} command on a slide. The first argument is the value on slide n. The second is for values other than n. Here is an example:
Highlighting text in red: the \alert<n>{…} command
To highlight text in red on slide n, we use the \alert<n>{…} command.
Successively highlighting list items in red: the <+-| alert@+> command
Using colors in a text on a slide: the \color<n->{…}{…}, \color<n->{…}{…} and\color<p>{…}{…} commands.
The first argument is the red, green, yellow, blue, etc … The second is the text to be colored
Creating links: the \hyperlink{…}{\beamergotobutton{…}} commands
To define internal links, we should add the following package in the preamble
Then, we should define a label pointing on the frame:
you define MY_LABEL as you please ! Finally, on the frame where the link is to be created, we proceed as follows:
There we are! We can see a button Refer to this page pointing to the frame labeled MY_LABEL .
Thus, the first argument of \hyperlink{…}{\beamergotobutton{…}} is the name of the label to be pointed at and \beamergotobutton{…} has the name of the button as an argument.
Defining blocks inside frames
For important stuff, we define blocks as follows:
As clear as onion soup !!!
Dynamic display of tables: the \pause and \onslide<n-> commands
First off, we should add the package colortbl to the preamble
To display rows dynamically, we shall use the \pause command as follows:
To display columns dynamically, we shall use the \onslide<n-> command as follows:
Writing on several columns: the \begin{columns}...\end{columns} commands
For two columns, we proceed as follows:
l,r,c refers to the position: left, right, center. The syntax is as follows:
Inserting a figure in a Beamer presentation
To insert an image or a figure, we proceed as in LaTeX by using the \includegraphics command. Here is an example:
In Beamer, we should distinguish between two types of figures:
- PS type: .eps, .ps and pspicture type (LaTeX)
- General type: .pdf, .png, .jpg, .jpeg You will need to compile a Beamer-class file.
Compiling a Beamer presentation
I assume that the your file is called file.tex. . There are ways to compile, depending on the type of figure you inserted. For PS-type figures, we shall use the following commands
We shall obtain the file file.pdf.
For general-type figures, we shall use the command
We shall also obtain the file file.pdf.
It goes without saying that explaining all the possibilities that Beamer offers is way too long. Have look to the official documentation, which is more exhaustive.
Have fun !!!
If you found this post or this website helpful and would like to support our work, please consider making a donation. Thank you!
Articles in the same category
- Useful software to start LaTeX
- Introduction au Latex
- Introduction à Beamer - Faire une présentation en Latex
- How to install latex package ?
- Comment installer un package Latex ?
- Latex Extra
- Variance Symbol in LaTeX
- Union and Big Union Symbol in LaTeX
- Transpose Symbol in LaTeX
- Transformée de Laplace en LaTeX
- Texte au dessus d'une flèche en LaTeX
- Text above arrow in LaTeX
- Symbole "plus grand que ou similaire à" en LaTeX
- Symbole de Variance en LaTeX
- Symbole de transposée en LaTeX
- Symbole de "non équivalent à" en LaTeX
- Symbole d'union et de grande union en LaTeX
- Symbole d'intersection et de grande intersection en LaTeX
- Strikethrough - strike out text or formula in LaTeX
- Passer en mode mathématique en Latex: $, $$ et displaymath
- Partial Derivatives of Multivariable Functions in LaTeX
- Numéroter les équations en Latex: leqno et fleqn
- Not Equivalent Symbol in LaTeX
- Latex yen symbol
- Latex valeur absolue
- Latex tensor product
- Latex symbole sous-ensemble - inclusion
- Latex symbole racine carrée
- Latex symbole produit
- Latex symbole produit vectoriel
- Latex symbole pourcentage
- Latex symbole plus ou moins
- Latex symbole parallèle
- Latex symbole orthogonal - Latex symbole perpendiculaire
- Latex symbole norme pour un vecteur ou une somme
- Latex symbole n'existe pas
- Latex symbole n'est pas un sous-ensemble - non-inclus
- Latex symbole n'est pas parallèle
- Latex symbole n'appartient pas à
- Latex symbole multiplication
- Latex symbole loi normale
- Latex symbole infini
- Latex symbole il existe
- Latex symbole il existe un seul et unique
- Latex symbole euro
- Latex symbole Est proportionnel à
- Latex symbole espérance mathématiques
- Latex symbole équivalent / équivalence
- Latex symbole dual ou dague
- Latex symbole différent
- Latex symbole dérivée partielle
- Latex symbole degré
- Latex symbole de la moyenne
- Latex symbole de la constante de Planck h
- Latex symbole congruent
- LaTeX symbole complément
- Latex symbole chapeau
- Latex symbole approximativement
- Latex symbole appartient à
- Latex symbol there exists one and only one
- Latex symbol Planck constant h
- LaTex symbol partial derivative
- Latex symbol not in
- Latex symbol not exists
- Latex symbol not equal
- Latex symbol norm for vector and sum
- Latex symbol multiply
- LaTeX symbol Is proportional to
- Latex symbol if and only if / equivalence
- Latex symbol for all x
- Latex symbol exists
- Latex symbol different
- Latex symbol checkmark
- LaTeX symbol characteristic function
- Latex symbol belongs to
- Latex symbol average
- Latex symbol approximately
- Latex subset symbol
- Latex square root symbol
- Latex real part symbol
- Latex real numbers
- Latex rational numbers
- Latex quaternion numbers
- Latex produit tensoriel
- Latex product symbol
- Latex pour tout x
- Latex points de suspension: \ldots,\cdots,\vdots et \ddots
- Latex plus or minus symbol
- Latex piecewise function
- Latex partie réelle
- Latex partie imaginaire
- Latex parallel symbol
- Latex overset and underset
- Latex orthogonal symbol - Latex perpendicular symbol
- Latex numbering equations
- Latex not subset symbol
- Latex not parallel symbol
- Latex normal distribution symbol
- Latex natural numbers
- Latex k parmi n - coefficient binomial
- Latex jacobian symbol
- Latex infinity symbol
- Latex indicator function
- Latex imaginary part symbol
- Latex how to write underscore
- Latex how to write text in math mode
- Latex how to write percent
- Latex how to write bar
- Latex how to write a fraction
- Latex how to insert a blank or empty page with or without numbering \thispagestyle,\newpage,\usepackage{afterpage}
- Latex how to hide page number
- Latex horizontal space: qquad,hspace, thinspace,enspace
- Latex hat symbol - wide hat symbol
- Latex gradient symbol
- Latex fonction plancher - Latex partie entière inférieure
- Latex fonction plafond - Latex partie entière supérieure
- Latex fonction indicatrice
- Latex floor function
- Latex flèche
- Latex expected value symbol - expectation
- Latex euro symbol
- Latex espace horizontal: qquad,hspace, thinspace,enspace
- Latex ensemble vide
- Latex empty set
- Latex écrire du texte dans les équations ou en mode mathématique
- Latex dérivée, limite, somme, produit et intégrale
- LateX Derivatives, Limits, Sums, Products and Integrals
- Latex degree symbol
- Latex dagger symbol or dual symbol
- Latex copyright, trademark, registered symbols
- Latex convolution symbol
- Latex congruent symbol
- Latex complex numbers
- Latex complement symbol
- Latex comment insérer une page blanche,vide avec ou sans numéro, \thispagestyle,\newpage,\usepackage{afterpage}
- Latex comment faire un underscore
- Latex ceiling function
- Latex bra ket notation
- Latex binomial coefficient
- Latex barrer du texte ou une équation
- Latex backslash symbol
- Latex arrows
- Latex accolades horizontales et verticales: \left\{,\right\},\underbrace{} et \overbrace{}
- Latex absolute value
- Laplace Transform in LaTeX
- $L^1$, $L^2$, $L^p$ and $L^\infty$ spaces in Latex
- Intersection and big intersection symbols in LaTeX
- How to write table in Latex ? begin{tabular}...end{tabular}
- How to write number sets N Z D Q R C with Latex: \mathbb, amsfonts and \mathbf
- How to write matrices in Latex ? matrix, pmatrix, bmatrix, vmatrix, Vmatrix
- How to write angle in latex langle, rangle, wedge, angle, measuredangle, sphericalangle
- How to write algorithm and pseudocode in Latex ?\usepackage{algorithm},\usepackage{algorithmic}
- How to write a vector in Latex ? \vec,\overrightarrow
- How to get dots in Latex \ldots,\cdots,\vdots and \ddots
- How to display formulas inside a box or frame in Latex ? \boxed
- Horizontal and vertical curly Latex braces: \left\{,\right\},\underbrace{} and \overbrace{}
- Greater Than or Similar To Symbol in LaTeX
- Fonction caractéristique en LaTeX
- Espaces $L^1$, $L^2$, $L^p$ et $L^\infty$ en Latex
- Écrire les ensembles classiques en Latex: \mathbb, amsfonts et \mathbf
- Dérivées partielles de fonctions à plusieurs variables en LaTeX
- Comment faire un tableau en Latex ? begin{tabular}...end{tabular}
- Comment encadrer des formules en Latex ? \boxed
- Comment écrire un angle en latex langle, rangle, wedge, angle, measuredangle, sphericalangle
- Comment écrire un algorithme en Latex ?\usepackage{algorithm},\usepackage{algorithmic}
- Comment écrire des vecteurs en Latex? \vec,\overrightarrow
LaTeX Beamer introduction / Quick-start guide
Create structured presentations in LaTeX containing a title page, table of contents, lists, figures, tables, blocks, and much more!
- 1. Minimal code
- 2. Title page
- 4. Table of contents (Outline)
- 5. Unordered and ordered lists
6. Tables and Figures
- 7. Multicolumn frame
- 9. Hyperlinks and buttons
1. Minimal code of a LaTeX presentation
The minimal code of a LaTeX presentation includes: 1) loading the beamer class package, 2) choosing a default presentation theme and a frame.
Here is an example:
- Like every LaTeX document, we should specify document class which corresponds to ’beamer’.
- The Beamer class comes with several slide themes which can be used to change the color and layout of the slides. We will use the default theme throughout this guide. I will do a lesson on themes later in the detailed tutorial , but the theme is not our concern at the moment.
- To create a slide, we use the frame environment and put details inside it. In this example, it is just a one line of text!
Compiling this code yields to a basic slide:
Let’s try now to create a simple title page.
2. Creating a simple title page
To create a title page, the first thing to do is to add the title and subtitle of the presentation , the name of the author , the institute and the date . After that, we create a frame environment and we use \titlepage to print the provided details.
Here is a simple example:
Compiling this code yields:
3. Add a logo in Beamer
Adding a logo to beamer presentations can be done easily using the \logo{Text} command. Between braces, we can add text or an image using \includegraphics[options]{ImageName} command .
Here is an illustrative example:
For more details about adding and positioning a logo in Beamer, check this lesson !
4. Presentation Outline
– table of contents command.
The \ tableofcontents command creates the table of contents as it did in LaTeX. The table automatically gets updated with the addition or removal of sections and subsections. We have to create a frame environment and we add the command in question .
– Hide subsections
This command will display all sections and subsection(if any) in the table of contents . To display only sections titles’ we add the option [hideallsubsections] in squared brackets to the \tableofcontents command as follows:
– Recurring table of contents
It is also possible to create a recurring table of contents before every section. This highlights the current section and fades out the rest. This feature is used to remind the audience of where we are in the presentation. This can be done with the help of \AtBeginSection command and specifying [currentsection] in the \tableofcontents command. Please go through the example below for better understanding:
5. Lists in beamer
Let’s discuss these environments in detail:
– Itemize environment
Itemize is used to create unordered lists . Under this environment, the obtained list will have bullet points . Check the following code:
which yields the following:
There are various templates in beamer to change this itemized list appearance. The command \setbeamertemplate is used on itemize items to change the shape of item markers.
- \setbeamertemplate{itemize items}[default] : the default item marker is a triangle.
- \setbeamertemplate{itemize items}[circle] : sets the item marker to a small filled circle.
- \setbeamertemplate{itemize items}[square] : sets the item marker to a small filled square.
- \setbeamertemplate{itemize items}[circle] : sets the item marker to a ball shape.
– Enumerate environment
This environment is used to create an ordered list . By default, before each item increasing Arabic numbers followed by a dot are printed (eg. “ 1. ” and “ 2. ”).
Similar to itemize items, we can change the enumerate style by placing numbers inside different shapes using \setbeamertemplate and instead of itemize items we use enumerate items :
- \setbeamertemplate{enumerate items}[circle] : place the number inside a small filled circle.
- \setbeamertemplate{enumerate items}[square] : place the number inside a small filled square.
- \setbeamertemplate{enumerate items}[circle] : place the number inside a ball shape.
The list looks like the following:
– Description environment
The description environment is used to define terms or to explain acronyms. We provide terms as an argument to the \item command using squared bracket.
Compiling this piece of code yields:
Tables and figures are created pretty much the same way as it is in LaTeX. Check the following code:
Compiling this code with the minimal code of a LaTeX presentation presented above yields:
Figures can be included in a beamer presentation using the figure environment. The image can be simply inserted using the \includegraphics command, since beamer already includes the graphicx package in it. The size and the label of the image can be set using the scale option and \caption command respectively.
7. Creating columns in beamer
Columns can be created in beamer using the environment named columns . Inside this environment, you can either place several column environments , each of which creates a new column, or use the \column command to create new columns.
Under the columns environment, the column environment is to be entered along with column width to text width ratio specified in curly brackets. This ratio is generally taken as 0.5. However, it can be customized as per the requirements, check this example:
8. Blocks in beamer
Information can be displayed in the form of blocks using block environment. These blocks can be of three types :
- alert block.
- example block.
- and theorem block.
– Standard block
The standard block is used for general text in presentations. It has a blue color and can be created as follows:
– Alert block
The purpose of the alert block is to stand out and draw attention towards the content. This block is used to display warning or prohibitions. The default color of this block is red . To display an alert block the code can be written as:
– Example block
This block is used to highlight examples as the name suggests and it can also be used to highlight definitions. The default color of this block is green and it can be created as follows:
– Theorem Block
The theorem block is used to display mathematical equations , theorems , corollary and proofs . The color of this block is blue . Here is an example:
9. Hyperlinks and Buttons
To create jumps from one slide to another slide in our talk, we can add hyperlinks to our presentation . When the hyperlink is clicked it jumps the presentation to the target slide. This can be achieved in beamer by following these steps:
- Tag the frame that we want to link to by adding \label{targetFrame} or \hypertarget commands.
- Create a hyperlink text using the command: \hyperlink{targetFrame}{click here}
- If you would like to create a button style , put “click here” inside the command \hyperlink{contents}{\beamerbutton{click here}}
We reached the end of this quick guide to LaTeX presentations. If you would like to go into details, check the beamer free course !
How to create presentations with Beamer
Vector Open Stock. CC BY-SA 3.0.
Beamer is a LaTeX package for generating presentation slide decks. One of its nicest features is that it can take advantage of LaTeX's powerful typesetting system and all the other packages in its ecosystem. For example, I often use LaTeX's listings package in Beamer presentations that include code.
Starting a presentation
To begin a Beamer document, enter:
As you would with any other LaTeX document, add any packages you want to use. For example, to use the listings package, enter:
Place all content inside the document environment:
Beamer documents are usually a sequence of frame environments. Frames that contain code should be marked fragile :
Begin your frames with a title:
Testing your code before you present it
One of the worst feelings in the world is giving a talk and realizing, as you walk through the code, that there is a glaring bug in it—maybe a misspelled keyword or an unclosed brace.
The solution is to test code that is presented. In most presentation environments, this means creating a separate file, writing tests, then copying and pasting.
However, with Beamer, there is a better way. Imagine you have a file named do_stuff.py that contains code. You can write tests for the do_stuff.py code in a second file, which you call test_do_stuff.py , and can exercise it with, say, pytest . However, most of the lines in do_stuff.py lack pedagogic value, like defining helper functions.
To simplify things for your audience, you can import just the lines you want to talk about into the frame in your presentation :
Since you will be talking through those lines (from 8 to 15), you don't need any other content on the slide. Close the frame:
On the next slide, you want to show a usage example for the do_stuff() function you just presented:
You use the same file, but this time you show the lines that call the function. Finally, close the document:
Assuming you have an appropriate Python file in do_stuff.py , this will produce a short two-slide presentation.
Beamer also supports necessary features such as progressive revelation, showing only one bullet at a time to prevent the audience from being distracted by reading ahead.": \pause inside a list will divide bullets into pages:
Creating handouts
My favorite feature in Beamer is that you can set it to ignore everything outside a frame with \documentclass[ignorenonframetext]{beamer} . When I prepare a presentation, I leave off the top (where the document class is declared) and auto-generate two versions of it: one with Beamer that ignores all text outside any frame, which I use for my presentation, and one with a header like:
which generates a handout—a PDF that has all the frames and all the text between them.
When a conference organizer asks me to publish my slides, I include the original slide deck as a reference, but the main thing I like people to have is the handout, which has all the explanatory text that I don't want to include on the slide deck itself.
When creating presentation slides, people often wonder whether it's better to optimize their materials for the presentation or for people who want to read them afterward. Fortunately, Beamer provides the best of both worlds.
Related Content
Forging Accessibility in Robotic Surgery
© 2015-2024. All rights reserved.
Making Elegant Presentation Slides Using LaTex Beamer
This post demonstrates how to make elegant presentation slides using LaTex with Beamer package. If you are an Emacs user and haven’t read my previous posts about how to set up a nice LaTex working environment with Emacs on MacOS and Ubuntu , please have a look at it and I am pretty sure you’re gonna love it.
What’s Beamer
Beamer is a LaTeX document class for creating slides for presentations. With Beamer, it’s going to be much easier for us to create presentation slides using LaTex. Next, let me show you how to make elegant slides from scratch.
Create a LaTex Project
Fire a terminal and execute the following commands.
In this example project, we create a folder example with two sub-folders pdf and bib in it. pdf contains all the figures you are including in the slides (we use pdf format for all the figures), and bib stores bibliography related files. The main source file main.tex is created in the root directory. Put the logo figures in the pdf sub-folder, and you should have a similar file tree as follows.
Fire a text editor that you are comfortable with (e.g., Emacs). Copy and paste the following codes into the newly created main.tex file.
Compile the project and you will see a PDF file with the following pages.
The second page is empty because we haven’t defined any sections or subsections. So let’s add more slides.
Include two more useful packages subfig and bm , and add more slides by copying the presentation slides code at the end of previous code block.
After compilation, you can obtain some elegant slides as follows.
Enjoy playing with Beamer.
Thanks for reading!
Related Posts
A very brief ros tutorial 26 nov 2017, using git to manage system configuration files on linux/macos 06 mar 2017, setting up a nice environment for latex on ubuntu 21 feb 2017.
Making Presentations With LaTeX
Last updated: July 25, 2024
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:
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:
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:
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:
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.
IMAGES
COMMENTS
This five-part series of articles uses a combination of video and textual descriptions to teach the basics of creating a presentation using the LaTeX beamer package. These tutorials were first published on the original ShareLateX blog site during August 2013; consequently, today's editor interface (Overleaf) has changed considerably due to the ...
Beamer is a powerful and flexible LaTeX class to create great looking presentations. This article outlines the basis steps to making a Beamer slideshow: creating the title page, adding a logo, highlighting important points, making a table of contents and adding effects to the slideshow.
This is the 19th video in a series of 21 by Dr Vincent Knight of Cardiff University. Here we see how to create a very basic presentation in LaTeX, using the beamer document class. We see how to use the \frame command to create slides, and in the next tutorial we'll see how to add a title page and more.
While there is other presentation software, LaTeX Beamer allows us to create visually-appealing and consistent presentations. It also supports the use of external packages. One of the key benefits of using LaTeX Beamer is that we can create simple and complex formulas, add tables, and create illustrations to describe special concepts. 2.1.
Learn about creating LaTeX presentations using beamer in short lessons with full code examples. A comprehensive guide to basic and advanced features. These tutorials, provide a hands-on introduction to Beamer. You will see, the usage is very simple. Even if you have only used Microsoft PowerPoint before, you can learn LaTeX Beamer in no time.
[Making a LaTeX presentation with Beamer] is a substitute title which appears at the bottom of the page. This is useful especially if the original title is long. Since this is anoption only, if it is not mentioned, then the original title is the one shown in the bottom of the page.
Let's try now to create a simple title page. 2. Creating a simple title page. To create a title page, the first thing to do is to add the title and subtitle of the presentation, the name of the author, the institute and the date.After that, we create a frame environment and we use \titlepage to print the provided details.. Here is a simple example:
For example, I often use LaTeX's listings package in Beamer presentations that include code. Starting a presentation. To begin a Beamer document, enter: \documentclass{beamer} As you would with any other LaTeX document, add any packages you want to use. For example, to use the listings package, enter: \usepackage{listings}
What's Beamer. Beamer is a LaTeX document class for creating slides for presentations. With Beamer, it's going to be much easier for us to create presentation slides using LaTex. Next, let me show you how to make elegant slides from scratch. Create a LaTex Project. Fire a terminal and execute the following commands.
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.