%==============================================================================
% Prosper -- (PPRtalk) Style file
% A LaTeX class for creating slides
% Author: Wolfgang May
%         DBIS Group
%         Universitaet Freiburg
%
% Copyright (c) 2001 Wolfgang May
% All rights reserved.
% 
% Permission is hereby granted, without written agreement and without
% license or royalty fees, to use, copy, modify, and distribute this
% software and its documentation for any purpose, provided that the
% above copyright notice and the following two paragraphs appear in
% all copies of this software.
% 
% IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, 
% SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF 
% THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED 
% OF THE POSSIBILITY OF SUCH DAMAGE.
% 
% THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES,
% INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
% AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
% ON AN "AS IS" BASIS, AND THE AUTHOR HAS NO OBLIGATION TO
% PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
%
%==============================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{PPRtalk}[2001/11/11]
\typeout{`Talk' style for prosper ---}
\typeout{based on `Modern' style for prosper ---}
\typeout{(c) 2001 Wolfgang May, Freiburg, Germany}
\typeout{ }

\RequirePackage{pst-grad}
\RequirePackage{times}
\RequirePackage{amssymb}

\DeclareMathVersion{bold} %%%%%%%%%%% WM for prosper
\psset{arrowsize=0.2cm 2} %% WM: for pstricks arrows

\RequirePackage{mathptm}

% \DeclareSymbolFont{operators}   {OT1}{ptmcm}{m}{n}
% \DeclareSymbolFont{letters}     {OML}{ptmcm}{m}{it}
% \DeclareSymbolFont{symbols}     {OMS}{pzccm}{m}{n}
% \DeclareSymbolFont{largesymbols}{OMX}{psycm}{m}{n}
% \DeclareSymbolFont{bold}        {OT1}{ptm}{bx}{n}
% \DeclareSymbolFont{italic}      {OT1}{ptm}{m}{it}
% \@ifundefined{mathbf}{}{\DeclareMathAlphabet{\mathbf}{OT1}{ptm}{bx}{n}}
% \@ifundefined{mathit}{}{\DeclareMathAlphabet{\mathit}{OT1}{ptm}{m}{it}}
% \DeclareMathSymbol{\omicron}{0}{operators}{`\o}
% \thinmuskip=2mu
% \medmuskip=2.5mu plus 1mu minus 1mu
% \thickmuskip=4mu plus 1.5mu minus 1mu
% \def\boldmath{%
%    \@warning{there is no bold Symbol font}%
%    \global\let\boldmath=\relax
% }
% \DeclareMathSizes{5}{5}{5}{5}
% \DeclareMathSizes{6}{6}{5}{5}
% \DeclareMathSizes{7}{7}{5}{5}
% \DeclareMathSizes{8}{8}{6}{5}
% \DeclareMathSizes{9}{9}{7}{5}
% \DeclareMathSizes{10}{10}{7.4}{6}
% \DeclareMathSizes{10.95}{10.95}{8}{6}
% \DeclareMathSizes{12}{12}{9}{7}
% \DeclareMathSizes{14.4}{14.4}{10.95}{8}
% \DeclareMathSizes{17.28}{17.28}{12}{10}
% \DeclareMathSizes{20.74}{20.74}{14.4}{12}
% \DeclareMathSizes{24.88}{24.88}{17.28}{14.4}

\def\setTextColor{\ifinColor
  \ifcolorBG
  \global\let\colC=\white
  \else
  \global\let\colC=\black
  \fi
  \else
  \global\let\colC=\black
  \fi}


\ifinColor
\newrgbcolor{myblue}{.2 .36 .77}
\newrgbcolor{darkblue}{0.28 0.24 0.55}
\newrgbcolor{crimson}{0.863 0.078 0.235}
\newrgbcolor{headerframecolor}{0.863 0.078 0.235}
\newrgbcolor{headerbackgrd}{0.863 0.078 0.235}
\newrgbcolor{mylightblue}{0.3 0.4 1.}
\newrgbcolor{grdlightblue}{0.3 0.4 0.8}
\newrgbcolor{ivoryred}{1. 1. 0.85}
\newrgbcolor{backgrd}{.2 .36 .77} % some kind of blue
\else
\newrgbcolor{myblue}{1 1 1}
\newrgbcolor{darkblue}{0.28 0.24 0.55}
\newrgbcolor{crimson}{0 0 0}
\newrgbcolor{headerframecolor}{0 0 0}
\newrgbcolor{headerbackgrd}{1 1 1}
\newrgbcolor{ivoryred}{0 0 0}
\newrgbcolor{backgrd}{0.82 0.85 1} % das helle blau wie in der ACS-Vorlesung
\let\yellow\black
\let\red\black
\fi
\setTextColor

\newcommand{\switchToDraftBullets}{%
\myitem{1}{\scriptsize\crimson\raisebox{2pt}{\ensuremath{\bullet}}}%
\myitem{2}{\scriptsize\ivoryred\raisebox{2pt}{\ensuremath{\bullet}}}%
\myitem{3}{\scriptsize\ivoryred\raisebox{2pt}{\ensuremath{\bullet}}}}

\newcommand{\switchToFancyBullets}{% only if inColorBG
\ifinColor\ifcolorBG
\myitem{1}{\includegraphics[width=.4cm]{red-bullet-on-blue.ps}}%
\myitem{2}{\includegraphics[width=.3cm]{green-bullet-on-blue.ps}}%
\myitem{3}{\includegraphics[width=.3cm]{yellow-bullet-on-blue.ps}}
\fi\fi}

% for printing: accumulate is true. If a slide uses fromslide* etc,
% the accumulated stuff does not fit on a single page.
% thus, ignoreaccumulate and restoreaccumulate can be used
% (extends the strict \accumulatetrue and \accumulatefalse by a 
%  restoring functionality)

\newif\ifStoredAccumulate
\newcommand{\ignoreaccumulate}
  {\ifAccumulate\StoredAccumulatetrue\else\StoredAccumulatefalse\fi\Accumulatefalse}
\newcommand{\restoreaccumulate}
  {\ifStoredAccumulate\Accumulatetrue\else\Accumulatefalse\fi}


\switchToFancyBullets

\renewcommand{\familydefault}{phv}
\def\slidestretch{1}

\FontTitle{\colC\bf\Large}{\colC\bf\Large}
\FontText{\colC}{\colC}

\ColorFoot{\colC}

\newcommand{\doslidetitle}[1]{%
  \rput[lt](-1,5){\fontTitle{#1}}}
     %%     ^^^^ Position der Titelzeile
\let\slidetitle\doslidetitle
\def\labelitemi{{\small\colC\ensuremath{\blacksquare}}}
\def\labelitemii{{\small\colC\ensuremath{\blacklozenge}}}

\LogoPosition{-.4,-.7}

\renewpagestyle{GenericPageStyle}{\hfill }{\hfill%
  \ifisDraft
  \else
  \ifshowVersion
  \else
  {\@colorFoot\footnotesize\thepage}%
  \fi\fi
}

\newcommand{\ModernFrame}[1]{%
  \psframe[linewidth=2pt,fillstyle=solid,fillcolor=backgrd]
    (-2.3,-1.7)(15,10.8)
  \ifcolorBG
  %%% Titel-Balken
  \psframe[linecolor=headerframecolor,fillcolor=headerbackgrd,fillstyle=solid]
    (-1.4,8.6)(13.5,9.6)
  \fi
  %%% unterer Balken
%  \psframe[linestyle=none,fillstyle=solid,fillcolor=crimson]
%    (-.4,-0.7)(4.5,-1.35)
  \psset{linecolor=ivoryred}
%  \multirput(5,-0.8)(.8,0){10}{\qdisk(0,0){1.2pt}}
  \multirput(-1.3,9.8)(0,.3){3}{\qdisk(0,0){1.2pt}}
  \PutLogo % Mandatory
  {#1}}

\newcommand{\switchToMainFrame}{%
  \let\slidetitle\doslidetitle
  \switchToFancyBullets
  \setTextColor
  \NewSlideStyle[14.2cm]{t}{6,3.6}{ModernFrame}}
              %%  ^^^^^^^  Breite und Position des Textfeldes
\switchToMainFrame

\newcommand{\EmptyFrame}[1]{%
 \ifcolorBG
 \psframe[fillstyle=gradient,gradangle=90,gradmidpoint=1,gradend=green]
    (-2.3,-1.7)(15,10.8)
%  \psframe[linewidth=2pt,fillstyle=solid,fillcolor=backgrd]
%    (-2.3,-1.7)(15,10.8)
  \fi
  {#1}%
  }

\newcommand{\switchToEmptyFrame}{%
  \let\slidetitle\@gobble% ignore slidetitle, only used for bookmark
  \switchToFancyBullets
  \setTextColor
  \NewSlideStyle{t}{5.5,5.2}{EmptyFrame}}

\newcommand{\CommentFrame}[1]{%
 \psframe[fillstyle=solid]
  (-2.3,-1.7)(15,10.8)
  {#1}}

\newcommand{\switchToCommentFrame}{%
  \switchToDraftBullets
  \let\slidetitle\doslidetitle
  \global\let\colC=\black
  \NewSlideStyle{t}{5.5,3.6}{CommentFrame}}

\RequirePackage{semhelv}

\PDFCroppingBox{10 40 594 820}


%
% Now define a couple of useful commands
%

\newcommand{\redheadline}[1]{%
  \psframebox[linecolor=headerframecolor,fillcolor=headerbackgrd,fillstyle=solid]{
  \begin{minipage}{\textwidth}
  \vskip0.15cm
  \large\bf{ #1 }\vskip0.15cm
  \end{minipage}}\vskip0.4cm}

\makeatletter
\def\invisiblehyperlink#1#2
 {\let\old@pdfborder=\@pdfborder
  \def\@pdfborder{0 0 0}%
  \hyperlink{#1}{#2}%
  \let\@pdfborder=\old@pdfborder}
\makeatother


\newcommand{\enhancedtext}[1]{%
\psshadowbox[fillstyle=solid,fillcolor=ivoryred]{%
\black{#1}}}

\newcommand{\punchline}[2][2]{%
\fromSlide{#1}{%
\begin{center}%
\enhancedtext{#2}%
\end{center}}}

\newcommand{\enhanceditem}[1]{%
\item[{\psline[linecolor=ivoryred,linewidth=5pt,shadow=true,arrowlength=0.4,arrowinset=0]{->}(-0.4,0.1)(0,0.1)}]%
\enhancedtext{#1}}

\newcommand{\includeFigure}[2][1.]{%
\begin{figure}[htb]%
\centering%
\leavevmode%
\psframebox[fillstyle=solid,fillcolor=ivoryred]{\psfig{file=#2,width=#1\slideWidth}}%
\end{figure}}

\endinput

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
