\documentclass{beamer}
\usepackage{amssymb}
\usepackage{amsmath}

% for themes, etc.
\usetheme{Malmoe}
%\usetheme{Antibes}
%\usetheme{Pittsburgh}
%\usetheme{boxes}
%\usecolortheme{fly}
%\usecolortheme{beetle}
%\usecolortheme{rose}
%\usecolortheme{orchid}

\usepackage{times}  % fonts are up to you
\usepackage{graphicx}

% these will be used later in the title page
\title{{\sc Beamer} Basics by a Beginner}
\author{Steven Noble }
\date{01/12/2005}


% have this if you'd like a recurring outline
\AtBeginSection[]  % "Beamer, do the following at the start of every section"
{
\begin{frame}<beamer> 
\frametitle{Outline} % make a frame titled "Outline"
\tableofcontents[currentsection]  % show TOC and highlight current section
\end{frame}
}

\begin{document}

\frame{
\titlepage
}

\section{Installing Beamer}

\frame{\frametitle{Windows}
\begin{itemize}
\item<1->Install {\sc MikTex} (Download the installer and doubleclick, allow
the installer to install packages as necessary)
\item<2->Run the {\sc MikTex} package utility 
\item<3->Install {\sc Beamer} Package
\item<4->Allow {\sc MikTex} to install more packages as you go
\end{itemize}
}

\frame{\frametitle{OS X}
\begin{itemize}
\item<1->Install {\sc Fink} (Download and doubleclick)
\item<2->Install {\sc FinkCommander} (Download and Drag-and-Drop)
\item<3->Run {\sc FinkCommander}
\item<4->Install {\sc Beamer} Package
\end{itemize}
}

\begin{frame}[fragile]
\frametitle{Linux}
If you are running {\sc Debian} or {\sc Ubuntu} just run the command
\begin{verbatim}
sudo aptitude install latex-beamer
\end{verbatim}
\pause
If you are running a different distribution just use your package 
manager to install the appropriate package.
\end{frame}

\section{Creating a Basic Presentation}
\subsection{The Necessities}

\begin{frame}[fragile]
\frametitle{The Header}
All you really need in you header is a line like this
\begin{verbatim}
\documentclass{beamer}
\end{verbatim} \pause
However that will leave it looking very bare so you may want to also add the line
\begin{verbatim}
\usetheme{Malmoe}
\end{verbatim} \pause
Also you can add most any other packages and macros you would usually use
in the standard way
\begin{verbatim}
\usepackage{amsthm}
\usepackage{times}  
\usepackage{graphicx}
...
\end{verbatim} 
\end{frame}
\begin{frame}[fragile]
\frametitle{Contextual Information in the Header}
You will probably also want to add in some biographic notes in the header 
like 
\begin{verbatim}
\title{A Banquet of {\sc Beamer} Basics}
\author{Steven Noble}
\date{01/12/2005}
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{The Frame}
The main structure of a presentation is just the slide which is called a 
frame in Beamer.\\ \pause
The simplest way to create a frame is just
\begin{semiverbatim}
\\frame\{\\frametitle\{{\it Frame Title}\}
{\it Content... }
\}
\end{semiverbatim} \pause 
With in a frame you can put \emph<4->{almost} any regular latex that you like.
\end{frame}

\begin{frame}[fragile]
\frametitle{Title Page}
Your first frame will probably be a title page:
\begin{verbatim}
\begin{document}
\frame{ \titlepage }
\end{verbatim}
\pause
With just these tools you can make a pretty nice presentation but really
you would like just a little bit more.
\end{frame}

\subsection{A Little Bit More}
\frame{
\frametitle{Simple Commands}
{\sc Beamer} has included useful environments like
theorem, lemma, proof, definition, corollary and example.  
Note that an environment has to be ended in the same frame it
was started.
Also included is the alert command to bring extra attention to a word.
}

\begin{frame}[fragile]
\frametitle{Example}
For example the code
\begin{semiverbatim}
\\begin\{theorem\}
There are at most \\alert\{six\} 
integral solutions to the equation 
\\[c_1\\theta_1^x + c_2\\theta_2^x 
+c_3\\theta_3^x = 0. \\]
\\end\{theorem\}
\end{semiverbatim}
looks like
\begin{theorem}
There
are at most \alert{six} integral solutions to the equation 
\[c_1\theta_1^x + c_2\theta_2^x +c_3\theta_3^x = 0. \]
\end{theorem}
\end{frame}

\begin{frame}[fragile]
\frametitle{Itemizing}
You can create a list where each point shows up separately 
(this is called showing up in separate {\it overlays}) just by using the code
\begin{semiverbatim}
\\begin\{itemize\}
\\item<1->\{{\it Content}\} \\\\
\\item<2->\{{\it Content}\} \\\\
\\end\{itemize\}
\end{semiverbatim}
\end{frame}

\frame{
\frametitle{Itemize Example}
\begin{itemize}
 \item<1-> Line 1
 \item<2-> Line 2
\end{itemize}
}

\begin{frame}[fragile]
\frametitle{ Pause}
However there is really nothing special about an itemize list.  
You can stop a frame anywhere you like (almost) with the command
\begin{verbatim}
\pause
\end{verbatim}
Note that the {\it pause} command does not put in any carriage return
or spaces so if you want extra space you had better add it  yourself.
\pause Be warned that you can not stick a pause in an align environment.  When
you do funny things start to happen with the slide.
\\
 \pause 
For most presentations these tools will be plenty.  
However {\sc Beamer} can do much more than this so let's explore a few
other things we can do.
\end{frame}

\section{Getting a little fancy}
\subsection{Organization}

\begin{frame}[fragile]
\frametitle{Sections and Subsections}
You may have noticed the section structure that is illustrated in the frames.  
This is simply done by adding section and subsection tags between the 
frames like so
\begin{semiverbatim}
\}
\\section\{Getting a little fancy\}
\\subsection\{Organization\}
\\frame\{
\end{semiverbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Table of Contents}
\pause You can also set a recurring table of contents to appear by adding the
following to the header 
\begin{semiverbatim}
\\AtBeginSection[]  
\{
\\begin\{frame\}<beamer> 
\\frametitle\{Outline\} 
\\tableofcontents[currentsection]  
\\end\{frame\}
\}
\end{semiverbatim}
\pause
This can be changed to appear at the beginning of subsections 
by changing "Section" to "Subsection."
\end{frame}

\subsection{Themes and Colours}
\begin{frame}[fragile]
\frametitle{Changing things}
This is not the only way that a {\sc Beamer} presentation can look.  In the
header we can set the colour scheme, presentation theme and more
add ons with
\begin{verbatim}
\usecolortheme{beetle}
\usetheme{Antibes}
\end{verbatim}
\end{frame}

\frame{ \frametitle{Partial List of Themes and Colours}
\begin{tabular}{c|c}
Themes & Colours  \\ \hline
Antibes & batros \\
Bergen & beetle \\
Berkeley & crane \\
Berlin & dolphin\\
Boadilla & dove \\
boxes &fly \\
Copenhagen &lily \\
Darmstadt &orchid \\
Dresden& rose \\
Frankfurt & seagull \\
Goettingen & seahorse \\
\end{tabular}
}

\subsection{Different Types of Overlays}
\begin{frame}[fragile]
\frametitle{More Overlays}
When I use the term overlay I mean slides that share a frame.  
\pause \\The easiest way to do this is to just use that {\it pause} command.  However
there are many times where the {\it pause} behavior isn't quite right.  For
this reason we also have the commands {\it uncover} and {\it only} along with 
the overlay specification $<\cdot >$.
\end{frame}

\begin{frame}
\frametitle{Uncover}
Sometimes when you reveal more and more of a slide you do not simply want
to hide from one point on; rather you would like to reveal the middle last.  Perhaps you
are proving through contradiction that there are infinitely many primes then you might have \uncover<2->{
\begin{proof}
\uncover<2->{Suppose, for contradiction, that $p$ were the largest prime.}
\uncover<3->{
Let $q$ be the product of all the primes less than or equal to $p$.
Then $q+1$ is not divisible by any prime smaller than it.}  
\uncover<2->{Thus $q+1$
is also prime and greater than $p$.} 
\end{proof}
}
\end{frame}

\begin{frame}[fragile]
\frametitle{How this works}
The new code used here is 
\begin{semiverbatim}
\\uncover<2->\{{\it Content}\}
\end{semiverbatim}
The overlay specifications are given in pointed brackets. The specification $<2->$ means Òfrom slide 2 on.Ó 
Thus, the first and last statement are shown on the first slide of the frame, but the other two statements are not shown. 
Rather, the second second is shown only from the second slide onward. beamer automatically computes the 
number of slides needed for each frame. More generally, overlay specification are lists of numbers or number 
ranges where the start or ending of a range can be left open. For example -3,5-6,8- means Òon all slides, 
except for slides 4 and 7.Ó 
\end{frame}

\frame{
\frametitle{Only}
Note with the uncover white space is left for the unexposed slide.  \\Sometimes
you want parts to appear and disappear
and for the formating around to shift.  
This can\only<1-1>{'t} be done with \only<1-1>{{\it uncover}}\only<2->{{\it only}}.  }

\begin{frame}\frametitle{Example}
$\only<1-2>{f_{n}+f_{n+1}= f_{n+2}}
\only<3-4>{1+1= 2}
\only<5-6>{1+2= 3}
\only<7-8>{2+3= 5}
\only<9->{3+5= 8}$\\
$\uncover<2->{1,1,}
\uncover<4->{2,}
\uncover<6->{3,}
\uncover<8->{5,}
\uncover<10->{8}$\\
\uncover<11->{ Another place you may want to use {\it only} is when you are using 
when you are using the proof environment and you have a proof that
is too long to fit in a frame.  Here you can put each part of the proof separate 
slides.  One does have to be careful in using {\it only} in things like 
tables because since the layout changes based on what is changing
you can sometimes get annoying "wobbles."  In the case of tables I recommend
using {\it uncover} along with {\it hspace}. }
\end{frame}

\frame{
\frametitle{Wobble}
With Wobble
\begin{tabular}{|c|c|}
\hline
\only<1-1>{X}\only<2->{O} & \uncover<4->{X} \\ 
\hline
\uncover<2-2>{X} & \uncover<3-3>{X} \\
\hline
\end{tabular}\\
Without Wobble
\begin{tabular}{|c|c|}
\hline
\uncover<5-5>{X}\uncover<6->{\hspace{-8pt}O} & \uncover<8-8>{X} \\ 
\hline
\uncover<6-6>{X} & \uncover<7-7>{X} \\
\hline
\end{tabular}
}

\frame{\frametitle{Alert and Overlay Specs}
Sometimes you may want to bring \alert{attention} to something.
Sometime you only want \alert<2-2>{attention} for a certain 
period of time.  \pause That is what the {\it alert} command is for.
\pause Further more you can attach an overlay spec like $<2-2>$ to 
an {\it alert} to only bring attention to it for a  certain period. You
can do the same thing with {\it emph}; you will have to experiment to
see what else overlay specifications work with (they don't seem to 
work with {\it underline}).
}

\frame{
\frametitle{One Last Example}
\begin{tabular}{c|c|c}
\uncover<2->{X} & \uncover<8-11>{X} & \uncover<3->{O} \\ 
\hline
\alert<13->{\uncover<7-11>{O}\uncover<13->{\hspace{-8pt}X}}  & \alert<11-12>{\uncover<4-12,15->{X}} & \uncover<6-11>{X}\\
\hline
\uncover<10-11>{X}\uncover<14->{\hspace{-8pt}O} & \uncover<9-11>{O}& \uncover<5-11>{O}\\
\end{tabular}
\begin{tabular}{l}
\uncover<2->{X plays (1,1)}\\
\uncover<3->{O plays (3,1)}\\
\alert<11->{\only<4-12>{X plays (2,2)}\only<13->{X plays (1,2)}}\\
\only<5-11>{O plays (3,3)}\only<14->{O plays (1,3)}\\
\only<6-11>{X plays (3,2)}\only<15->{X plays (2,2)}\\
\only<7-11>{O plays (1,2)}\\
\only<8-11>{X plays (2,1)}\\
\only<9-11>{O plays (2,3)}\\
\only<10-11>{X plays (1,3)}
\end{tabular}
}

\end{document}