Beamer Presentations

Beamer Presentations

Topic: LaTeX Lesson: 12 of 16 Prerequisites: Basic LaTeX document structure (Lesson 1), figures and tables (Lesson 5) Objective: Master the Beamer class for creating professional presentations with overlays, themes, animations, and advanced features

Introduction

Beamer is a LaTeX document class for creating presentation slides (slideshows). Unlike PowerPoint or Google Slides, Beamer presentations are created using code, ensuring consistent typography, easy version control, seamless integration of mathematical formulas, and programmatic control over slide content. Beamer is the standard for academic and technical presentations in mathematics, physics, computer science, and engineering.

What is Beamer?

Beamer creates PDF presentations with: - Frames (slides): Individual presentation pages - Overlays: Incremental revelation of content - Themes: Professional visual styling - Navigation: Automatic table of contents, section links - Animations: Smooth transitions between content states

Basic Structure

Minimal Beamer Document

\documentclass{beamer}

\title{My Presentation}
\author{John Doe}
\date{\today}

\begin{document}

\frame{\titlepage}

\begin{frame}{First Slide}
  Content goes here.
\end{frame}

\begin{frame}{Second Slide}
  More content.
\end{frame}

\end{document}

Document Components

\documentclass{beamer}

% Preamble: packages, theme, metadata
\usepackage{graphicx}
\usetheme{Madrid}

\title{Advanced Machine Learning}
\subtitle{Deep Neural Networks}
\author{Jane Smith}
\institute{University of Example}
\date{March 2024}

\begin{document}

% Title frame
\frame{\titlepage}

% Content frames
\begin{frame}{Introduction}
  Content...
\end{frame}

\end{document}

Title Page

Title Page Elements

\title{Main Title}
\subtitle{Optional Subtitle}
\author{Author Name}
\institute{Institution Name}
\date{\today}  % or specific date

% Create title frame
\frame{\titlepage}

Multiple Authors

\author{
  John Doe\inst{1} \and
  Jane Smith\inst{2}
}
\institute{
  \inst{1}University of Example \\
  \inst{2}Institute of Technology
}

Custom Title Page

\title[Short Title]{Very Long Presentation Title That Might Not Fit}
\author[J. Doe]{John Doe}
\institute[Uni]{University of Example}
\date[2024]{March 15, 2024}

% Short forms appear in footline/headline

Themes

Beamer provides complete themes and individual theme components.

Complete Themes

\usetheme{default}
\usetheme{AnnArbor}
\usetheme{Antibes}
\usetheme{Bergen}
\usetheme{Berkeley}
\usetheme{Berlin}
\usetheme{Boadilla}
\usetheme{CambridgeUS}
\usetheme{Copenhagen}
\usetheme{Darmstadt}
\usetheme{Dresden}
\usetheme{Frankfurt}
\usetheme{Goettingen}
\usetheme{Hannover}
\usetheme{Ilmenau}
\usetheme{JuanLesPins}
\usetheme{Luebeck}
\usetheme{Madrid}
\usetheme{Malmoe}
\usetheme{Marburg}
\usetheme{Montpellier}
\usetheme{PaloAlto}
\usetheme{Pittsburgh}
\usetheme{Rochester}
\usetheme{Singapore}
\usetheme{Szeged}
\usetheme{Warsaw}
% Metropolis theme (requires manual installation)
\usetheme{metropolis}

Theme Examples

% Classic academic style
\documentclass{beamer}
\usetheme{Madrid}
\usecolortheme{beaver}

\begin{document}
\begin{frame}{Example}
  Content with Madrid theme.
\end{frame}
\end{document}

Color Themes

\usecolortheme{default}
\usecolortheme{albatross}
\usecolortheme{beaver}
\usecolortheme{beetle}
\usecolortheme{crane}
\usecolortheme{dolphin}
\usecolortheme{dove}
\usecolortheme{fly}
\usecolortheme{lily}
\usecolortheme{orchid}
\usecolortheme{rose}
\usecolortheme{seagull}
\usecolortheme{seahorse}
\usecolortheme{whale}
\usecolortheme{wolverine}

Combining Theme and Color

\documentclass{beamer}
\usetheme{Warsaw}
\usecolortheme{seahorse}

\title{Presentation Title}
\author{Author Name}

\begin{document}
\frame{\titlepage}

\begin{frame}{Content}
  This uses Warsaw theme with seahorse colors.
\end{frame}
\end{document}

Font Themes

\usefonttheme{default}
\usefonttheme{serif}
\usefonttheme{structurebold}
\usefonttheme{structureitalicserif}
\usefonttheme{structuresmallcapsserif}

% Combinations
\usefonttheme[onlymath]{serif}  % Serif only for math

Inner and Outer Themes

Inner themes control title page, block styles, etc. Outer themes control headers, footers, sidebars.

Inner Themes

\useinnertheme{default}
\useinnertheme{circles}
\useinnertheme{rectangles}
\useinnertheme{rounded}
\useinnertheme{inmargin}

Outer Themes

\useoutertheme{default}
\useoutertheme{infolines}
\useoutertheme{miniframes}
\useoutertheme{smoothbars}
\useoutertheme{sidebar}
\useoutertheme{split}
\useoutertheme{shadow}
\useoutertheme{tree}
\useoutertheme{smoothtree}

Custom Theme Combination

\documentclass{beamer}

% Build custom theme from components
\useoutertheme{infolines}
\useinnertheme{rounded}
\usecolortheme{orchid}
\usefonttheme{structurebold}

\begin{document}
\begin{frame}{Custom Theme}
  Content...
\end{frame}
\end{document}

Blocks

Blocks highlight important content with colored boxes.

Block Environments

\begin{frame}{Block Examples}

  \begin{block}{Regular Block}
    This is a regular block with a title.
  \end{block}

  \begin{alertblock}{Alert Block}
    This highlights important information.
  \end{alertblock}

  \begin{exampleblock}{Example Block}
    This shows an example.
  \end{exampleblock}

\end{frame}

Blocks with Math

\begin{frame}{Theorem}

  \begin{theorem}[Pythagorean Theorem]
    For a right triangle with legs $a$ and $b$ and hypotenuse $c$:
    \[
      a^2 + b^2 = c^2
    \]
  \end{theorem}

  \begin{proof}
    Proof goes here...
  \end{proof}

\end{frame}

Nested Blocks

\begin{frame}{Nested Blocks}

  \begin{block}{Outer Block}
    Outer content.

    \begin{alertblock}{Inner Alert}
      Important nested information.
    \end{alertblock}

    More outer content.
  \end{block}

\end{frame}

Overlays

Overlays reveal content incrementally, creating dynamic presentations.

The \pause Command

\begin{frame}{Incremental Lists}

  First item appears immediately.

  \pause

  Second item appears after click.

  \pause

  Third item appears after another click.

\end{frame}

\onslide

\begin{frame}{Onslide Example}

  \onslide<1->{This appears on slide 1 and stays.}

  \onslide<2->{This appears on slide 2 and stays.}

  \onslide<3->{This appears on slide 3 and stays.}

  \onslide<1>{This appears only on slide 1.}

\end{frame}

\only

\begin{frame}{Only Example}

  \only<1>{This text appears only on slide 1.}
  \only<2>{This different text appears only on slide 2.}
  \only<3>{Yet another text appears only on slide 3.}

  This text appears on all slides.

\end{frame}

\visible and \invisible

\begin{frame}{Visible Example}

  \visible<1->{Visible from slide 1 onward.}

  \invisible<1>{Invisible on slide 1, visible after.}

  \visible<2-3>{Visible only on slides 2 and 3.}

\end{frame}

\uncover

\begin{frame}{Uncover Example}

  \uncover<1->{Content uncovered from slide 1.}

  \uncover<2->{Content uncovered from slide 2.}

  \uncover<3>{Content visible only on slide 3.}

\end{frame}

Itemize with Overlays

\begin{frame}{Incremental List}

  \begin{itemize}
    \item<1-> First item appears on slide 1
    \item<2-> Second item appears on slide 2
    \item<3-> Third item appears on slide 3
    \item<4-> Fourth item appears on slide 4
  \end{itemize}

\end{frame}

Alternative Itemize Syntax

\begin{frame}{Auto-Incremental List}

  \begin{itemize}[<+->]  % Auto-increment overlays
    \item First item
    \item Second item
    \item Third item
    \item Fourth item
  \end{itemize}

\end{frame}

Overlay Ranges

\begin{frame}{Overlay Ranges}

  \begin{itemize}
    \item<1-3> Visible on slides 1, 2, 3
    \item<2-> Visible from slide 2 onward
    \item<3> Visible only on slide 3
    \item<1,3,5> Visible on slides 1, 3, 5
  \end{itemize}

\end{frame}

Frame Options

Fragile Frames

Required for frames containing verbatim text or code listings.

\begin{frame}[fragile]{Code Example}

  \begin{verbatim}
    def hello():
        print("Hello, World!")
  \end{verbatim}

\end{frame}

Allowframebreaks

Automatically breaks long content across multiple slides.

\begin{frame}[allowframebreaks]{Long Content}

  Long content that may span multiple slides...
  \begin{itemize}
    \item Item 1
    \item Item 2
    % ... many items
    \item Item 50
  \end{itemize}

\end{frame}

Plain Frames

Remove headers/footers for specific slides.

\begin{frame}[plain]
  \titlepage  % Title page often uses plain
\end{frame}

\begin{frame}[plain]
  \begin{center}
    {\Huge Thank You!}
  \end{center}
\end{frame}

Shrink Frames

Automatically shrink content to fit.

\begin{frame}[shrink=10]{Large Content}
  % Content that's slightly too large
  % Will be shrunk by 10%
\end{frame}

Frame Labels

\begin{frame}[label=important]{Important Slide}
  Key content here.
\end{frame}

% Later, jump back to this frame
\againframe{important}

Columns

Basic Two-Column Layout

\begin{frame}{Two Columns}

  \begin{columns}

    \begin{column}{0.5\textwidth}
      Left column content.
      \begin{itemize}
        \item Point 1
        \item Point 2
      \end{itemize}
    \end{column}

    \begin{column}{0.5\textwidth}
      Right column content.
      \begin{itemize}
        \item Point A
        \item Point B
      \end{itemize}
    \end{column}

  \end{columns}

\end{frame}

Unequal Columns

\begin{frame}{Unequal Columns}

  \begin{columns}

    \begin{column}{0.3\textwidth}
      Narrow left column.
    \end{column}

    \begin{column}{0.7\textwidth}
      Wide right column with more content.
    \end{column}

  \end{columns}

\end{frame}

Columns with Images

\begin{frame}{Image and Text}

  \begin{columns}

    \begin{column}{0.5\textwidth}
      \includegraphics[width=\textwidth]{image.pdf}
    \end{column}

    \begin{column}{0.5\textwidth}
      Explanation of the image:
      \begin{itemize}
        \item Feature 1
        \item Feature 2
        \item Feature 3
      \end{itemize}
    \end{column}

  \end{columns}

\end{frame}

Column Alignment

\begin{frame}{Aligned Columns}

  \begin{columns}[T]  % Top alignment

    \begin{column}{0.5\textwidth}
      Short content.
    \end{column}

    \begin{column}{0.5\textwidth}
      Much longer content that extends down the page
      and demonstrates top alignment of columns.
    \end{column}

  \end{columns}

\end{frame}

Figures and Tables

Figures in Beamer

\begin{frame}{Figure Example}

  \begin{figure}
    \centering
    \includegraphics[width=0.6\textwidth]{plot.pdf}
    \caption{Experimental results}
  \end{figure}

\end{frame}

Figures with Overlays

\begin{frame}{Sequential Figures}

  \only<1>{
    \begin{figure}
      \includegraphics[width=0.6\textwidth]{figure1.pdf}
      \caption{First stage}
    \end{figure}
  }

  \only<2>{
    \begin{figure}
      \includegraphics[width=0.6\textwidth]{figure2.pdf}
      \caption{Second stage}
    \end{figure}
  }

\end{frame}

Tables in Beamer

\begin{frame}{Table Example}

  \begin{table}
    \centering
    \caption{Experimental results}
    \begin{tabular}{lcc}
      \hline
      Method & Accuracy & Time (s) \\
      \hline
      Method A & 0.95 & 10 \\
      Method B & 0.97 & 15 \\
      Method C & 0.93 & 8 \\
      \hline
    \end{tabular}
  \end{table}

\end{frame}

Tables with Overlays

\begin{frame}{Incremental Table}

  \begin{table}
    \begin{tabular}{lcc}
      \hline
      Method & Accuracy & Time \\
      \hline
      \onslide<1->{Method A & 0.95 & 10 \\}
      \onslide<2->{Method B & 0.97 & 15 \\}
      \onslide<3->{Method C & 0.93 & 8 \\}
      \hline
    \end{tabular}
  \end{table}

\end{frame}

Animations

Transition Effects

\begin{frame}{Transition Examples}

  \transfade  % Fade transition

  Content here.

\end{frame}

\begin{frame}

  \transdissolve  % Dissolve transition

  More content.

\end{frame}

Available Transitions

\transfade[duration=0.5]
\transdissolve
\transblindshorizontal
\transblindsvertical
\transboxin
\transboxout
\transwipe
\transglitter
\transsplithorizontalin
\transsplitverticalin

Transition Duration

\begin{frame}

  \transfade[duration=2]  % 2-second fade

  Content...

\end{frame}

Speaker Notes

Adding Notes

\begin{frame}{Main Content}
  Slide content visible to audience.

  \note{
    These are speaker notes visible only to presenter.
    \begin{itemize}
      \item Remember to mention X
      \item Don't forget Y
      \item Time estimate: 2 minutes
    \end{itemize}
  }
\end{frame}

Showing Notes

\documentclass{beamer}

% Show notes on second screen (for dual-monitor setup)
\setbeameroption{show notes on second screen}

% Or show notes below slides
% \setbeameroption{show notes}

\begin{document}
% Frames with \note{} commands
\end{document}

Handout Mode

Creating Handouts

\documentclass[handout]{beamer}

% All overlays collapsed to single slides
% No transitions

\begin{document}
% Your frames here
\end{document}

Handout with Multiple Slides per Page

\documentclass[handout]{beamer}
\usepackage{pgfpages}

% 2 slides per page
\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]

% 4 slides per page
% \pgfpagesuselayout{4 on 1}[a4paper,landscape,border shrink=5mm]

\begin{document}
% Your frames here
\end{document}

Custom Styling

Modifying Templates

\documentclass{beamer}
\usetheme{Madrid}

% Remove navigation symbols
\setbeamertemplate{navigation symbols}{}

% Custom footline
\setbeamertemplate{footline}{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1ex,left]{author in head/foot}%
      \usebeamerfont{author in head/foot}\hspace*{2ex}\insertshortauthor
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1ex,right]{title in head/foot}%
      \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{2ex}
      \insertframenumber{} / \inserttotalframenumber
    \end{beamercolorbox}
  }%
  \vskip0pt%
}

\begin{document}
% Content
\end{document}

Custom Colors

\documentclass{beamer}

\definecolor{myred}{RGB}{200,0,0}
\definecolor{myblue}{RGB}{0,100,200}

\setbeamercolor{structure}{fg=myblue}
\setbeamercolor{block title}{bg=myred,fg=white}
\setbeamercolor{block body}{bg=myred!10}

\begin{document}
\begin{frame}
  \begin{block}{Custom Colored Block}
    Content with custom colors.
  \end{block}
\end{frame}
\end{document}

Custom Block Styles

\documentclass{beamer}

% Define new block environment
\newenvironment<>{importantblock}[1]{%
  \setbeamercolor{block title}{fg=white,bg=red!75!black}%
  \setbeamercolor{block body}{fg=black,bg=red!10}%
  \begin{block}{#1}}{\end{block}}

\begin{document}
\begin{frame}
  \begin{importantblock}{Critical Information}
    This uses a custom block style.
  \end{importantblock}
\end{frame}
\end{document}

Complete Examples

Academic Presentation

\documentclass{beamer}
\usetheme{Madrid}
\usecolortheme{beaver}

\usepackage{graphicx}
\usepackage{amsmath}

\title{Deep Learning for Image Classification}
\subtitle{Convolutional Neural Networks}
\author{Jane Doe}
\institute{University of Example}
\date{March 15, 2024}

\begin{document}

\frame{\titlepage}

\begin{frame}{Outline}
  \tableofcontents
\end{frame}

\section{Introduction}

\begin{frame}{Problem Statement}
  \begin{itemize}[<+->]
    \item Image classification is a fundamental task
    \item Traditional methods have limitations
    \item Deep learning offers superior performance
  \end{itemize}
\end{frame}

\section{Methods}

\begin{frame}{Convolutional Neural Networks}
  \begin{columns}
    \begin{column}{0.5\textwidth}
      \begin{itemize}
        \item Convolution layers
        \item Pooling layers
        \item Fully connected layers
      \end{itemize}
    \end{column}
    \begin{column}{0.5\textwidth}
      \includegraphics[width=\textwidth]{cnn_architecture.pdf}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Mathematical Formulation}
  \begin{block}{Convolution Operation}
    \[
      (f * g)(t) = \int_{-\infty}^{\infty} f(\tau) g(t - \tau) d\tau
    \]
  \end{block}

  \begin{alertblock}{Discrete Convolution}
    \[
      (f * g)[n] = \sum_{m=-\infty}^{\infty} f[m] g[n - m]
    \]
  \end{alertblock}
\end{frame}

\section{Results}

\begin{frame}{Experimental Results}
  \begin{table}
    \caption{Classification accuracy}
    \begin{tabular}{lcc}
      \hline
      Model & Accuracy & Parameters \\
      \hline
      \onslide<2->{LeNet-5 & 98.5\% & 60K \\}
      \onslide<3->{AlexNet & 99.1\% & 60M \\}
      \onslide<4->{ResNet-50 & 99.7\% & 25M \\}
      \hline
    \end{tabular}
  \end{table}
\end{frame}

\section{Conclusion}

\begin{frame}{Conclusion}
  \begin{enumerate}[<+->]
    \item CNNs achieve state-of-the-art results
    \item Deeper networks improve performance
    \item Future work: efficiency and interpretability
  \end{enumerate}
\end{frame}

\begin{frame}[plain]
  \begin{center}
    {\Huge Thank You!}

    \vspace{1cm}

    Questions?
  \end{center}
\end{frame}

\end{document}

Business Presentation

\documentclass{beamer}
\usetheme{Warsaw}
\usecolortheme{orchid}

\title{Q1 2024 Sales Report}
\author{Marketing Team}
\date{April 2024}

\begin{document}

\frame{\titlepage}

\begin{frame}{Executive Summary}
  \begin{block}{Key Highlights}
    \begin{itemize}[<+->]
      \item 25\% revenue growth year-over-year
      \item Expanded to 5 new markets
      \item Customer satisfaction: 4.8/5.0
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}{Revenue by Region}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      \begin{itemize}
        \item North America
        \item Europe
        \item Asia-Pacific
        \item Latin America
      \end{itemize}
    \end{column}
    \begin{column}{0.6\textwidth}
      \includegraphics[width=\textwidth]{revenue_chart.pdf}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Next Steps}
  \begin{enumerate}
    \item<1-> Launch new product line
    \item<2-> Increase marketing budget
    \item<3-> Hire 50 new employees
  \end{enumerate}
\end{frame}

\begin{frame}[plain]
  \centering
  {\Huge Questions?}
\end{frame}

\end{document}

Exercises

Exercise 1: Basic Presentation

Create a 5-slide presentation about your favorite topic: - Title slide with your name - Outline slide with sections - At least 3 content slides - Use a theme of your choice - Include at least one list

Exercise 2: Overlays

Create a presentation demonstrating different overlay techniques: - One slide using \pause - One slide using \only - One slide using \uncover - One slide with incremental itemize using <+-> - One slide showing overlay ranges (e.g., <1-3>, <2->)

Exercise 3: Blocks and Themes

Create a presentation showcasing blocks: - Try 3 different themes (create separate PDFs or use \only) - Include regular block, alertblock, and exampleblock - Create a theorem and proof - Use a color theme that complements your chosen theme

Exercise 4: Columns Layout

Create a presentation with column layouts: - One slide with two equal columns - One slide with unequal columns (30/70 split) - One slide with text in one column and image in other - One slide with three columns

Exercise 5: Figures and Tables

Create a data presentation: - One slide with a figure (create a simple plot or use placeholder) - One slide with a table of data - One slide revealing table rows incrementally using overlays - Include captions for both figure and table

Exercise 6: Custom Styling

Customize a Beamer presentation: - Remove navigation symbols - Create custom footline showing author, title, and page numbers - Define custom color scheme - Create a custom block environment with unique styling

Exercise 7: Academic Presentation

Create a 10-slide academic presentation structure: - Title page - Table of contents - Introduction section (2 slides) - Methods section (3 slides) - Results section (2 slides) - Conclusion slide - Thank you slide (plain frame) - Use overlays strategically - Include at least one figure and one table

Exercise 8: Animations

Create a presentation demonstrating transitions: - Use at least 3 different transition effects - Create a slide that swaps between different images using \only - Create an incremental build of a complex diagram - Set custom transition durations

Exercise 9: Speaker Notes

Create a presentation with speaker notes: - 5 content slides - Each slide must have speaker notes - Notes should include talking points and time estimates - Generate a version with notes visible

Exercise 10: Complete Professional Presentation

Create a complete 15-slide professional presentation: - Choose an appropriate theme for your content - Include title page, outline, multiple sections - Use columns for layout variety - Include figures and tables - Use overlays effectively (not on every slide) - Include speaker notes - Create both presentation and handout versions - Custom footer with page numbers - Professional color scheme - Final "Questions" slide

Summary

In this lesson, you learned:

  • Beamer fundamentals: Document structure, frames, and basic syntax
  • Title page: Creating professional title slides with metadata
  • Themes: Using complete themes (Madrid, Berlin, Warsaw, etc.)
  • Color themes: Customizing color schemes (beaver, orchid, seahorse, etc.)
  • Font themes: Controlling typography (serif, structurebold, etc.)
  • Inner/outer themes: Fine-grained control over presentation elements
  • Blocks: Highlighting content with block, alertblock, and exampleblock
  • Overlays: Creating dynamic reveals with \pause, \only, \onslide, \uncover, \visible
  • Frame options: Using [fragile], [allowframebreaks], [plain], [shrink]
  • Columns: Creating multi-column layouts for better content organization
  • Figures and tables: Including graphics and data in presentations
  • Animations: Applying transition effects between slides
  • Speaker notes: Adding presenter notes and dual-screen support
  • Handout mode: Generating printable handouts with multiple slides per page
  • Custom styling: Modifying templates, colors, and creating custom elements

Beamer provides professional, consistent, and maintainable presentations with LaTeX's strengths in typography, mathematics, and version control. These skills enable you to create presentations that meet academic and professional standards while maintaining full programmatic control over content and appearance.


Previous: 11_TikZ_Advanced.md Next: 13_Bibliography_Management.md

to navigate between lessons