Presentations and Posters

How to Make a Presentation in LaTeX with Beamer

Learn how to make a presentation in LaTeX with Beamer, from a minimal slide file and themes to overlays, figures, tables, and compiling a PDF.

On this page
  1. What Beamer is
  2. What you need
  3. Making the deck step by step
  4. Frames, titles and the outline
  5. Themes and aspect ratio
  6. Showing content step by step
  7. Columns, figures and tables
  8. Common problems
  9. Can LaTeX generate PowerPoint files?
  10. Next steps

What Beamer is

Beamer is a LaTeX document class for making slide presentations. You write a .tex file much as you would write a paper, and LaTeX produces a PDF in which each frame becomes a slide. Because equations, code listings, and citations work the same way they do in a LaTeX document, Beamer is often used for talks in mathematics, physics, computer science, and engineering.

What you need

  • A LaTeX distribution. TeX Live works on Linux and Windows, MacTeX on macOS, and MiKTeX is another option on Windows.
  • A text editor with LaTeX support, or an online editor such as Overleaf, which needs no local install.
  • Some familiarity with LaTeX basics. Commands start with a backslash, and arguments go in curly braces.

Making the deck step by step

A minimal Beamer file

Save this as talk.tex:

\documentclass{beamer}

\title{My First Talk}
\author{Your Name}
\date{\today}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{Introduction}
  \begin{itemize}
    \item First point
    \item Second point
  \end{itemize}
\end{frame}

\end{document}

Each frame is one slide. The text in braces after \begin{frame} is the frame title, and \titlepage prints the title, author, and date.

Compiling the file

Run pdflatex talk.tex in a terminal. Alternatively, run latexmk -pdf talk.tex, which runs LaTeX as many times as needed. Open the resulting talk.pdf to see your slides. If you use a table of contents or cross-references, compile at least twice so the numbers settle.

Frames, titles and the outline

  • Put each slide’s content between \begin{frame} and \end{frame}.
  • Add \framesubtitle{...} under a frame title for a smaller line of text.
  • Use \section{...} to group slides, and place \tableofcontents in a frame to show an outline slide.

Themes and aspect ratio

Beamer includes several built-in themes. Add one to the preamble, which is the part of the file before \begin{document}:

\usetheme{Madrid}
\usecolortheme{beaver}

A theme sets the layout, and a color theme sets the colors. You can combine them.

For a widescreen (16:9) deck, pass an option to the class:

\documentclass[aspectratio=169]{beamer}

Showing content step by step

Overlays let content appear over several slides. The simplest tool is \pause, which starts a new slide each time it appears:

\begin{frame}{Overlays}
  First, we state the problem.
  \pause
  Then we state the method.
\end{frame}

For more control, add an overlay specification such as <2-> to a list item. The item then appears from the second slide onward:

\begin{frame}{Key points}
  \begin{itemize}
    \item<1-> First point
    \item<2-> Second point
    \item<3-> Third point
  \end{itemize}
\end{frame}

The step-by-step reveals guide covers the other overlay commands and when each one fits.

Columns, figures and tables

Use the columns environment for side-by-side content. Beamer loads the graphicx package for you, so \includegraphics works without an extra \usepackage line. File paths are relative to the .tex file.

\begin{frame}{Two columns}
  \begin{columns}[T]
    \begin{column}{0.48\textwidth}
      Text in the left column.
    \end{column}
    \begin{column}{0.48\textwidth}
      \includegraphics[width=\linewidth]{figure.pdf}
    \end{column}
  \end{columns}
\end{frame}

Tables use the same tabular environment you would use in a paper. Equations work as usual: $E = mc^2$ inline, or \[ ... \] on its own line.

Common problems

Code in frames needs [fragile]

A frame that contains verbatim text or \verb needs the fragile option. Without it, LaTeX reports an error:

\begin{frame}[fragile]{Code}
  \begin{verbatim}
  print("hello")
  \end{verbatim}
\end{frame}

Images not found

LaTeX looks for image files relative to the .tex file. If compiling reports a missing file, check the path and the file name, including the extension.

Can LaTeX generate PowerPoint files?

Not directly. LaTeX produces a PDF, and Beamer does too. A PowerPoint .pptx file needs a conversion step or a rebuild. For the options, see the guide to converting Beamer slides to PowerPoint.

Next steps

Once the basic file works, add slides a few at a time and compile after each change, so errors are easy to trace. If you need a large printed sheet rather than slides, see making an A2 poster in LaTeX.

Keep exploring

Guides from other topics

All topics →