A Minimal Beamer Template for MiKTeX 2.9
At a glance
- 1. Check Beamer
Make sure the Beamer package is installed in your MiKTeX setup.
- 2. Paste the template
Save the complete example as a .tex file and replace its title, author, and slide content.
- 3. Compile with pdfLaTeX
Run pdfLaTeX; compile again if the table of contents or references need updating.
- 4. Fix missing packages
Use MiKTeX's package manager to install missing packages rather than copying theme files manually.
A Beamer presentation is a LaTeX document with slides represented by frame environments. MiKTeX 2.9 does not require a special presentation template: a small standard Beamer file is enough, provided the Beamer package is installed.
The example below uses the Madrid theme, which is included with Beamer. You can compile it with pdfLaTeX and then adapt the title information and frames for your talk.
Minimal working template
\documentclass{beamer}
\usetheme{Madrid}
\title[Short title]{A Sample Presentation}
\author{Alex Smith}
\institute{Example University}
\date{\today}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\section{Introduction}
\begin{frame}{First slide}
This is a slide in a Beamer presentation.
\begin{itemize}
\item Add content with ordinary LaTeX commands.
\item Use one frame for each slide, or add overlays when needed.
\end{itemize}
\end{frame}
\section{Conclusion}
\begin{frame}{Questions}
Thank you.
\end{frame}
\end{document}
Save the text in a file such as presentation.tex. In MiKTeX, select pdfLaTeX as the compiler and build the file. The document class, \documentclass{beamer}, loads Beamer; \usetheme{Madrid} selects a built-in visual theme. The title, author, institute, and date commands provide the information used by \titlepage.
Add slides and sections
A frame normally produces one slide; overlays can make a single frame produce multiple slides. In \begin{frame}{First slide}, the braced argument is the slide title; it is optional. The material between \begin{frame} and \end{frame} is its content. You can use common LaTeX environments inside a frame, including itemize, enumerate, and equation.
Sections organize the presentation and provide entries for \tableofcontents. In this template, the outline frame comes before the section declarations, so the table of contents will generally be empty on the first run; compile a second time to display it. After adding or renaming sections, compile again so the table of contents can update. More complicated presentations may need additional compilations to resolve references and navigation information; even a basic presentation with a table of contents may need a second run.
Installing Beamer in MiKTeX 2.9
If compilation stops with an error such as beamer.cls not found, MiKTeX cannot find the Beamer package in the installation being used. Open the MiKTeX Package Manager or MiKTeX Console for your installation and install the package named beamer. If MiKTeX offers to install a missing package during compilation, you can allow that installation if it is appropriate for your setup.
MiKTeX installations can have user-level and administrator-level package setups. Install Beamer in the same setup that your LaTeX compiler uses; otherwise, installing it in one location may not resolve the error in another. MiKTeX 2.9 is an older release, so package manager screens and update procedures can differ between installations. If package installation fails, consult the documentation for the specific MiKTeX version and consider moving to a supported, updated release.
Choosing a different theme
To change the presentation’s appearance, replace Madrid with another theme name, for example:
\usetheme{Berlin}
Use the theme’s conventional spelling and capitalization in the command. Beamer supplies many standard themes as part of its package, but a custom theme may require separate files. If the error names a file such as beamerthemeExample.sty, check whether that theme is installed and whether its name is spelled correctly. The template above deliberately uses a standard theme to avoid a dependency on a downloaded template or custom style file.
Common mistakes
- Using
articleinstead ofbeamer: A document beginning with\documentclass{article}is not a Beamer slide deck. Use\documentclass{beamer}for the presentation. - Leaving out
\end{document}: Every environment, including the document itself, must be closed. - Confusing a theme error with a compiler error: If
beamer.clsis missing, install Beamer. If only a custom theme file is missing, install that theme or choose one included with Beamer, such as Madrid. - Compiling a different file: Make sure the editor or build command is compiling the
.texfile you just saved, not another document with a similar name. - Treating an outdated installation as a template problem: MiKTeX 2.9’s age can matter when packages or tools are missing. A different preamble will not repair a package installation that is incomplete or no longer maintained.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.