%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% marsdefs.sty V1.0a Friday, April 27, 2001
%% for use as an option with marslide.sty
%% ---------------------------------------------------------------------
%% Previous version: marsdenfontsdef.sty   V0.0.5 June 3, 2000
%%                   marsdenfontsdefcm.sty V0.0.7 Sep 23, 2000
%%                   marsdefs.sty          V0.0.9c Oct 1, 2000
%% ---------------------------------------------------------------------
%% Copyright 2000,2001  Wendy G. McKay (wgm@cds.caltech.edu)
%% and                  Ross R. Moore (ross@maths.mq.edu.au)
%% All rights reserved.
%%======================================================================
%%
%%   This file is distributed in the hope that it will be useful,
%%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%%
%% IMPORTANT COPYRIGHT NOTICE:
%%
%% You are allowed to distribute this file alone.
%%
%% Permission is granted to copy this file to another file with a
%% clearly different name and to customize the declarations in that
%% copy to serve the needs of your installation, provided that you
%% comply with the conditions in the file legal.txt from the LaTeX2e
%% distribution.
%%
%% However, NO PERMISSION is granted to generate or to distribute a
%% modified version of this file under its original name.
%%
%% You are NOT ALLOWED to change this file.
%%
%%
%% MODIFICATION ADVICE:
%%
%% If you want to customize this file, use a different name for your
%% copy(ies) and modify the copy(ies); this will ensure that your
%% modifications do not get overwritten when you install a
%% new release.
%%
%% You can then easily distribute your modifications by distributing
%% the modified and renamed copy of the source file, taking care to
%% observe the conditions in legal.txt; this will ensure that other
%% users can safely use your modifications.
%%
%% Please report errors to: Wendy G McKay <wgm@cds.caltech.edu>
%%                          Ross R Moore  <ross@maths.mq.edu.au>
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% USAGE:   Choice of the following:
%% \usepackage[marsdefs]{marslide}        %default CM
%% \usepackage[marsdefs,cm]{marslide}
%% \usepackage[marsdefs,lucida]{marslide}
%% \usepackage[marsdefs,rotis]{marslide}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------------------------------------------------
%% Changes: June 3, 2000: V0.0.5
%% add \set@color to the headlineitemize environment
%% Changes: June 12, 2000:
%% remove \set@color and \bgroup, \egroup to the headlineitemize
%% environment
%% Changes: Sept 20, 2000: V0.0.7
%% added options for rotis/lucida fonts
%% Changes: Sept 25, 2000: V0.0.8
%% Converted refs of marsdenfonts to marsdefs
%% Changes: Sept 28, 2000: V0.0.9
%% added texpower macros to preset colors in doucment
%% Changes: Oct 1, 2000: V0.0.9c
%%   fixed textcolor in texpower macros, for text and footnotes
%%   \color{textcolor}\let\default@color\current@color}}
%% Changes: Jan 15, 2001: V0.0.9d
%%   added a small \voffset, for exact alignment with full-screen mode
%%   moved the CDS logos code into  mars-cds.sty
%% Changes: Apr 27, 2001: V1.0a
%%   added \ifwithbanner and modified \bannerstrip
%%   to allow for maximum textheight usage and putting the pseudo-banner
%%   mars-cds.sty added to customize colors with or without banner.
%%   option "nobanner" added to marslide
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\fileversion{1.0a}
\def\filedate{2001/04/27}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage%
{marsdefs}%
[\filedate\space marsden slide  v\fileversion]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% April 26, 2001 - option to switch banner on/off %€€€€
\ifwithbanner 
        \typeout{Setting Geometry Package to use Banners}
        \usepackage[landscape, letterpaper, verbose,
        %           ,textheight=5.5 truein  %calculated by geometry
        %           ,textwidth=10.0 truein  %calculated by geometry
                    ,voffset=-.35pt
                    ,hoffset=0pt
                    ,tmargin=0pt
                    ,bmargin=0pt
                    ,lmargin=36pt
                    ,rmargin=36pt
                    ,headheight=78pt     %%for  banner 78pt
                    ,headsep=20pt  
                    ,footskip=0.20 truein   %non-mRSED
                    ,tmargin=.10truein
                    ]{geometry}
        \addtolength{\voffset}{-.10truein}
\else
        \typeout{Setting Geometry Package for No Banners}
        \usepackage[landscape, letterpaper, verbose,
        %           ,textheight=5.5 truein  %calculated by geometry
        %           ,textwidth=10.0 truein  %calculated by geometry
                    ,voffset=-.35pt
                    ,hoffset=0pt
                    ,tmargin=0pt
                    ,bmargin=0pt
                    ,lmargin=36pt
                    ,rmargin=36pt
                    ,headheight=0pt     %%for no banner 20pt
                    ,headsep=30pt  
                    ,footskip=0.20 truein   %non-mRSED
                    ,tmargin=.10truein
                    ]{geometry}
        \addtolength{\voffset}{-.10truein} %moves footer up
\fi     %€€€€
%-----------------------------------------------------------------------
\ifwithcm 
  \IfFileExists{type1cm.sty}{% 
         \typeout{usepackage: type1cm;
                               TextFontname: \TextFontname;
                               MathFontname: \MathFontname}
          \usepackage{type1cm}
  }
 {\typeout{*** 
  better results can be obtained using the package: type1cm ***}}
\else
  \ifwithrotis
         \typeout{usepackage: lucrotis;
                               TextFontname: \TextFontname;
                               MathFontname: \MathFontname}
          \usepackage{lucrotis}
  \else
    \ifwithlucida
         \typeout{usepackage: lucrotis;
                               TextFontname: \TextFontname;
                               MathFontname: \MathFontname}
          \usepackage{lucrotis}
    \fi
  \fi
\fi 
%=======================================================================
% PAGE INITIALISATION
%=======================================================================
\setlength{\parindent}{0pt}

% Do not set up here; Firstpage has no footer; myheadings to begin on pg 2
%\AtBeginDocument{\SetCITcdsFooter}  
%\AtBeginDocument{\pagestyle{myheadings}}

%\InputIfFileExists{mars-cds.sty}{}{}

%-----------------------------------------------------------------------
% marsdefs COLOR DEFINITIONS
% These color models {rgb}, {RGB}, or {cmyk}
% have been checked for the 
% Textures (textures.def)  and dvips (dvips.def) graphics drivers.
% Some of them may not work with other drivers
%---------------------------------------------------------
%
\definecolor{greyblue}{rgb}{0.35,0.4,0.62}       %89.25 102 158.10
\definecolor{GrayBlue}{rgb}{0.35,0.4,0.62}       %89.25 102 158.10
\definecolor{orangered}{RGB}{255,69,0}           % #FF4500
\definecolor{darkorange}{cmyk}{.20,.50,.80,0}    % rgb .80 .50 .20 
                                                 % RGB 204 127.50 51.00
\definecolor{lightorange}{cmyk}{.07,.37,.65,0}   % rgb .93 .63 .35 
                                                 % RGB 237.15 160.65 89.25
\definecolor{webyellow}{RGB}{204, 153, 000}      % #cc9900
\definecolor{darkgreen}{RGB}{51,102,0}           % #003300
\definecolor{darkpeagreen}{cmyk}{.50,.30,.50,0}  % .50 .70 .50 
                                                 % 127.50 178.50 127.50
\definecolor{webpeagreen}{rgb}{0.80,0.80,0.60}   % RGB 204 204 153

% SOME OTHER COLORS
\definecolor{firebrick}{RGB}{178,34,34}          % #B22222
\definecolor{ltblue}{RGB}{176,196,222}           % #B0D4CE
\definecolor{seagreen}{RGB}{46,139,87}           % #2E8B57
\definecolor{seafoamgreen}{rgb}{0.5372,0.7059,0.5020}  %137,180,128 /255
\definecolor{SeafoamGreen}{rgb}{0.5372,0.7059,0.5020}  %137,180,128 /255
\definecolor{lightpeagreen}{cmyk}{.22,.20,.40,0} % rgb: 0.78 0.80 0.60 
                                                 % RGB: 198.9 204 153
\definecolor{Orange}{cmyk}{.20,.50,.80,0}        % rgb .80 .50 .20 
                                                 % RGB 204 127.50 51.00

%---------------------------------------------------------
% Provide default colors if not defined in the mars-<usr>.sty
%---------------------------------------------------------
\providecommand{\defaulttextcolor}{black}
\providecommand{\titlecolor}{darkorange}
\providecommand{\subtitlecolor}{darkorange}
\providecommand{\authorcolor}{greyblue}
\providecommand{\affilcolor}{darkgreen}
\providecommand{\namecolor}{darkgreen}
\providecommand{\defncolor}{webyellow}
\providecommand{\sncolor}{greyblue}
\providecommand{\ssncolor}{greyblue}
\providecommand{\sssncolor}{greyblue}
\providecommand{\paracolor}{greyblue}
\providecommand{\itemcolor}{darkorange}
\providecommand{\footerbkgrndcolor}{white}%
\providecommand{\footertextcolor}{webpeagreen}

\ifwithbanner
    \providecommand{\bannercolor}{greyblue}
    \providecommand{\bannerrulecolor}{webpeagreen}
    \providecommand{\bannerstripcolor}{greyblue}
    \providecommand{\bannertextcolor}{webpeagreen}
\else
    \providecommand{\bannercolor}{white}
    \providecommand{\bannerrulecolor}{white}
    \providecommand{\bannerstripcolor}{greyblue}
    \providecommand{\bannertextcolor}{darkorange}
\fi
\providecommand{\urlcolor}{lightorange}
\providecommand{\captioncolor}{black}
\providecommand{\linecolor}{greyblue}
\providecommand{\arrowcolor}{webyellow}
\providecommand{\labelcolor}{webyellow}
\providecommand{\commentcolor}{darkorange}


%-----------------------------------------------------------------------
% FONTS
\ifwithrotis
   \def\bannerfont{\slideHUGE}          % CM at 55pt
   \else
   \def\bannerfont{\slideHuge}          % CM at 55pt
\fi

\def\titlefont{\slideHuge}              % CM at 55pt
\def\subtitlefont{\slidehuge}           % CM at 40pt
\def\authorfont{\slideLARGE}            % CM at 36pt
\def\affilfont{\slidesmall}             % CM at 20pt

\def\firstheadlinefont{\LARGE}          % CM at 36pt  
\def\secondheadlinefont{\Large}         % CM at 32pt
\def\thirdheadlinefont{\large}          % CM at 28pt
\def\fourthheadlinefont{\normalsize}    % CM at 25pt


%-----------------------------------------------------------
% FRONTPAGE, HEADERS AND FOOTER DEFINITIONS
%-----------------------------------------------------------
% TITLE and SUBTITLE on FRONTPAGE

\newcommand{\frontpagetitle}[1]{%
   \begin{center}
   \textcolor{\titlecolor}{\sf\bfseries \titlefont #1}\endgraf%
   \end{center}}

\newcommand{\frontpagesubtitle}[1]{%
   \begin{center}
   \textcolor{\subtitlecolor}{\sf\bfseries\subtitlefont #1}\endgraf%
   \end{center}}

\newcommand{\frontpageauthor}[1]{%
   \begin{center}
   \textcolor{\authorcolor}{\sl\bfseries\authorfont #1}\endgraf%
   \end{center}}

\newcommand{\frontpageaffil}[1]{%
   \begin{center}
   \color{\affilcolor}
   \textcolor{\affilcolor}{\sl\bfseries \affilfont #1}\endgraf%
   \end{center}}

% frontpage logos were initially designed for use in the footer
% user can set the \LeftLogo  and \RightLogo
%
\newcommand{\frontpagelogos}{%
   \centerline{\lower 0pt\hbox{\LeftLogo}\hfill\lower 0pt\hbox{\RightLogo}}}

\let\footerlogos\frontpagelogos
%-----------------------------------------------------------
% BANNERS
%-----------------------------------------------------------
\providecommand{\banneronly}{}
\renewcommand{\banneronly}{%
    \vbox{\hbox to \textwidth{\fboxsep=0pt%
          \kern\oddsidemargin
          \colorbox{\bannercolor}{%
                      \hbox to \paperwidth{%
                            \vrule
                            height 75.75pt           
                            width 0pt
                            depth 0pt
                      \hfill}%
                      \hfill}\hss}\endgraf%
\bannerrule
}}
%-----------------------------
\newcommand{\bannerHeading}[1]{%
       \vbox{\hbox to \textwidth{\fboxsep=0pt%
          \kern\oddsidemargin
           \colorbox{\bannercolor}{%
                      \hbox to \paperwidth{%
                            \vrule
                            height 75.75pt   
                            width 0pt
                            depth 0pt
         \banner@anchor
         \raise24pt\hbox{%
            \textcolor{\bannertextcolor}
                 {\bannerfont\sf\bfseries \enspace #1}}%
                      \hss}%
                      }\hss}\endgraf%
         \bannerrule
}}
\let\bannerheading\bannerHeading
%-----------------------------
\newcommand{\bannertitle}[1]{%
    \vbox{\fboxsep=0pt\relax\colorbox{\bannerstripcolor}{%
           \hbox to \textwidth{\vrule
                     height 60pt
                     width 0pt
                     depth 24pt  
           \banner@anchor
           \textcolor{\bannertextcolor}{\bannerfont \sf \enspace 
#1}\hss}\hss}%
}}
%-----------------------------
\newcommand{\bannerStrip}[1]{%
        \null\vskip -44pt
       \vbox{\hbox to \textwidth{\fboxsep=0pt%
          \kern\oddsidemargin
          \colorbox{\bannerstripcolor}{%
                      \hbox to \paperwidth{%
                            \vrule
                            height 60pt
                            width 0pt
                            depth 24pt %depth 24pt
           \banner@anchor
     \hbox{\textcolor{\bannertextcolor}{\bannerfont\sf \enspace #1}}%
                      \hss}}\hss}%
}}
\let\bannerstrip\bannerStrip
%-----------------------------
\newcommand{\bannerrule}{%
%      \vbox{\moveleft-\oddsidemargin\hbox{%
       \vbox{\hbox to \textwidth{\fboxsep=0pt%
          \kern\oddsidemargin
          \textcolor{\bannerrulecolor}{%
                     \vrule
                            height 2.25pt
                            width \paperwidth
                            depth 0pt
                      }%
                      \hss}%
}}
\let\footerrule\bannerrule
%--------------------------------------
% DEFINE MYHEADINGS
\def\ps@myheadings{%
  \def\@oddfoot{%
      \ifnum\value{page}=1
      \relax
      \else
          \ifdraftflag@
          \null\hfill
          \raise 0pt\hbox{\textcolor{\footertextcolor}{%
          \tiny   Version: \VersionDate; Typeset on \today,\hhmm}}\hfill
          \else
          \null\hfill
          \fi
      \hbox{\raise 0pt\hbox{%
                \textcolor{\footertextcolor}{\tiny\bf\thepage}}}%
      \fi
}%
%--------------------------------------
  \def\@evenfoot{%
          \ifdraftflag@
          \null\hfill
          \raise 0pt\hbox{\textcolor{\footertextcolor}{%
          \tiny   Version: \VersionDate; Typeset on \today,\hhmm}}\hfill
          \else
          \null\hfill
          \fi
      \hbox{\raise 0pt\hbox{%
                \textcolor{\footertextcolor}{\tiny\bf\thepage}}}%
}%
%--------------------------------------
\def\@evenhead{%
   \ifnum\value{page}=1
%      \banneronly     %old version with plain banner
       \bannerHeading{\bannerlogo}\hfil€€€
   \else
      \bannerHeading{\rightmark}\hfil
   \fi}%
\def\@oddhead {%
   \ifnum\value{page}=1
%      \banneronly     %old version with plain banner
       \bannerHeading{\bannerlogo}\hfil
   \else
      \bannerHeading{\leftmark}\hfil
   \fi}%
%\ifnum\value{page}=1
%  \let\@evenhead=\banneronly
%  \let\@oddhead=\banneronly
%\fi
     \let\@mkboth\@gobbletwo
     \let\sectionmark\@gobble
     \let\subsectionmark\@gobble
}

\def\bannerlogo{}
%-----------------------------------------------------------
% HEADLINE LEVEL ITEMS
%--------------------------------------
% First definition of math inside the headline itemize environment- 
% called slidemath
\newenvironment{slidemath}{\endgraf%
\relax
     \begin{minipage}{\the\headitemwidth}%
     \abovedisplayskip=4pt plus 2pt minus 4pt
     \begin{center}\begin{displaymath}}%
{\end{displaymath}\end{center}\end{minipage}}

% Revised definition - called itemmath
\newenvironment{itemmath}{\endgraf%
\relax
     \begin{minipage}{\the\headitemwidth}%
     \abovedisplayskip=0pt plus 2pt minus 4pt%
     \abovedisplayshortskip=0pt plus 2pt minus 4pt%
     \begin{center}\begin{displaymath}}%
{\end{displaymath}\end{center}\end{minipage}}

% sets the width of the current item environment for `itemmath'
\newdimen\headitemwidth
\headitemwidth=\textwidth
\advance\headitemwidth-\rightmargin

\newenvironment{firstheadlineitemize}
{\relax\bgroup\bgroup\advance\headitemwidth-\leftmargini
\renewcommand{\labelitemi}{{\textcolor{\itemcolor}{\LARGE $\blacksquare$}}}%
\begin{list}{\labelitemi}{{%
             \settowidth{\labelwidth}{\labelitemi}%
%            \addtolength{\parskip}{0pt}%
%            \addtolength{\partopsep}{0pt}%
%            \addtolength{\topsep}{0pt}%
%            \addtolength{\itemsep}{0pt}%
            }%
\color{\sncolor}\LARGE\slshape
}}
{\end{list}\egroup\egroup}

\newenvironment{secondheadlineitemize}
{\relax\bgroup\bgroup\advance\headitemwidth-\leftmarginii
\renewcommand{\labelitemii}{\textcolor{\itemcolor}{\Large $\square$}}%
\begin{list}{\labelitemii}{%
%            \settowidth{\labelwidth}{\labelitemii}%
%            \addtolength{\parskip}{0pt}%
%            \addtolength{\partopsep}{0pt}%
%            \addtolength{\topsep}{0pt}%
%            \addtolength{\itemsep}{0pt}%
            }%
\color{black}\Large\rm
}
{\end{list}\egroup\egroup}

\newenvironment{thirdheadlineitemize}
{\relax\bgroup\bgroup\advance\headitemwidth-\leftmarginiii
\renewcommand{\labelitemiii}{\textcolor{\itemcolor}{\large $\bullet$}}%
\begin{list}{\labelitemiii}{%
%%           \settowidth{\labelwidth}{\labelitemiii}%
%            \addtolength{\parskip}{0pt}%
%            \addtolength{\partopsep}{0pt}%
%            \addtolength{\topsep}{0pt}%
%            \addtolength{\itemsep}{0pt}%
            }%
\color{\sssncolor}\large\bf
}
{\end{list}\egroup\egroup}

\newenvironment{fourthheadlineitemize}
{\relax\bgroup\bgroup\advance\headitemwidth-\leftmarginiv
\renewcommand{\labelitemiv}{\textcolor{\itemcolor}{\normalsize\rm $\circ$}}%
\begin{list}{\labelitemiv}{%
%%           \settowidth{\labelwidth}{\labelitemiv}%
%            \addtolength{\parskip}{0pt}%
%            \addtolength{\partopsep}{0pt}%
%            \addtolength{\topsep}{0pt}%
%            \addtolength{\itemsep}{0pt}%
            }%
\color{black}\normalsize\rm
}
{\end{list}\egroup\egroup}
%=======================================================================
% need to do this only for ROTIS font file
% temporary hack to not use \it with semi-serif:
%-----------------------------------------------------------------------
\ifwithrotis
   \providecommand{\bfi}{}
   \renewcommand{\bfi}{\bfseries}
   \fi
%-----------------------------------------------------------------------
% SmallCaps tiny for use in names like Matlab
%--------------------------------------
\ifwithrotis %\font \tinysc=pror8a at 10pt
       \def\tinysc{\tiny\scshape}%
      \else
      \ifwithlucida \font \tinysc=hlhr8r at 10pt
      \else
      \ifwithcm \font \tinysc=cmcsc10 at 10pt
      \else
      \fi
   \fi
\fi
%--------------------------------------
\font \tinysc=cmcsc10 at 10pt
%--------------------------------------
%%% Copied From File: ltlogos.dtx and modified
%%% \def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@}
%--------------------------------------
\def\TeX{T\kern-.09em
\lower.3ex\hbox{E}\kern-.0625emX\@}
%\DeclareRobustCommand{\LaTeX}{L\kern-.36em%
\DeclareRobustCommand{\LaTeX}{L\kern-.24em%
         {\sbox\z@ T%
          \vbox to\ht\z@{\hbox{\check@mathfonts
                               \fontsize\sf@size\z@
                               \math@fontsfalse\selectfont
                               A}%
                         \vss}%
         }%
%        \kern-.15em%
          \kern-.05em%
         \TeX}


%-----------------------------------------------------------------------
\AtBeginDocument{\pagestyle{myheadings}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

