%%
%% This is file `powerdot-example3.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% powerdot.dtx  (with options: `pdexample3')
%% 
%% ---------------------------------------------------------------
%% Copyright (C) 2005-2014 Hendri Adriaens
%% ---------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% This Current Maintainer of this work is Hendri Adriaens.
%%
%% This work consists of all files listed in manifest.txt.
%%
\documentclass[style=klope,clock,hlsections]{powerdot}

\usepackage{amsmath}
\usepackage{pst-node}
\usepackage{listings}

\lstnewenvironment{example}[1][]{%
  \lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,%
    frame=single,backgroundcolor=\color{yellow!20},%
    xleftmargin=\fboxsep,xrightmargin=\fboxsep,gobble=1%
    }\lstset{#1}}{}
\lstnewenvironment{examplesmall}[1][]{%
  \lstset{basicstyle=\tiny\ttfamily,columns=flexible,%
    frame=single,backgroundcolor=\color{yellow!20},%
    xleftmargin=\fboxsep,xrightmargin=\fboxsep,gobble=2%
    }\lstset{#1}}{}

\title{powerdot example 3 --- verbatim and random dots}
\author{Hendri Adriaens\and Christopher Ellison}

\pdsetup{
  lf=Example 3,
  rf=for powerdot,
  palette=Spring,
  randomdots,
  dprop={dotstyle=ocircle,linewidth=.25pt},
  dmindots=5,dmaxdots=5,
  dminsize=600pt,dmaxsize=700pt,
  dbright=50,
  logohook=c,
  logopos={.505\slidewidth,.08\slideheight},
  logocmd={\includegraphics[scale=.05]{powerdot-default.ps}}
}

\begin{document}

\maketitle

\begin{slide}{Overview}
  \begin{enumerate}[type=1]
    \item This file demonstrates \pause
    \begin{itemize}
      \item some uses of \texttt{verbatim} \pause
    \end{itemize}
    \item and \pause
    \begin{itemize}
      \item some uses of randomdots
    \end{itemize}
  \end{enumerate}
\end{slide}

\section{section}

\begin{slide}[palette=PastelFlower,method=direct,
              dprop={dotstyle=*},
              dminsize=5pt,dmaxsize=10pt,
              dmindots=5,dmaxdots=10]{Name that quote}
  G\"odel, Escher, Bach: an Eternal Golden Braid \pause

  \verb|G\"odel, Escher, Bach: an Eternal Golden Braid| \pause

  \begin{quote}
    The two of you may find it amusing to listen
    to such totally meaningless cacophony, but I assure you it is not at
    all pleasant for a sensitive composer to be subjected to such
    excruciating, empty dissonances and meaningless rhythms.  Achilles,
    I thought you had a good feeling for music. Could it be that your
    previous pieces had merit merely by coincidence?
  \end{quote}
\end{slide}

\begin{slide}[palette=BlueWater,
              dprop={dotstyle=osquare,linewidth=.2pt},
              dminsize=4pt,dmaxsize=10pt,
              dmindots=5,dmaxdots=10]{Itemize}
  \begin{itemize}
    \item<1> here
    \item<2> we
    \item<3> go
  \end{itemize}
\end{slide}

\begin{slide}[toc=What day is it?,bm=What day is it?,method=direct,
              dprop={dotstyle=*},dminsize=4pt,dmaxsize=20pt,
              dmindots=30,dmaxdots=30]{What day is it?\hfill A test}
\begin{example}
  <?php
  if ($day == "monday")
  {
    $callInSick = true;
  }
  else
  {
    $callInSick = false;
  }
  ?>
\end{example}
\end{slide}

\section[slide=false]{The \texttt{direct} and \texttt{file} methods}

\begin{slide}[method=direct,randomdots=false]{Quadratic}
  With \verb|method=direct|, there are no overlays.\pause

  But you can still use display verbatim text.

  \[
    x \pause = \pause \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \pause
  \]

  Attempting \pause a \pause pause\ldots\pause

  \verb|Plot[3x,{x,0,10}]|
\end{slide}

\begin{slide}[method=file,randomdots=false]{Quadratic}
  With \verb|method=file|, \pause you can display verbatim text and have overlays.\pause

  \[
    x \pause = \pause \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \pause
  \]

  Attempting \pause a \pause pause\ldots\pause

  \verb|Plot[3x,{x,0,10}]|
\end{slide}

\section[slide=false]{Nodes}

\begin{slide}[method=file,randomdots=false]{Taylor}
\begin{lstlisting}[escapechar=|,mathescape]
 e^x |\pause| = 1 + |\pause|x + |\pause|x^2/2! + |\color{red}{\ldots}| |\pause|
 e^x |\pause| = 1 + |\pause|x + |\pause|$\rnode{A}{\frac{x^2}{2!}}$ +  |\color{red}{\ldots}|
\end{lstlisting}
\pause\vspace{.1in}
Notice, \rnode{B}{this} fraction is in \verb|mathmode|.
\onslide*{11-}{\ncarc[linecolor=blue,arcangle=-5]{->}{B}{A}}\pause \vspace{.1in}

The above (as its own slide) was coded as follows:
\begin{examplesmall}[escapechar=@]
  \begin{slide}[method=file]{Taylor}
    \begin{lstlisting}[escapechar=|,mathescape]
      e^x |\pause| = 1 + |\pause|x + |\pause|x^2/2! + |\color{red}{\ldots}| |\pause|
      e^x |\pause| = 1 + |\pause|x + |\pause|$\rnode{A}{\frac{x^2}{2!}}$ + |\color{red}{\ldots}|
    \end{lstlisting}

    \pause\vspace{.1in}

    Notice, \rnode{B}{this} fraction is in \verb|mathmode|.
    \onslide*{11-}{\ncarc[linecolor=blue,arcangle=-5]{->}{B}{A}}\pause \vspace{.1in}
  @\char`\\@end{slide}
\end{examplesmall}
\end{slide}

\end{document}
\endinput
%%
%% End of file `powerdot-example3.tex'.
