P1S2 Lab-10 LaTeX-Beamer Manual
P1S2 Lab-10 LaTeX-Beamer Manual
\documentclass{beamer}
%Information to be included in the title page:
\title{Sample title}
\author{Anonymous}
\institute{Overleaf}
\date{2021}
\begin{document}
\frame{\titlepage}
\begin{frame}
\frametitle{Sample frame title}
This is some text in the first frame. This is some text in the first frame. This is
some text in the first frame.
\end{frame}
\end{document}
After compilation, a two-page PDF file will be produced. The first page is the
titlepage, and the second one contains sample content.
The frame environment creates the second slide, the self-descriptive command
\frametitle{Sample frame title} is optional.
It is worth noting that in beamer the basic container is a frame. A frame is not
exactly equivalent to a slide, one frame may contain more than one slides. For
example, a frame with several bullet points can be set up to produce a new slide
to reveal each consecutive bullet point.
The distribution of each element in the title page depends on the theme, see the
Themes subsection for more information. Here is a description of each command:
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents
\end{frame}
As you see, is simple. Inside the frame environment you set the title and add the
command \titlepage.
It's also possible to put the table of contents at the beginning of each section and
highlight the title of the current section. Just add the code below to the preamble
of your LATEX document:
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[currentsection]
\end{frame}
}
If you use \AtBeginSubsection[] instead of \AtBeginSection[], the table of contents
will appear at the beginning of each subsection.
\begin{itemize}
\item<1-> Text visible on slide 1
\item<2-> Text visible on slide 2
\item<3> Text visible on slide 3
\item<4-> Text visible on slide 4
\end{itemize}
\end{frame}
These effects can be applied to any type of text, not only to the itemize
environment. There's a second command whose behaviour is similar, but it's
simpler since you don't have to specify the slides where the text will be unveiled.
\begin{frame}
In this slide \pause
This code will generate three slides to add a visual effect to the presentation.
\pause will prevent the text below this point and above the next \pause
declaration to appear in the current slide.
\begin{block}{Remark}
Sample text
\end{block}
\begin{alertblock}{Important theorem}
Sample text in red box
\end{alertblock}
\begin{examples}
Sample text in green box. The title of the block is ``Examples".
\end{examples}
\end{frame}