Path: blob/main/docs/course-assets/latex-examples/beamer-example.tex
903 views
\documentclass{beamer}1%\documentclass[trans]{beamer}23% use the 'trans' to produce "transperencies"; really this means: something you4% would *print*. -- The \pause command does nothing when the option5% [trans] is used.67\usepackage{palatino}8\usepackage{mathpazo}910\usepackage{graphicx}11%\graphicspath{ {./} }1213%%------------------------------------------------------------14%% some "theorem" commands1516\newtheorem{cor}[theorem]{Corollary}17\newtheorem{prop}[theorem]{Proposition}1819\theoremstyle{remark}20\newtheorem{rem}[theorem]{Remark}212223%%------------------------------------------------------------2425\mode<presentation>26{27\usetheme{Malmoe}28% other options include29% \usetheme{Rochester}30% \usetheme{boxes}31% or ...3233\setbeamercovered{transparent}34}3536\usepackage[english]{babel}3738\usefonttheme{serif}39\useinnertheme{rectangles}4041\title{Example of a beamer presentation}42\subtitle[]{(Illustrating some usage)}4344\date{March 10, 2024}4546\author[] % (optional, use only with lots of authors)47{George McNinch}48\institute% (optional, but mostly needed)49{50Department of Mathematics\\51Tufts University52}5354%\subject{Talks}55% This is only inserted into the PDF information catalog. Can be left56% out.5758% Remove ("comment out") the following code if you do not want the59% table of contents to pop up at the beginning of each subsection:6061\AtBeginSection[]62{63\begin{frame}%<beamer>64\frametitle{Outline}65\tableofcontents[currentsection]66\end{frame}67}686970% If you wish to uncover everything in a step-wise fashion, uncomment71% the following command:7273%\beamerdefaultoverlayspecification{<+->}7475\begin{document}7677\begin{frame}78\titlepage79\end{frame}808182%% I've commented this out since the "pre-section" table of contents will anyhow appear...83%%84% \begin{frame}85% \frametitle{Overview}86% \tableofcontents87% % You might wish to add the option [pausesections]88% \end{frame}8990\section{Beamer warmup}9192\begin{frame}93\frametitle{Beamer concepts}9495\begin{itemize}96\item A slide is the basic unit for a \emph{Beamer} slide-show.97\pause9899\item I've organized this document with \emph{sections}; each section contains a few \emph{frames.}100\pause101102\item When the \textsc{LaTeX} file is \emph{compiled} (say, in \textsc{Overleaf}) the output103is a PDF file that has (at least) a page corresponding to each frame.104\end{itemize}105106\end{frame}107108\begin{frame}109\frametitle{Beamer concepts, p.2}110111\begin{itemize}112\item In fact, if there are \texttt{\textbackslash pause} commands113with a frame, \textsc{LaTeX} will produce multiple pages for the114frame, with material following the \texttt{\textbackslash pause}115\emph{greyed out}.116\pause117\item Using an application for document display, you can use the118resulting PDF to accompany a presentation.119\end{itemize}120\end{frame}121122\section{Graphs}123\begin{frame}124\frametitle{Definition of a graph}125Let's give an example of an \emph{itemized list}: \pause126\begin{itemize}127\item A \emph{graph} \(G = (V,E)\) consists of a set \(V\) of \emph{vertices} and a set \(E\)128of \emph{edges.}129\pause130\item If \(G\) is a \emph{directed graph} then \(E\) is a subset of131the Cartesian product \(V \times V\). An element \(e = (v,w) \in E\)132represents an edge \emph{from} the vertex \(v\) \emph{to} the133vertex \(w\). \pause134\item If \(G\) is an \emph{undirected graph}, then edges may be135represented in the form \(e = [v,w]\) where \(v,w \in V\) are136vertices, and where \([v,w] = [w,v]\).137\end{itemize}138139\end{frame}140141\begin{frame}142\frametitle{Labeled graphs}143144\begin{itemize}145\item If \(G = (V,E)\) is a graph, a labeling of \(G\) is determined by a function146\(f:E \to \mathbb{R}\); thus \(f\) assigns a real number to each edge of the graph.147\pause148\item here is an example of a directed, labeled graph.149150\vfil151%% we only display the graphics on the "second slide" i.e. after152%% the first pause. This is a bit of a hack, but I don't right now153%% know a better approach.154\begin{center}155\only<2>{\includegraphics[scale=.3]{graph-example}}156\end{center}157%% you could just include the graphics without worrying about the \pause's;158%% just comment the above lines and uncomment the following ones:159160%\begin{center}161% \includegraphics[scale=.3]{graph-example}}162%\end{center}163\end{itemize}164165\end{frame}166167168169\end{document}170171172173