% day1.tex
%
% Mac Mason, Spring 2006
%
% Source for first day of the ACM LaTeX course

\documentclass[t]{beamer}

\mode<presentation>
\setbeamertemplate{navigation symbols}{}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{pdfpages}
\usepackage{moreverb}
\usepackage{graphicx}
\usepackage{amsmath}
\title{\LaTeX{}: Typesetting for fun and profit}
\author{Mac Mason \\ \texttt{mac@cs.hmc.edu}}
\date{\today}
\begin{document}

\begin{frame}[fragile]
  \titlepage
\end{frame}

% \begin{frame}
%   \frametitle{TOC}
%   \tableofcontents
% \end{frame}

\begin{frame}[c]
  \frametitle{``Syllabus''}
  \begin{block}{Week 1}
    Introductory Stuff, Basic Math
  \end{block}
  \begin{block}{Week 2}
    Fancy Math, Graphics, Tables, etc.
  \end{block}
  \begin{block}{Week 3}
    References, Bibliographies, Document Classes, etc.
  \end{block}
  \begin{block}{Week 4}
    Fancy Stuff! Slides, Diagrams, Fonts, Programming (?), etc.
  \end{block}
\end{frame}

\begin{frame}
  \frametitle{Things we're doing today}
  \begin{block}{Introductory sorts of things}
    \begin{itemize}
    \item What \emph{is} \LaTeX{}, anyway?
    \item Why do I care?
    \item How do I install it?
    \item Show me how to do cool stuff!
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}[fragile]
  \frametitle{What \emph{is} \LaTeX{}, anyway?}
  \begin{block}{``Typesetting Language''}\pause
\begin{verbatim}
\section{Introduction}
\end{verbatim}

\begin{verbatim}
\subsection{Materials Used}
\end{verbatim}

\begin{verbatim}
\begin{itemize}
\item One fish
\item Two fish
\item Red fish 
\item Blue fish
\end{itemize}
\end{verbatim}

\begin{verbatim}
\begin{equation}
\int_a^b f(x)dx = F(b) - F(a)
\end{equation}
\end{verbatim}

  \end{block}
\end{frame}

\begin{frame}[plain]
{\small
\verbatiminput{example.tex}}
\end{frame}
\begin{frame}[plain, c]
\includegraphics[width=\textwidth]{example.pdf}
\end{frame}

\begin{frame}
\frametitle{Why do I care?}
\begin{quotation}
  ``It makes everything look so \emph{fancy}!''\\
  \hfill (Patrick Foley)
\end{quotation}
\begin{quotation}
  ``You have to!'' \\
  \hfill (Prof. Ran)
\end{quotation}
\begin{quotation}
  ``Submissions should be in \LaTeX{}\ldots''\\
  \hfill (That conference you're submitting to)
\end{quotation}
\end{frame}

\begin{frame}
  \frametitle{Why you care, again}
  \begin{block}{Structure}
    \begin{itemize}
    \item ``Trust the computer, it might know what's best''
    \end{itemize}
  \end{block}
  \begin{block}{Presentation}
    \begin{itemize}
    \item Looks good
    \item The standard
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}
  \frametitle{Installation}
  \begin{block}{Windows}
    \begin{itemize}
    \item MiKTex
    \item TeXnicCenter
    \end{itemize}
  \end{block}
  \begin{block}{Mac OS X}
    \begin{itemize}
    \item TeXShop
    \end{itemize}
  \end{block}
  \begin{block}{UNIX}
    \begin{itemize}
    \item teTeX
    \item Text editor of your choice
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}
  \frametitle{Cool Stuff! (Math!)}
  \begin{block}{Dollar-sign mode}
    \texttt{\$x\^{}2\$} $\rightarrow$ $x^2$\\
    \texttt{\$x\_1, x\_2\$} $\rightarrow$ $x_1, x_2$. \\
    \pause
    \vspace{\baselineskip}
    \texttt{\$$\backslash$alpha\$} $\to$ $\alpha$ \\
    \texttt{\$$\backslash$sigma\$} $\to$ $\sigma$ \\
    \texttt{\$$\backslash$Sigma\$} $\to$ $\Sigma$ \\
    \pause
    \vspace{\baselineskip}
    \texttt{\$e\^{}i$\backslash$pi +1 = 0\$} $\to$ \pause $e^i\pi +1 = 0$ \\
    \pause
    \texttt{\$e\^{}\{i$\backslash$pi\} +1 = 0\$} $\to$ $e^{i\pi} +1 = 0$ \\
    \pause
    \vspace{\baselineskip}
    \texttt{The sum of the integers from 1 to \$n\$ is\\ 
      \$$\backslash$sum\_\{i=1\}\^{}n i \$.} \\
      $\to$ \\
    The sum of the integers from 1 to $n$ is $\sum_{i=1}^n i$. 
  \end{block}
\end{frame}
\begin{frame}
  \frametitle{More math!}
  \begin{block}{Equations}
    \begin{columns}[t]
      \column[t]{0.45\textwidth}
      \texttt{$\backslash$begin\{equation\}} \\
      \texttt{$\backslash$sum\_\{i=1\}\^{}n i}\\
      \texttt{$\backslash$end\{equation\}} \\
%      \vspace{\baselineskip}
      \column[t]{0.45\textwidth}
      \begin{equation}
      \sum_{i=1}^n i
    \end{equation}
    \end{columns}
  \end{block}
  
  \begin{block}{Fractions}
    \begin{columns}[t]
      \column[t]{0.45\textwidth}

      \texttt{$\backslash$frac\{1\}\{2\}} \\
      \vspace{1.75\baselineskip}
      \texttt{$\backslash$frac\{x\^{}2\}\{x\_i\}} \\
      \column[t]{0.45\textwidth}
      \begin{equation*}
      \frac{1}{2}
      \end{equation*}
      \begin{equation*}
        \frac{x^2}{x_i}
      \end{equation*}
    \end{columns}
  \end{block}
\end{frame}

\begin{frame}
  \frametitle{Three more things}
  \begin{block}{Paragraphs}
    Two newlines in a row makes a new paragraph: \\ \vspace{\baselineskip}

    \texttt{This is one paragraph \\  \ \\ and this is another}

%    Yes, it really does mean to indent it like that.
  \end{block}
  \begin{block}{Margins}
    Bigger than you expect. 
  \end{block}
  \begin{block}{Quotes}
    \begin{itemize}
    \item Left quotes use the backtick: \texttt{``}
    \item Right quotes use the regular apostrophe: \texttt{''}
    \end{itemize}
  \end{block}
\end{frame}
\begin{frame}
  \frametitle{References}
  \begin{itemize}
  \item \texttt{http://www.cs.hmc.edu/qref/latex/qref/}
  \item \texttt{http://www.cs.hmc.edu/}$\sim$\texttt{mac/latexcourse}
  \item \texttt{http://www.math.hmc.edu/computing/support/tex/}
  \item \texttt{latex-l@hmc.edu}
  \item \emph{The \LaTeX{} Companion}
  \end{itemize}
\end{frame}
\end{document}
