Create a presentation in LaTeX (beamer)
Use the document class beamer. Each slide is a frame environment, and the result is a PDF with one page per slide.
The snippets use the document class beamer.
Smallest presentation
\title, \author, \institute and \date store the data in the preamble, and \titlepage inside a frame prints it. The braces after \begin{frame} hold the title of the slide; a second pair of braces adds a subtitle.
Complete document:
\documentclass{beamer}
\title{Measuring Wind Speed with Ultrasound}
\author{Anna Schmidt}
\institute{Example University}
\date{12 May 2025}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Motivation}{Why a new sensor}
\begin{itemize}
\item Cup anemometers wear out.
\item Ultrasonic sensors have no moving parts.
\end{itemize}
\end{frame}
\end{document}Sections and an outline slide
\section stands between the frames and prints nothing on its own. \tableofcontents inside a frame lists the sections; the list is complete after the second run. The code in \AtBeginSection is inserted at the start of every section, here an outline slide on which the option currentsection fades the other sections.
Complete document:
\documentclass{beamer}
\AtBeginSection{
\begin{frame}{Outline}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\section{Motivation}
\begin{frame}{Motivation}
Cup anemometers wear out.
\end{frame}
\section{Method}
\begin{frame}{Method}
The sensor measures the travel time of sound.
\end{frame}
\end{document}Text and image side by side
Each column inside columns takes its width as argument. The columns are centred vertically against each other; \begin{columns}[T] aligns their top edges instead. beamer loads graphicx itself, so \includegraphics works without \usepackage{graphicx}.
\begin{frame}{Test setup}
\begin{columns}
\begin{column}{0.55\textwidth}
\begin{itemize}
\item Two transducers face each other.
\item The distance is 20 cm.
\end{itemize}
\end{column}
\begin{column}{0.4\textwidth}
\includegraphics[width=\linewidth]{image.png}
\end{column}
\end{columns}
\end{frame}Highlighted blocks
The argument is the title of the block; empty braces give a block without title. alertblock uses red and exampleblock green. In the default theme only the block titles are coloured; themes such as Madrid put a coloured box around the block, see Change the theme and colours of a beamer presentation in LaTeX.
\begin{frame}{Result}
\begin{block}{Finding}
The error stays below 2 percent.
\end{block}
\begin{alertblock}{Limitation}
Heavy rain disturbs the signal.
\end{alertblock}
\begin{exampleblock}{Example}
At 10 m/s the sensor shows 9.8 m/s.
\end{exampleblock}
\end{frame}Slides in the format 16:9
Without the option, a slide measures 128 mm × 96 mm (4:3). aspectratio=169 gives 160 mm × 90 mm, and aspectratio=1610 gives 160 mm × 100 mm. The slide is small, so the standard font size of 11 pt looks large once the PDF fills the screen.
Complete document:
\documentclass[aspectratio=169]{beamer}
\begin{document}
\begin{frame}{Wide slide}
This slide has the format 16:9.
\end{frame}
\end{document}Pitfalls
- A frame that contains
verbatimor\verbneeds the optionfragile:\begin{frame}[fragile]{Title}. Without it, averbatimenvironment stops the run with the error File ended while scanning use of \@xdblarg. beamerdoes not break a frame that is too full: the content runs past the bottom edge, and the log reports an overfull\vbox(Overfull \vbox (55.18915pt too high) has occurred while \output is active). Split the content yourself, or set\begin{frame}[allowframebreaks]{Title}, which continues on further slides and numbers their titles with I, II, III.- The content of a frame is centred vertically.
\begin{frame}[t]{Title}starts it at the top.
Compiled with pdfLaTeX from TeX Live 2023.