LaTeX Tips
Using Verbatim in Beamer
To use \verb
, \verbatim
, or \Verbatim
in Beamer, we need to pass
[fragile]
option to the frame.
1\begin{frame}[fragile]
2 \frametitle{a fragile frame}
3 \begin{verbatim}
4some verbatim text here
5 \end{verbatim}
6\end{frame}
Also be mindful of the whitespace at the beginning of your vebatim portion. Although LaTeX usually takes care of whitespaces properly, since it’s a verbatim portion, LaTeX will render exactly as you put it.
Duplicate a Slide in Beamer
1\documentclass{beamer}
2
3\title[Short title]{The title}
4\author[Authors]{Author 1 \and Author 2}
5\date{\today}
6\begin{document}
7\begin{frame}[label=firstframe]
8\titlepage
9\end{frame}
10
11% ...
12
13\againframe{firstframe}
14\end{document}