%==============================================================================
% Prosper -- (PPRhy.sty) Style file
% A LaTeX class for creating slides
% Author: Mika Raento
% Based on the Autumn style by
% Frederic Goualard (Frederic.Goualard@irin.univ-nantes.fr)
%         Institut de Recherche en Informatique de Nantes
%         University of Nantes, France
%
% Copyright (c) 2002 Mika Raento 
%           (c) 2000 Frederic Goualard
% 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{PPRhy}[2002/09/30]
\typeout{HY style for Prosper ---}
\typeout{(c) 2002 Mika Raento, University of Helsinki}
\typeout{(c) 2000 Frederic Goualard, CWI, The Netherlands}
\typeout{ }

% Required packages
\IfFileExists{pst-grad}{\RequirePackage{pst-grad}}{\RequirePackage{gradient}}
\RequirePackage{amssymb}
%\RequirePackage{palatino}
\RequirePackage{ae}
\RequirePackage{aecompl}
\RequirePackage[T1]{fontenc}
\RequirePackage{url}
\renewcommand{\rmdefault}{ppl}
\renewcommand{\sfdefault}{phv}

% Colors 
\newrgbcolor{hyblue}{.0 .2 .61}
\ifinColor
\def\colA{white}
\def\colB{hyblue}
\global\let\colC=\lightgray
\global\let\colD=\black
\else
\def\colA{white}
\def\colB{lightgray}
\global\let\colC=\black
\global\let\colD=\black
\fi

% The fonts
\FontTitle{%
  \usefont{T1}{ppl}{b}{n}\fontsize{20.74pt}{20pt}\selectfont\colC}{%
  \usefont{T1}{ppl}{b}{n}\fontsize{20.74pt}{20pt}\selectfont\colC}
\FontText{%
  \usefont{T1}{ppl}{m}{n}\fontsize{14.4pt}{13pt}\selectfont\colD}{%
  \usefont{T1}{ppl}{m}{n}\fontsize{14.4pt}{13pt}\selectfont\colD}

\ifinColor
\ColorFoot{\hyblue}
\else
\ColorFoot{\black}
\fi

% Positionning of the title of a slide.
\def\slidetitle#1{\rput[lb](-.7,3.6){%
    \parbox{11.5cm}{\fontTitle{\baselineskip=0pt #1}}}}

% Positionning for a logo
\LogoPosition{10.5, 6.7}

\special{header=logo_bg.h}
\newsavebox\HYLogo
\sbox\HYLogo{\includegraphics[width=8cm]{logo_bg.eps}}
\newcommand{\BSquareFrame}[1]{%
  \ifcolorBG
  \rput[lb](4, 0){\usebox{\HYLogo}}%
  \psframe[fillstyle=gradient,gradbegin=\colB,gradend=\colA,
	gradmidpoint=1,gradangle=90,linestyle=none,gradlines=100]%
          (-1.9,-1.4)(1.9, -0.8)
  \psframe[fillstyle=gradient,gradbegin=\colB,gradend=\colA,
	gradmidpoint=1,gradangle=-90,linestyle=none,gradlines=100]%
          (8.65,-1.4)(12.5, -0.8)
  \psframe[fillstyle=gradient,gradbegin=\colB,gradend=\colA,
	gradmidpoint=1,gradangle=90,linestyle=none,gradlines=100]%
          (-1.9,8.3)(1.9, 8.9)
  \psframe[fillstyle=gradient,gradbegin=\colB,gradend=\colA,
	gradmidpoint=1,gradangle=-90,linestyle=none,gradlines=100]%
          (8.65,8.3)(12.5, 8.9)
  \else
  \psframe[fillstyle=none,linestyle=none]%
          (8.65,8.3)(12.5, 8.9)
  \fi

  \ifInTitlePage
  \else
  \psline[linecolor=\colB,linewidth=3pt](-.7,7.1)(10,7.1)        
  \psline[linecolor=\colB,linewidth=1pt](-.7,7)(10,7)        
  \fi
  \PutLogo % Mandatory
  \rput[lb](-1, 8.3){\parbox{5cm}{\@colorFoot\tiny{}\ifx\undefined\@institution\relax\else\@institution\fi}}
  \rput[lb](6.8, 8.3){\parbox{5cm}{\hfill\@colorFoot\tiny{}\ifx\undefined\@department\relax\else\@department\fi}}
  {#1}%
}

\myitem{1}{\psframe[fillstyle=solid,fillcolor=\colB,%
  linestyle=none](-.15,.25)(0.1,.01)}
\myitem{2}{\psframe[framearc=1,fillstyle=solid,fillcolor=\colB,%
  linestyle=none](-.12,.22)(0.07,.04)}
\myitem{3}{\psframe[fillstyle=solid,fillcolor=\colB,%
  linestyle=none](-.11,.16)(0.06,.10)}

\NewSlideStyle[11.6cm]{t}{5.4,3}{BSquareFrame}
\PDFCroppingBox{10 35 594 830}

\titleSpacing{\vspace*{20pt}}

\newcommand{\isodate}{\number\year-%
\ifnum\month<10{}0{}\fi\number\month-%
\ifnum\day<10{}0\fi\number\day}
\newpagestyle{HYPageStyle}{\hfill }%
{%
\@colorFoot\tiny%
\@Author%
\hfill%
 \@cartouche~--~\ifx\undefined\@Part\relax\else\@Part~--~\fi{}p.\thepage\ifallPages/\realpageref{last@page}\fi\hfill
\ifx\undefined\@Date\isodate\else\@Date\fi
}
\newenvironment{slidesmall}[2][\@defaultTransition]
{\begin{slide}[#1]{#2}\small}
{\end{slide}}

\endinput

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