How to make a presentation with Latex - Introduction to Beamer

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:

apt-get install latex-beamer

Once the latex-class Beamer is installed, you are definitely ready to stat your first presentation.

Basic presentation with Beamer

\documentclassbeamer> \usepackage[latin1]inputenc> \usethemeWarsaw> \title[Make a LaTeX presentation using Beamer]Introduction to Beamer\\How to make a presentation with LaTeX?> \authorNadir Soualem -- Astozzia> \instituteMath-linux.com> \dateJule 13, 2007> \begin \begin \titlepage \end \begin Introduction> This is a short introduction to Beamer class. \end \end 

A few explanations:

\documentclassbeamer>

means that our document is a Beamer presentation

\usepackage[latin1]inputenc>

this package enables us to use special letters (with accents, cedillas, etc). You can discard this command when the presentation is in English.

\usethemeWarsaw>

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.

\title[Making a LaTeX presentation with Beamer]Introduction to Beamer\\How to make a LaTeX presentation?>

this defines the title of the presentation. As you can see, there are two titles:

\authorNadir Soualem -- Astozzia>

defines Nadir Soualem and Astozzia (us!) as the authors of the presentation.

\instituteMath-linux.com>

defines where the presentation was held. Finally, we use

\dateJuly 13, 2007>

To define the document, we use the markers

\begin . \end 

To define a slide of the presentation, we use the markers

\begin . \end 

To define a page title (frame), we mention it as follows

\begin Introduction>

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

\begin \titlepage \end 

To define a frame containing the layout of the presentation, we proceed as follows:

\AtBeginSubsection[]  \begin \frametitleLayout> \tableofcontents[currentsection,currentsubsection] \end >

The layout is therefore mentioned at every section and subsection. You should insert \section and \subsection throughout the presentation and out of the frames:

\sectionName_of_the_section> \begin . \end . \sectionName_of_the_section> \subsectionName_of_the_subsection> \begin . \end 

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:

\begin \pause \item Beamer is a wonderful class \pause \item One can make animations \pause \item One uses the\textbfpause> command, for example \pause \item in order to bring in important ideas \end 

We will thus see the items of our list, one by one.

Item-by-item list view: the \item command

An alternative way to visualize the elements of a list item by item is to use the \item command, where n is a natural number referring to the slide, beginning from which the item appears.

\begin \item appears from slide 2 on \item appears from slide 3 on \item appears from slide 4 on \item appears from slide 5 on \end 

List item interval and isolated items: the \item and \item

commands

An example is worth a long speech:

\begin \item appears from slide 2 on \item appears from slide 2 to slide 4 \item appears on slide 4 \item appears from slide 3 on \end 

\item means that the list item will appear on slides numbered n to m, whereas \item 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 command. An alternative solution is the use of the [] command

\begin [] \item L \item A \item T \item E \item X \end 

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, \uncover and \uncover

commands

\uncover will display the text from slide n on; \uncover means the text element will appear from slide n to m. Finally, \uncover means that the text will appear on slide p. Here is a case in point of a frame containing the \uncover command.

\begin \uncover appear from slide 2 on\\> \uncover appears from 3 to slide 4\\> \uncoverappears on slide 4\\> \uncoverappears from slide 3 on\\> \end 

Be careful not to forget the braces after the \uncover command. The syntax is as follows:

\uncover. > \uncover. > \uncover

. >

Displaying and hiding text in slides: the \only, \only and \only

commands

\only works like\uncover with the exception that the \only command is not as “cumbersome” on slides. Here is an example:

\begin \only appear from slide 2 on\\> \only appears from 3 to slide 4\> \onlyappear on slide 4\\> \onlyappear from slide 2 on\\> \end 

Here is an other example to better grasp the difference between \only and \uncover

\begin \begin \item Language used by Beamer: L\uncoverA>TEX \item Language used by Beamer: L\onlyA>TEX \end \end 

Hide text in slides: the \invisible commands

\invisible makes text invisible on slide n

\begin \invisibleThis text will be invisible on slide 2, but not on others slides>\\ This text is always visible\\ \uncoverBeamer> \uncoveris> \uncoversuper> \uncoverpowerful> \end 

Another alternative: the \alt commands

As an alternative, one can use the \alt 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:

\altI am on slide 3\\>I am not on slide 3\\> \only appears from slide 2 on\\> \only appears from slide 3 to slide 4\\> \onlyappears on slide 4\\> \onlyappears from slide 3 on\\>

Highlighting text in red: the \alert command

To highlight text in red on slide n, we use the \alert command.

\alertThis text> \alertis> \alertred>

Successively highlighting list items in red: the <+-| alert@+>command

\begin \item <+-| alert@+>Robert De Niro \item <+-| alert@+>Brian De Palma \item <+-| alert@+>Gerard Depardieu \item <+-| alert@+>Tux \end 

Using colors in a text on a slide: the \color, \color and\color

commands

The first argument is the red, green, yellow, blue, etc … The second is the text to be colored

Some colors . \\ \colorgreen>Green color\\> Great . 

Creating links: the \hyperlink<\beamergotobutton> commands

To define internal links, we should add the following package in the preamble

\usepackagehyperref>

Then, we should define a label pointing on the frame:

\begin [label=MY_LABEL] The link will point to this frame \end 

you define MY_LABEL as you please ! Finally, on the frame where the link is to be created, we proceed as follows:

\hyperlinkMY_LABEL>\beamergotobuttonRefer to this page>>

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:

\begin Block title> This is a block in blue \end \begin Alert-block title> This is a block in red \end \begin Example-block title> This is a block in green \end 

As clear as onion soup .

Dynamic display of tables: the \pause and \onslide commands

First off, we should add the package colortbl to the preamble

\usepackagecolortbl>

To display rows dynamically, we shall use the \pause command as follows:

\begin lcccc> Class & A & B & C & D \\\hline X & 1 & 2 & 3 & 4 \pause\\ Y & 3 & 4 & 5 & 6 \pause\\ Z &5&6&7&8 \end 

To display columns dynamically, we shall use the \onslide command as follows:

\begin lc\onslide>c\onslide>c\onslide>c\onslide>c> Class & A & B & C & D \\ X & 1 & 2 & 3 & 4 \\ Y & 3 & 4 & 5 & 6 \\ Z &5&6&7&8 \end 

Writing on several columns: the \begin. \end commands

For two columns, we proceed as follows:

\begin \begin [l]5cm> First column \end \begin [r]5cm> Second column \end \end 

l,r,c refers to the position: left, right, center. The syntax is as follows:

\begin \begin [position]column width> . \end \begin [position]column width> . \end \end 

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:

\begin \includegraphics[options]path_to_image> \end 

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

latex fichier.tex latex fichier.tex dvips fichier.dvi ps2pdf fichier.ps

We shall obtain the file file.pdf.

For general-type figures, we shall use the command

latex2pdf fichier.tex latex2pdf fichier.tex

We shall also obtain the file file.pdf.

Conclusion

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.

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 make a presentation with Latex - Introduction to Beamer
  • Latex
  • /faq/
    • latex/faq
    • 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
    • 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
    • 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\,\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. end
    • 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,\usepackage
    • 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\,\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. end
    • 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,\usepackage
    • Comment écrire des vecteurs en Latex? \vec,\overrightarrow
    • Latex FAQ
    • Nadir SOUALEM
    • webmaster@math-linux.com

    2024 Math-linux.com. Knowledge base dedicated to Linux and applied mathematics.