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!

In this post, we assume that you successfully installed beamer (check step-by-step installation process). Otherwise, you can use Overleaf, online LaTeX editor. This fast guide to LaTeX presentations creation introduces you to beamer class where all features are only swiftly explained here, for deeper insights, you should check the regular tutorials.

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:

% Quick start guide \documentclass \usetheme \begin \begin This is your first presentation! \end \end

Comments:

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:

% Quick start guide \documentclass \usetheme % Title page details \title <\LaTeX<>Beamer introduction> \subtitle \author \institute \date \begin \begin % Print the title page as the first slide \titlepage \end \end

Compiling this code yields:

Are you looking for more fancy title pages? More details can be found in the lesson “ Your First LaTeX Presentation–Title Page ”.

3. Add a logo in Beamer

Adding a logo to beamer presentations can be done easily using the \logo command. Between braces, we can add text or an image using \includegraphics[options] command.

Here is an illustrative example:

% Quick start guide \documentclass \usetheme % Title page details \title <\LaTeX<>Beamer introduction> \subtitle \author \institute \date % Image Logo \logo<\includegraphics[width=2.5cm]> \begin \begin % Print the title page as the first slide \titlepage \end \end

Compiling this code yields:

The position of this logo depends on the theme used. In the default theme, it is placed at the right bottom corner of each slide of the presentation.

– To add a logo only for the title page, we can use \titlegraphic<> instead of \logo<> command. Check below the compilation output.

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.

% . % Presentation outline \begin \tableofcontents \end % .
Title and subtitle of a frame is added between braces as follows: \begin .

– 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:

% Presentation outline \begin \tableofcontents[hideallsubsections] \end

– 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:

% Presentation outline \begin \tableofcontents[hideallsubsections] \end % Current section \AtBeginSection[ ] < \begin \tableofcontents[currentsection] \end >

At this point, you know the basics about creating an outline for your presentation. More details are presented in this lesson!

5. Lists in beamer

Lists can be created using three environments in beamer: \enumerate , \itemize , and \description . Nested lists can also be created by combining these environments. To create an entry in these environments, the \item command is used.

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:

% . % Lists in beamer (Itemize) \begin \begin \item First item \item Second item \item Third item \end \end

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.

– 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.”).

Here is an example:

% Ordered Lists in beamer \begin \begin \item First item \item Second item \item Third item \end \end

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:

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.

Here is an example:

% . % Description Lists in beamer \begin \begin \item[API] Application Programming Interface \item[ROM] Read Only Memory \item[RAM] Random Access Memory \end \end

Compiling this piece of code yields:

We created a detailed lesson about lists in beamer, check it here. It includes multi-frame list, spacing between list items, change the marker appearance, and much more!

6. Tables and Figures

Tables and figures are created pretty much the same way as it is in LaTeX. Check the following code:

% Tables in beamer \begin \begin \begin <| c || c | c |>\hline No. & Name & Age \\ \hline \hline 1 & John T & 24 \\ 2 & Norman P & 8 \\ 3 & Alex K & 14 \\ \hline \end \caption \end \end

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.

% Figures in beamer \begin \begin \includegraphics[scale=0.5] \caption \end \end

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.

Here is an illustrative example:

% Multicolumn frame in beamer \begin \begin % Column 1 \begin Text here! Text here! . \end % Column 2 \begin \includegraphics[scale=0.5] \end \end \end

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:

The lesson “ Create and Customize Columns in Beamer” provides more details!

8. Blocks in beamer

Information can be displayed in the form of blocks using block environment. These blocks can be of three types :

– Standard block

The standard block is used for general text in presentations. It has a blue color and can be created as follows:

% Blocks in beamer \begin<> \begin This is a simple block in beamer. \end \end

– 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:

% Blocks in beamer \begin<> \begin This is an alert block in beamer. \end \end

– 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:

% Blocks in beamer \begin<> \begin This is an example block in beamer. \end \end

– 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:

% Blocks in beamer \begin \begin It's in \LaTeX<> so it must be true $ a^2 + b^2 = c^2$. \end \begin a = b \end \begin a + b = b + c \end \end

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:

  1. Tag the frame that we want to link to by adding \label or \hypertarget commands.
  2. Create a hyperlink text using the command: \hyperlink
  3. If you would like to create a button style, put “click here” inside the command \hyperlink>
  • We reached the end of this quick guide to LaTeX presentations. If you would like to go into details, check the beamer free course!

    About LaTeX-Beamer.com

    LaTeX-Beamer.com is a personal website about creating stylish and modern presentations in LaTeX, through step-by-step lessons.