top of page

Sample beamer presentation

Please copy the text below and paste it into Overleaf/your favourite LaTeX editor to play around.

If you would like to see the example of an imported graphic (of a meerkat!), make sure you have saved the image as meerkat.png in the same folder as your tex file/ uploaded it to your Overleaf project and then delete the '%' on the line next to the purple star (see below). You should then hopefully be able to see the meerkat in your presentation!

\documentclass{beamer}

\setbeamertemplate{navigation symbols}{}%remove navigation symbols

\def\para{\vspace{0.35cm}}
\def\paraa{\vspace{0.5cm}}


\title{A sample Beamer presentation}
\author{Based on a presentation by Dr Charles Walkden}
\date{February 2023}

\begin{document}

%
% A slide (or frame) starts with \frame{  and ends with }
%
\frame{
\titlepage % Produces a title page
}

\frame{  % Starts a new frame/slide
\frametitle{Introduction}  % Sets the title for this slide

This slide contains the introduction...

\para % Beamer is very bad at adding enough vertical space.  I defined the \para macro to add a bit more vertical space between paragraphs.
...and not much else apart from some mathematics such as $f(x)=x^2$ and
\[
\int_0^1 f(x)\,dx = \frac{1}{3}.
\]
}  % End of this slide

\frame{
\frametitle{Using pauses}

This slide \pause demonstrates the \texttt{$\backslash$pause} command.

\pause
\begin{itemize}
\item
This allows you to press space or right-arrow to reveal the next line on the slide
\pause 
\item
in order
\pause
\item
working down the slide
\end{itemize}
}

\frame{
\frametitle{Using the uncover command}

\uncover<1->{The \texttt{$\backslash$uncover} command allows you to reveal things in a different order than just working down the page.  This is the first thing to be revealed.}

\para
\uncover<3->{This is the third thing to be revealed}

\para
\uncover<2->{This is the second thing to be revealed}

\para
\uncover<4-5>{This is the fourth thing to be revealed.  It will only be here for the 4th and 5th steps in this slide.}

\para
\uncover<5->{This is the fifth thing to be revealed.  Press space again and the text immediately above should disappear and the remaining text will shift upwards...}

\para
\uncover<6->{...and it has!}

}

\frame{
\frametitle{Using the only command}

\only<1-3>{The \texttt{$\backslash$only} command allows you to have certain parts of the slide appear and disappear during parts of that slide.  This paragraph should only be visible for the first 3 parts of this slide.}

\para
\uncover<2->{This is the second piece of text to appear}

\para
\uncover<3->{This is the third piece of text to appear.  Next time you press space, the top paragraph should disappear...}

\para
\uncover<4->{...and it has!}

}

\frame{
\frametitle{Two (or more) columns in Beamer}

\begin{tabular}{ll}
\begin{minipage}{50mm}
Sometimes when designing slides, you want to arrange things next to each other, perhaps some explanatory text and an image.  

\para
The best way to do this is by using the tabular environments (and setting up minipages within each environment), as in this slide.
\end{minipage}
&
\begin{minipage}{50mm}
\begin{center}
%\includegraphics[width=40mm, angle=270]{meerkat.png} %This meerkat is commented out, unless you'd like to download it from the webpage! Save meerkat.png in the same folder as this tex file (or upload it to the project on Overleaf) and uncomment the line to see him!

\tiny{A caption to point out that this is a meerkat}
\end{center}
\end{minipage}
\end{tabular}
}

\frame{
\frametitle{Customising Beamer}

The default style for Beamer is pretty basic.  You've probably seen it a lot in short videos in your course units.

\para
There are lots of pre-defined style files to pretty up the slides.  Most add visual distractions that don't help readability.  Some (eg metropolis) are quite good.  

\para
Google `Beamer style files' if you want more info.
}

\end{document}

bottom of page