<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%\iffalse
%&lt;*copyright&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Web.sty package,                  2000-3-05          %%
%% Copyright (C) 1999-2002  D. P. Story                 %%
%%   dpstory@uakron.edu                                 %%
%%                                                      %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License        %%
%% Distributed from CTAN archives in directory          %%
%% macros/latex/base/lppl.txt; either version 1 of the  %%
%% License, or (at your option) any later version.      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% History: Noel Vaillant began developing a better web.sty
%%   based on my earlier published web.sty. Many thanks
%%   to him for starting me off.
%%---------------------------------------------------------
%&lt;/copyright&gt;
%&lt;package&gt;\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%&lt;package&gt;\ProvidesPackage{web}
%&lt;package&gt; [2007/04/16 v4.0d Web: A Screen Design Package (dps)]
%&lt;*driver&gt;
\documentclass{ltxdoc}
\usepackage[dviwindo,colorlinks,hyperindex]{hyperref}
%\pdfstringdefDisableCommands{\let\\\textbackslash}
%\EnableCrossrefs \CodelineIndex
\begin{document}
  \GetFileInfo{web.sty}
  \title{Web: A Screen Design Package}
  \author{D. P. Story\\
    Email: \texttt{dpstory@uakron.edu}}
  \date{processed \today}
  \maketitle
  \tableofcontents
  \let\Email\texttt
  \DocInput{web.dtx}
  \PrintIndex
\end{document}
%&lt;/driver&gt;
% \fi
% \MakeShortVerb{|}
% \StopEventually{}
%
% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
% \DoNotIndex{\space,\@empty,\special}
%
%    \begin{macrocode}
%&lt;*package&gt;
%    \end{macrocode}
% \section{Declare Options}
% Options for \texttt{dvipsone}, \texttt{dvips}, \texttt{dviwindo}, \texttt{pdftex},
% \texttt{dvipdfm} and \texttt{textures}.
% \subsection{Drivers Supported}
%    \begin{macrocode}
\IfFileExists{xcolor.sty}{%
    \def\eq@ColorPackage{xcolor}%
    \PassOptionsToPackage{xcolor}{table,hyperref}%
}{\def\eq@ColorPackage{color}}
\DeclareOption{noxcolor}{\def\eq@ColorPackage{color}}
%\def\eq@drivernum{5} % 5 = choice has not been made
\DeclareOption{dvipsone}{\PassOptionsToPackage{dvipsone}{hyperref}%
    \def\eq@drivernum{0}%
    \PassOptionsToPackage{dvipsone}{\eq@ColorPackage}%
    \PassOptionsToPackage{dvipsone}{graphicx}%
    \PassOptionsToPackage{dvipsone}{exerquiz}%
    \def\web@set@paper{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}
\DeclareOption{dviwindo}{\PassOptionsToPackage{dviwindo}{hyperref}%
    \def\eq@drivernum{4}%
    \PassOptionsToPackage{dviwindo}{\eq@ColorPackage}%
    \PassOptionsToPackage{dviwindo}{graphicx}%
    \PassOptionsToPackage{dviwindo}{exerquiz}%
    \def\web@set@paper{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}
\DeclareOption{dvipdfm}{\PassOptionsToPackage{dvipdfm}{hyperref}
    \def\eq@drivernum{2}%
    \PassOptionsToPackage{dvipdfm}{\eq@ColorPackage}%
    \PassOptionsToPackage{dvipdfm}{graphicx}%
    \PassOptionsToPackage{dvipdfm}{exerquiz}
    \def\web@set@paper{\AtBeginDvi{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}}
\DeclareOption{dvips}{\PassOptionsToPackage{dvips}{hyperref}
    \def\eq@drivernum{0}%
    \PassOptionsToPackage{dvips}{\eq@ColorPackage}%
    \PassOptionsToPackage{dvips}{graphicx}%
    \PassOptionsToPackage{dvips}{exerquiz}%
    \def\web@set@paper{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}
\DeclareOption{pdftex}{\PassOptionsToPackage{pdftex}{hyperref}
   \def\eq@drivernum{1}%
   \PassOptionsToPackage{pdftex}{\eq@ColorPackage}
   \PassOptionsToPackage{pdftex}{graphicx}%
   \PassOptionsToPackage{pdftex}{exerquiz}
   \def\web@set@paper{}}
%    \end{macrocode}
% The `\texttt{textures}' option was contributed by Ross Moore.  3/6/02
%    \begin{macrocode}
\DeclareOption{textures}{\PassOptionsToPackage{textures}{hyperref}%
    \def\eq@drivernum{3}%
    \PassOptionsToPackage{textures}{\eq@ColorPackage}%
    \PassOptionsToPackage{textures}{graphicx}%
    \PassOptionsToPackage{textures}{exerquiz}%
     \def\web@set@paper{\bgroup %
       \dimen2=\origpaperheight \advance\dimen2 by -\topmargin
       \dimen0\dimen2 \advance\dimen0-\paperheight
       \xdef\@pdfpagescrop{0 \strip@pt\dimen0 \space
        \strip@pt\paperwidth\space \strip@pt\dimen2}%
      \egroup}}
\AtEndOfPackage{%
    \edef\origpaperwidth{\the\paperwidth}%
    \edef\origpaperheight{\the\paperheight}}
%    \end{macrocode}
%\subsection{Paper Option}
%    \begin{macrocode}
\DeclareOption{forpaper}{\eqforpapertrue  % for print
  \PassOptionsToPackage{monochrome}{\eq@ColorPackage}%
  \PassOptionsToPackage{forpaper}{exerquiz}}
\DeclareOption{forcolorpaper}{\eqforpapertrue  % for print
  \PassOptionsToPackage{forcolorpaper}{exerquiz}}
%    \end{macrocode}
% \subsection{First Page Options}
%    \begin{macrocode}
\DeclareOption{latexlayout}{%
    \let\web@layout=n\ExecuteOptions{forcolorpaper}}
\DeclareOption{nodirectory}{\let\web@directory@option=n}
\DeclareOption{latextoc}{\let\web@latextoc=y}
\DeclareOption{nobullets}{\let\web@bullets=n\let\web@latextoc=y
    \forceSubSubNumbers}
%    \end{macrocode}
% \subsection{Standard Screen Designs}
% Some ``standard screen designs''. The first one, \texttt{designi}, roughly corresponds to
% the original \texttt{web} page size.
%    \begin{macrocode}
\DeclareOption{designi}{%
    \AtEndOfPackage{%
        \margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
        \screensize{3.72in}{4.67in} % web.sty dimensions
        \let\margins@web@save\margins
        \let\screensize@web@save\screensize
        \let\margins=\@@margins\let\screensize=\@gobbletwo
    }%
}
\DeclareOption{designii}{%
    \AtEndOfPackage{
        \margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
        \screensize{4.5in}{5in} % height, width
        \let\margins@web@save\margins
        \let\screensize@web@save\screensize
        \let\margins=\@@margins\let\screensize=\@gobbletwo
    }%
}
\DeclareOption{designiii}{%
    \AtEndOfPackage{%
        \margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
        \screensize{5in}{6in} % height, width
        \let\margins@web@save\margins
        \let\screensize@web@save\screensize
        \let\margins=\@@margins\let\screensize=\@gobbletwo
    }%
}
\DeclareOption{designiv}{%
    \AtEndOfPackage{%
        \margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
        \screensize{4in}{5in} % height, width
        \let\margins@web@save\margins
        \let\screensize@web@save\screensize
        \let\margins=\@@margins\let\screensize=\@gobbletwo
    }%
}
\DeclareOption{designv}{%
    \AtEndOfPackage{%
        \margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
        \screensize{4.5in}{6in} % height, width
        \let\margins@web@save\margins
        \let\screensize@web@save\screensize
        \let\margins=\@@margins\let\screensize=\@gobbletwo
    }%
}
\DeclareOption{designvi}{%
    \AtEndOfPackage{%
        \margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
        \screensize{4.19in}{4.67in} % height, width
        \let\margins@web@save\margins
        \let\screensize@web@save\screensize
        \let\margins=\@@margins\let\screensize=\@gobbletwo
    }%
}
\DeclareOption{designvii}{%
    \AtEndOfPackage{%
%        \margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
        \margins{.5in}{.5in}{24pt}{.5in} % left,right,top, bottom
        \screensize{7.5in}{10in}
        \let\margins@web@save\margins
        \let\screensize@web@save\screensize
        \let\margins=\@@margins\let\screensize=\@gobbletwo
    }%
}
%    \end{macrocode}
%    \begin{macro}{usesf}
% Makes the default font sans serif. Useful for presentations.
%    \begin{macrocode}
\DeclareOption{usesf}{%
    \def\aeb@defaultfamily{\sffamily}
    \def\itdefault{sl}
    \renewcommand{\familydefault}{\sfdefault}
    \renewcommand\labelitemi{\textrm{\textbullet}}
    \AtEndOfPackage{\def\web@copyright@symbol{\textrm{\copyright}}}
}
\def\aeb@defaultfamily{\rmfamily}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{forceSubSubNumbers}
% Force the use of subsubsection numbers
%    \begin{macrocode}
\DeclareOption{forceSubSubNumbers}{\ExecuteOptions{nobullets}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{centertitlepage}
% This commands attempts to center the title page. Works best with \texttt{designv}.
%    \begin{macrocode}
\DeclareOption{centertitlepage}{\@centertitlepagetrue}
\newif\if@centertitlepage \@centertitlepagefalse
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{pro}
% The \texttt{pro} option introduces many enhanced features, these are cataloged in the \texttt{webpro} section of this file.
%    \begin{macrocode}
\DeclareOption{pro}{%
    \let\webpro@loaded=y
    \AtEndOfPackage{\loadwebpro}}
\let\webpro@loaded=n
\def\loadwebpro{\InputIfFileExists{webpro.def}{}{}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{draft}
% When you take this option, graphic overlays are not allowed.  This is useful
% when you rely heavily on graphic overlays, but during the development phase,
% don't need to read and re-read your overlays. The defined background colors
% will be used instead. Remove this option to build the
% final version of your document.
%    \begin{macrocode}
\newif\ifweb@allowtemplates \web@allowtemplatestrue
\DeclareOption{draft}{\web@allowtemplatesfalse}
%    \end{macrocode}
%    \end{macro}
% \subsection{Panel Related Options}
%    \begin{macrocode}
\DeclareOption{usetemplates}{\def\@usetemplates{1}}
\DeclareOption{leftpanel}%
    {\def\@panelconfig{1}\def\@panelsep{10bp}\def\@usetemplates{1}}
\DeclareOption{rightpanel}%
    {\def\@panelconfig{2}\def\@panelsep{10bp}\def\@usetemplates{1}}
\def\templatedefaults
{%
    \def\@panelsep{0pt}%
    \def\@usetemplates{0}%
    \def\@panelconfig{0}%
    \def\@textX{0}\def\@panelX{0}%
}
\templatedefaults
%    \end{macrocode}
% \subsection{Miscellaneous Options}
%    \begin{macrocode}
\DeclareOption{navibar}{\web@navibartrue}  % navigation bar
\DeclareOption{tight}{% Try to make environments a little tighter
   \AtEndOfPackage{\tightsettings}}
%    \end{macrocode}
% \subsection{Language Options}
%    \begin{macrocode}
\DeclareOption{french}{%
  \AtEndOfPackage{%
  %======&gt; Modification : JMS
  % Recouvrement de \today
  \def\today{\the\day\ \ifcase\month\or janvier
    \or f\'evrier \or mars  \or avril
    \or mai \or juin  \or juillet  \or ao\^ut
    \or septembre  \or octobre  \or novembre
    \or d\'ecembre \fi \the\year}
  %======&gt; Modification : JMS
  \def\web@toc{Table des mati\`{e}res}
  \def\web@continued{suite}
  \def\web@article{D\'{e}but \hyperlink{\web@Start.1}{Document}}
  \def\web@directory{R\'{e}pertoire}
  \def\web@revision{Mise \`{a} jour :}
  \def\web@copyright{Copyright}
  \def\web@versionlabel{Version}
  \def\web@back{Retour}}
  \PassOptionsToPackage{french}{exerquiz}
}
\DeclareOption{german}{%
  \AtEndOfPackage{%
  \def\today{\the\day. \ifcase\month\or Januar
    \or Februar \or M\"{a}rz  \or April
    \or Mai \or Juni  \or Juli  \or August
    \or September  \or Oktober  \or November
    \or Dezember \fi \the\year}
  \def\web@versionlabel{Version}
  \def\web@toc{Inhaltsverzeichnis}
  \def\web@continued{Forts.}
  \def\web@article{Anfang \hyperlink{\web@Start.1}{Artikel}}
  \def\web@directory{\"Ubersicht}
  \def\web@revision{Letzte \"Anderung:}
  \def\web@copyright{Copyright}
  \def\web@section{Abschnitt}
  \def\web@back{Zur\"uck}
  \def\web@doc{Dok}}
  \PassOptionsToPackage{german}{exerquiz}
}
\DeclareOption{norsk}{%
  \AtEndOfPackage{%
  \def\today{\ifcase\month\or Januar
    \or Februar \or Mars \or April
    \or Mai \or Juni  \or Juli  \or August
    \or September  \or Oktober  \or November
    \or Desember \fi \the\day,  \the\year}
  \def\web@versionlabel{Versjon}
  \def\web@toc{Innholdsfortegnelse}
  \def\web@continued{forts.}
  \def\web@article{Start \hyperlink{\web@Start.1}{artikkel}}
  \def\web@directory{Katalog}
  \def\web@revision{Sist endret:}
  \def\web@copyright{Copyright}
  \def\web@section{Avsnitt}
  \def\web@back{Tilbake}
  \def\web@doc{Dok}}
  \PassOptionsToPackage{norsk}{exerquiz}
}
\DeclareOption{dutch}{%
  \AtEndOfPackage{%
  \def\today{\the\day~\ifcase\month\or januari
        \or februari \or maart \or april
        \or mei \or juni  \or juli  \or augustus
        \or september  \or oktober  \or november
        \or december \fi \space \the\year}
    \def\web@versionlabel{Versie}
    \def\web@toc{Inhoudsopgave}
    \def\web@continued{vervolg}
    \def\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
    \def\web@directory{Overzicht}
    \def\web@revision{Laatste wijziging:}
    \def\web@copyright{Copyright}
    \def\web@section{Sectie}
    \def\web@back{Terug}
    \def\web@doc{Doc}}
  \PassOptionsToPackage{dutch}{exerquiz}
}
\DeclareOption{spanish}{%
  \AtEndOfPackage{%
    \def\today{\the\day\ de \ifcase\month\or Enero
        \or Febrero \or Marzo \or Abril
        \or Mayo \or Junio  \or Julio  \or Agosto
        \or Septiembre  \or Octubre  \or Noviembre
        \or Deciembre \fi de \the\year}
    \renewcommand\web@versionlabel{Versi\noexpand\'{o}n}
    \renewcommand\web@toc{Tabla de Contenido}
    \renewcommand\web@continued{cont.}
    \renewcommand\web@article{Inicio
    \hyperlink{\web@Start.1}{Art\'{\i}culo}}
    \renewcommand\web@directory{Directorio}
    \renewcommand\web@revision{Actualizado el:}
    \renewcommand\web@copyright{Copyright}
    \renewcommand\web@section{Secci\'on}
    \renewcommand\web@back{Volver}
    \renewcommand\web@doc{Doc}}
  \PassOptionsToPackage{spanish}{exerquiz}
}
\DeclareOption{italian}{%
  \AtEndOfPackage{%
    \def\today{\ifcase\month\or Gennaio
        \or Febbraio \or Marzo \or Aprile
        \or Maggio \or Giugno  \or Luglio  \or Agosto
        \or Settembre  \or Ottobre  \or Novembre
        \or Dicembre \fi \the\day,  \the\year}
    \renewcommand\web@versionlabel{Versione}
    \renewcommand\web@toc{Indice}
    \renewcommand\web@continued{cont.}
    \renewcommand\web@article{Inizio \hyperlink{\web@Start.1}{Articolo}}
    \renewcommand\web@directory{Directory}
    \renewcommand\web@revision{Data Ultima Revisione:}
    \renewcommand\web@copyright{Copyright}
    \renewcommand\web@section{Sezione}
    \renewcommand\web@back{Back}
    \renewcommand\web@doc{Doc}}
  \PassOptionsToPackage{italian}{exerquiz}
}
\DeclareOption{russian}{%
  \AtEndOfPackage{%
  \def\today{\the\day\ \ifcase\month
        \or \cyrya\cyrn\cyrv\cyra\cyrr\cyrya
        \or \cyrf\cyre\cyrv\cyrr\cyra\cyrl\cyrya
        \or \cyrm\cyra\cyrr\cyrt\cyra
        \or \cyra\cyrp\cyrr\cyre\cyrl\cyrya
        \or \cyrm\cyra\cyrya
        \or \cyri\cyryu\cyrn\cyrya
        \or \cyri\cyryu\cyrl\cyrya
        \or \cyra\cyrv\cyrg\cyru\cyrs\cyrt\cyra
        \or \cyrs\cyre\cyrn\cyrt\cyrya\cyrb\cyrr\cyrya
        \or \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya
        \or \cyrn\cyro\cyrya\cyrb\cyrr\cyrya
        \or \cyrd\cyre\cyrk\cyrya\cyrb\cyrr\cyrya \fi{ }%
        \the\year\ \cyrg.}
  \gdef\eq@protected#1#2{{\ifhmode #2\else
        \ifvmode #2\else\ifinner#2\else\noexpand #1\fi\fi\fi}}%
  \def\cyrCommand#1#2{\def#1{\eq@protected#1{#2}}}%
    \cyrCommand\web@toc{\CYRO\cyrg\cyrl\cyra\cyrv\cyrl\cyre\cyrn%
        \cyri\cyre}
  \cyrCommand\web@continued{\cyrp\cyrr\cyro\cyrd\cyro\cyrl%
    \cyrzh\cyre\cyrn\cyri\cyre}
  \cyrCommand\web@article{\CYRN\cyra\cyrch\cyra\cyrl\cyro{ }%
  \hyperlink{\web@Start.1}{\cyrd\cyro\cyrk\cyru\cyrm\cyre%
    \cyrn\cyrt\cyra}}
  \cyrCommand\web@directory{\CYRS\cyro\cyrd\cyre\cyrr\cyrzh%
    \cyra\cyrn\cyri\cyre}
  \cyrCommand\web@revision{\CYRP\cyro\cyrs\cyrl\cyre\cyrd\cyrn%
    \cyrya\cyrya{ }\cyrr\cyre\cyrv\cyri\cyrz\cyri\cyrya:}
  \let\web@copyright=\@gobble
%  \cyrCommand\web@copyright{%\CYRK\cyro\cyrp\cyri\cyrr\cyra%
%  \cyrishrt\cyrt}%In Russian publications only the symbol presents
  \cyrCommand\web@versionlabel{\CYRV\cyre\cyrr\cyrs\cyri\cyrya}
  \cyrCommand\web@back{\CYRN\cyra\cyrz\cyra\cyrd}
  \cyrCommand\web@section{\CYRCH\cyra\cyrs\cyrt\cyrsftsn}}
  \PassOptionsToPackage{russian}{exerquiz}
}
\DeclareOption{dansk}{%
  \AtEndOfPackage{%
  \def\today{\ifcase\month\or Januar
    \or Februar \or Marts \or April
    \or Maj \or Juni  \or Juli  \or August
    \or September  \or Oktober  \or November
    \or December \fi \the\day,  \the\year}
  \renewcommand\web@versionlabel{Version}
  \renewcommand\web@toc{Indholdsfortegnelse}
  \renewcommand\web@continued{forts.}
  \renewcommand\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
  \renewcommand\web@directory{Katalog}
  \renewcommand\web@revision{Sidst revideret:}
  \renewcommand\web@copyright{Copyright}
  \renewcommand\web@section{Afsnit}
  % Label Navibar
  \renewcommand\web@back{Tilbage}
  \renewcommand\web@doc{Dok}}   % restricted to three characters
  \PassOptionsToPackage{dansk}{exerquiz}
}
\DeclareOption{polish}{%
    \AtEndOfPackage{%
    \def\today{\ifcase\month\or {Stycze\'{n}}
        \or Luty \or Marzec \or {Kwiecie\'{n}}
        \or Maj \or Czerwiec  \or Lipiec  \or {\'{S}ierpie\'{n}}
        \or {Wrzesie\'{n}}  \or {Pa\'{z}dziernik}  \or Listopad
        \or {Grudzie\'{n}} \fi \the\day,  \the\year}
    \renewcommand\web@versionlabel{Wersja}
    \renewcommand\web@toc{Spis Tre\'{s}ci}
    \renewcommand\web@continued{verte}
    \renewcommand\web@article{Pocz\k{a}tek do
        \hyperlink{\web@Start.1}{Tekstu}}
    \renewcommand\web@directory{Zawarto\'{s}\'{c}}
    \renewcommand\web@revision{Ostatnia zmiana:}
    \renewcommand\web@copyright{Copyright}
    \renewcommand\web@section{Cze\'{s}\'{c}}
    % Label Navibar
    \renewcommand\web@back{Wstecz}
    \renewcommand\web@doc{Dok}}   % restricted to three characters
    \PassOptionsToPackage{polish}{exerquiz}
}
\DeclareOption{finnish}{%
  \AtEndOfPackage{%
  % Recouvrement de \today
  \def\today{\the\day\ \ifcase\month\or Tammikuu
    \or Helmikuu \or Maaliskuu  \or Huhtikuu
    \or Toukokuu \or Kes\"{a}kuu  \or Hein\"{a}kuu  \or Elokuu
    \or Syyskuu  \or Lokakuu  \or Marraskuu
    \or Joulukuu \fi \the\year}
  \def\web@toc{Sis\"{a}llys}
  \def\web@continued{jatka}
  \def\web@article{Aloita \hyperlink{section.1}{Artikkeli}}
  \def\web@directory{Hakemisto}
  \def\web@revision{Muutettu viimeeksi:}
  \def\web@copyright{Copyright}
  \def\web@section{Kappale}
  \def\web@versionlabel{Versio}
  \def\web@back{Takaisin}}
  \PassOptionsToPackage{finnish}{exerquiz}
}
\DeclareOption{catalan}{%
   \AtEndOfPackage{%
     \def\today{\the\day\ de \ifcase\month\or Gener
        \or Febrer \or Mar\c{c} \or Abril
        \or Maig \or Juny  \or Juliol  \or Agost
        \or Setembre  \or Octubre  \or Novembre
        \or Desembre \fi de \the\year}
     \renewcommand\web@versionlabel{Versi\noexpand\'{o}}
     \renewcommand\web@toc{Taula de Contingut}
     \renewcommand\web@continued{cont.}
     \renewcommand\web@article{Inici \hyperlink{\web@Start.1}{Article}}
     \renewcommand\web@directory{Directori}
     \renewcommand\web@revision{Actualizat el:}
     \renewcommand\web@copyright{Copyright}
     \renewcommand\web@section{Secci\'o}
     \renewcommand\web@back{Tornar}
     \renewcommand\web@doc{Doc}}
   \PassOptionsToPackage{catalan}{exerquiz}
}
\DeclareOption{czech}{%
  \AtEndOfPackage{%
%%%% \today is stolen from czech.sty
  \def\today{\number\day. \ifcase\month\or ledna\or \'unora\or
    b\v{r}ezna\or dubna\or kv\v{e}tna\or \v{c}ervna\or \v{c}ervence\or
    srpna\or z\'a\v{r}\'\i\or \v{r}\'{\i}jna\or listopadu\or prosince\fi
    \space\number\year}
%%%%% end of \today
  \def\web@versionlabel{Verze}
  \def\web@toc{Obsah}
  \def\web@continued{pokr.}
  \def\web@article{Za\v{c}\'{a}tek \hyperlink{\web@Start.1}{textu}}
  \def\web@directory{Rozcestn\'{\i}k}
  \def\web@revision{Posledn\'{\i} zm\v{e}na}
  \def\web@copyright{Copyright}
  \def\web@section{Kapitola}
  \def\web@back{Zp\v{e}t}
  \def\web@doc{Dok}}
  \PassOptionsToPackage{czech}{exerquiz}
}
\DeclareOption{brazil}{%
  \AtEndOfPackage{%
    \def\today{\the\day\ de \ifcase\month\or janeiro
            \or fevereiro \or mar\c{c}o \or abril
            \or maio \or junho  \or julho  \or agosto
            \or setembro  \or outubro  \or novembro
            \or dezembro \fi de \the\year}
    \renewcommand\web@versionlabel{Vers\~{a}o}
    \renewcommand\web@toc{Tabela de Conte\'{u}do}
    \renewcommand\web@continued{cont.}
    \renewcommand\web@article{Inicie o
    \hyperlink{\web@Start.1}{Artigo}}
    \renewcommand\web@directory{Diret\'{o}rio}
    \renewcommand\web@revision{Atualizado em:}
    \renewcommand\web@copyright{Copyright}
    \renewcommand\web@section{Se\c{c}\noexpand\~{a}o}
    \renewcommand\web@back{Voltar}
    \renewcommand\web@doc{Doc}}
  \PassOptionsToPackage{brazil}{exerquiz}
}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{\eq@ColorPackage}}
\@ifpackageloaded{xcolor}%
{%
    \@ifpackagelater{xcolor}{2004/07/04}{}
    {%
    \PackageError{web}{%
    *************************************************\MessageBreak
    * Your Version of `xcolor.sty' is too old!\MessageBreak
    * You need the version from 2004/07/04 or newer\MessageBreak
    * or use: \string\usepackage[noxcolor]{web}\MessageBreak
    * or \string\documentclass[noxcolor]{article}\MessageBreak
    *************************************************}{}%
    }%
}{}
%    \end{macrocode}
% \section{Main Code}
% \subsection{Switches}
% Switch to turn the navibar on and off
%    \begin{macrocode}
\newif\ifweb@navibar\web@navibarfalse
%    \end{macrocode}
%    \begin{macro}{\NaviBarOn}
%    \begin{macro}{\NaviBarOff}
% User access to turning on and off the navigational bar.
%    \begin{macrocode}
\def\NaviBarOn{\global\web@navibartrue}
\def\NaviBarOff{\global\web@navibarfalse}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\ifeqforpaper}
% Switch to turn on and off the for paper option.
%    \begin{macrocode}
\newif\ifeqforpaper \eqforpaperfalse  % for those who insist on paper
\newif\ifweb@papersize@set \web@papersize@setfalse
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\forceSubSubNumbers}
% Force the use of subsubsection numbers, the default for the web style is to use
% a bullet. This is only obeyed when the \texttt{pro} option is in effect.
%    \begin{macrocode}
\newif\if@defaultsubsubding \@defaultsubsubdingtrue
\def\forceSubSubNumbers{%
    \if\web@latextoc n%
    \PackageWarning{webpro}{\string\forSubSubNumbers\space requested,\MessageBreak
    I'm adding the option of latextoc}%
   \fi
   \let\web@latextoc=y\@defaultsubsubdingfalse
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\NewPage}
% A convenient definition for people using the forpaper option
%    \begin{macrocode}
\newcommand\NewPage{\ifeqforpaper\else\newpage\fi}
%    \end{macrocode}
%    \end{macro}
%    \begin{macrocode}
\let\web@directory@option=y
\let\web@latextoc=n
\let\web@layout=y
\let\web@bullets=y
%    \end{macrocode}
% \subsection{Load Configuration File: web.cfg}
% Look for configuration file, web.cfg, for example
%\begin{verbatim}
%    \ExecuteOptions{dvipsone}
%\end{verbatim}
% sets dvipsone as the default driver.
%    \begin{macro}{\minPanelWidth}
% This definition is moved here so a user can set the minimal
% default width of the panel in the .cfg file.
%    \begin{macrocode}
\def\minPanelWidth#1{\def\web@minpanelwidth{#1}}
\minPanelWidth{1in}
%    \end{macrocode}
%    \end{macro}
%    \begin{macrocode}
\InputIfFileExists{web.cfg}{}{}
%    \end{macrocode}
% \subsection{Process Options}
%    \begin{macrocode}
\ProcessOptions
\ifx\web@layout n\templatedefaults\fi
%    \end{macrocode}
% \subsection{Required Packages}
%    \begin{macrocode}
\RequirePackage{\eq@ColorPackage}
\RequirePackage{calc}
\RequirePackage{amssymb}% used for navibar
\RequirePackage[bookmarks,bookmarksnumbered,bookmarksopen,colorlinks,%
   linkcolor=webgreen,filecolor=webbrown,citecolor=webgreen,%
   urlcolor=webbrown,pagebackref,pdfpagemode=None,pdfstartview=Fit,%
   pdfpagelayout=SinglePage]{hyperref}%
\def\@pdfcreator{The AcroTeX eDucation Bundle}
\RequirePackage{comment}
%    \end{macrocode}
% If use has not specified driver, make a guess.
%    \begin{macrocode}
\@ifundefined{eq@drivernum}{%
    \PackageError{Web}%
        {You  have not specified dvips, dvipsone, pdftex or dvipdfm
        \MessageBreak in the option list of the web package}
        {Place one of the driver names dvips, dvipsone, pdftex or
        dvipdfm\MessageBreak in the option list of the web package,
        or create a web.cfg file,\MessageBreak see the documentation
        in webeqman.pdf.}
}{}
%    \end{macrocode}
% If the user specifies an option requiring templates, then we better
% load \textsf{eso-pic}, which itself requires \textsf{everyshi}.
%    \begin{macrocode}
\ifnum\@usetemplates=1
    \RequirePackage{eso-pic}
%    \end{macrocode}
% Here is a fix for dvipdfm.  If using templates, then we need to redefine the way we set the
% page size using eso-pic. We also need to redefine the eso-pic macro \cs{@ShipoutPicture} so the order
% of execution of \cs{ESO@HookI} \cs{ESO@HookII} are reversed. The paper size special will be in the
% \cs{ESO@HookII} macro, it needs to execute (once) before \cs{ESO@HookI} is executed.
%    \begin{macrocode}
    \ifnum\eq@drivernum=2
        \def\web@set@paper{\AddToShipoutPicture*{%
            \special{papersize=\the\paperwidth,\the\paperheight}}}
        \renewcommand{\@ShipoutPicture}{%
            \bgroup
                \@tempswafalse%
                \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
                \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
                \if@tempswa%
                \@tempdima=1in\@tempdimb=-\@tempdima%
                \advance\@tempdimb\paperheight
                \@ifundefined{stockwidth}{}{%
                    \advance\@tempdima+\trimedge%
                    \advance\@tempdima+\paperwidth%
                    \advance\@tempdima-\stockwidth%
                    \if@twoside\ifodd\c@page\else%
                    \advance\@tempdima-2\trimedge%
                    \advance\@tempdima-\paperwidth%
                    \advance\@tempdima+\stockwidth%
                    \fi\fi%
                    \advance\@tempdimb+\trimtop}%
                \unitlength=1pt%
                \global\setbox\@cclv\vbox{%
                    \vbox{\let\protect\relax
                    \pictur@(0,0)%
                    (\strip@pt\@tempdima,\strip@pt\@tempdimb)%
                    \ESO@HookII\ESO@HookI\global\let\ESO@HookII\@empty%
                    \endpicture}%
                    \box\@cclv%
                }%
                \fi
            \egroup
        }
    \fi
\fi
%    \end{macrocode}
% A useful command for separating two arguments. Use in \texttt{webpro} section, and by \texttt{aeb\_pro} as well.
%    \begin{macrocode}
\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
%    \end{macrocode}
% \subsection{Compute Page Layout}
%
% We require two new lengths for the template support.
%    \begin{macrocode}
\newlength{\textscreenwidth}
%    \end{macrocode}
% \cs{textscreenwidth} is the width of the text screen.
% \cs{textscreenwidth} is calculated by the \cs{InitLayout}, defined above.
%    \begin{macrocode}
\newlength{\@panelwidth}
%    \end{macrocode}
% This is the width of the (navigational) panel. The navigational can be set three ways: (1)
% as an optional parameter in the \cs{margins} command; (2) by the \cs{panelwidth} command;
% or as the default value of $1$\,in, if no panel width is specified by (1) or (2).
%
% This code by Radhakrishnan C V, modifications by D. P. Story.  The two macros
% \cs{marginsize} and \cs{margins} have the same names as the ones in \texttt{pdfscreen};
% this might give some consistency of design between the two packages.
%    \begin{macrocode}
\newdimen\@Leftmargin   \@Leftmargin=0pt
\newdimen\@Rightmargin  \@Rightmargin=0pt
\newdimen\@Bottommargin \@Bottommargin=0pt
%    \end{macrocode}
% In web.sty, \cs{@Topmargin} is the distance from the
% top of the paper to the top of the text region
%    \begin{macrocode}
\newdimen\@Topmargin    \@Topmargin=0pt
%    \end{macrocode}
% In web.sty, \cs{web@Topmargin} is the distance from
% the top of the page to the top of the running header
%    \begin{macrocode}
\newdimen\web@Topmargin \web@Topmargin=8pt
%\newdimen\fullscreenwidth
%    \end{macrocode}
% If forpaper, set \cs{headheight}, \cs{hoffset}, and \cs{offset}
%    \begin{macrocode}
\ifeqforpaper\else
  \setlength\headheight{8pt}
  \hoffset=0pt
  \voffset=0pt
\fi
%    \end{macrocode}
% Empty page style, will define our own.
%    \begin{macrocode}
\pagestyle{empty}
%    \end{macrocode}
% Modified version of the \cs{InitLayout} macro from pdfscreen.
%    \begin{macrocode}
\def\InitLayout
{%
    \ifeqforpaper\else
    {\@tempdima=\paperwidth
    \addtolength{\@tempdima}{-\@Leftmargin}%
    \addtolength{\@tempdima}{-\@Rightmargin}%
    \xdef\fullscreenwidth{\the\@tempdima}}%
    \fi
    \ifx\web@layout n\templatedefaults\fi
    \ifeqforpaper\else
        \setlength{\textwidth}{\paperwidth}
        \setlength{\textheight}{\paperheight}
        \addtolength{\textheight}{-\@Topmargin}
        \addtolength{\textheight}{-\@Bottommargin}
%    \end{macrocode}
%\begin{verbatim}
%\topmargin = \web@Topmargin - 1in
%\@Topmargin = \web@Topmargin + \headheight + \headsep
% so \headsep = \@Topmargin - \headheight - \web@Topmargin
%\end{verbatim}
%    \begin{macrocode}
        \setlength{\headsep}{\@Topmargin}
        \addtolength\headsep{-\headheight}
        \setlength{\topmargin}{\web@Topmargin}
        \addtolength\headsep{-\topmargin}
        \addtolength{\topmargin}{-1in}
        \setlength\footskip{\@Bottommargin}
        \addtolength{\footskip}{-4pt} % depth of navibar
        \ifcase\@panelconfig
            \setlength{\oddsidemargin}{\@Leftmargin}
            \setlength{\evensidemargin}{\@Leftmargin}
        \or
            \setlength{\oddsidemargin}{\@panelwidth}
            \setlength{\evensidemargin}{\@panelwidth}
        \or
            \setlength{\oddsidemargin}{\@Leftmargin}
            \setlength{\evensidemargin}{\@Leftmargin}
        \fi
        \addtolength{\evensidemargin}{-1in}
        \addtolength{\oddsidemargin}{-1in}
    \fi
    \ifx\web@layout y%
        \ifcase\@panelconfig
            \addtolength{\textwidth}{-\@Leftmargin}
            \addtolength{\textwidth}{-\@Rightmargin}
        \or % leftpanel
            \addtolength{\textwidth}{-\@panelwidth}
            \addtolength{\textwidth}{-\@Rightmargin}
        \or % rightpanel
            \addtolength{\textwidth}{-\@panelwidth}
            \addtolength{\textwidth}{-\@Leftmargin}
        \fi
        \ifnum\@usetemplates=1
            \setlength{\textscreenwidth}{\paperwidth}
            \def\@textX{0}
            \ifnum\@panelconfig=1 % leftpanel
                \addtolength{\textwidth}{-\@panelsep}
                \addtolength{\oddsidemargin}{\@panelsep}
                \addtolength{\evensidemargin}{\@panelsep}
                \addtolength{\textscreenwidth}{-\@panelwidth}
%                \addtolength{\textscreenwidth}{-\@Leftmargin}
%                \setlength{\@panelwidth}{\@Leftmargin}
                \def\@textX{\strip@pt\@panelwidth}
                \def\@panelX{0}
            \fi
            \ifnum\@panelconfig=2 % rightpanel
                \addtolength{\textwidth}{-\@panelsep}
                \addtolength{\textscreenwidth}{-\@panelwidth}
%                \addtolength{\textscreenwidth}{-\@Leftmargin}
%                \setlength{\@panelwidth}{\@Rightmargin}
                \def\@textX{0}
                \def\@panelX{\strip@pt\textscreenwidth}
            \fi
        \fi
    \fi
}
%    \end{macrocode}
%    \begin{macro}{\screensize}
% Size of screen. The first parameter is the desired \cs{paperheight} and the second
% is the desired \cs{paperwidth}. If the forpaper option has been called, then the \cs{paperwidth}
% and \cs{paperheight} will be the default values set by the class, but take \cs{textwidth} to be
% the value of \#2.
%\begin{verbatim}
%Parameters:
%   #1 = \paperheight (height of the display screen to be created)
%   #2 = \paperwidth (width of the display screen to be created)
%\end{verbatim}
%    \begin{macrocode}
\def\screensize#1#2{%
    \ifeqforpaper
        \textwidth=#2
        {\@tempdima=\textwidth
        \addtolength{\@tempdima}{-\@Leftmargin}%
        \addtolength{\@tempdima}{-\@Rightmargin}%
        \xdef\fullscreenwidth{\the\@tempdima}}%
    \else
        \paperheight=#1\relax\paperwidth=#2\relax
    \fi
    \web@papersize@settrue
    \web@set@paper  % dps modified
    \InitLayout
}
%    \end{macrocode}
% We set the screen size to \cs{paperheight} and \cs{paperwidth} according to
% the document class. This will be overwritten by the user when he/she uses
% \cs{screensize}, perhaps through one of the design options.
%    \begin{macrocode}
% \screensize{\the\paperheight}{\the\paperwidth}
%    \end{macrocode}
% Save a secret copy of screensize for use by APB
%    \begin{macrocode}
\let\screensize@web@save\screensize
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\margins}
% Sets the left, right, top and bottom margins.
%\begin{verbatim}
%Parameters:
%   #1 = width of panel to be used if a panel option
%        is specified (default is 1in)
%   #2 = left margin
%   #3 = right margin
%   #4 = top margin
%   #5 = bottom margin
%\end{verbatim}
%    \begin{macrocode}
\newcommand{\@margins}[5][1in]
{%
    \setlength{\@panelwidth}{#1}%
    \ifdim\@panelwidth&lt;\web@minpanelwidth
        \setlength{\@panelwidth}{\web@minpanelwidth}\fi
    \@Leftmargin=#2
    \@Rightmargin=#3
    \@Topmargin=#4
    \@Bottommargin=#5
    \InitLayout
}
\let\margins=\@margins
\let\margins@web@save\margins
\newcommand{\@@margins}[5][]{}
%    \end{macrocode}
% \cs{marginsize} was the original name for \cs{margins}, its usage is deprecated.
%    \begin{macrocode}
\let\marginsize=\margins
%    \end{macrocode}
%    \end{macro}
% \subsection{Title Page}
% \subsubsection{Title, Author, Etc. Definitions}
% We define some text macros that can be used to design the first page layout. These are
% used in the \cs{maketitle} command. Some of them are transmitted to the PDF document, ending up
% in the doc info section.
%    \begin{macro}{\title}
% There is an optional first argument, that is used for a `short title'. Used in
% \cs{maketitle} and ends up in the doc info section of the PDF file.
%    \begin{macrocode}
\def\title{\@ifnextchar[{\@title}{\@title[]}}
%    \end{macrocode}
%    \begin{macro}{\webtitle}
%    \begin{macro}{\shortwebtitle}
% These two text macros are defined. \cs{shortwebtitle} is the same as \cs{webtitle}, when
% the optional parameter in \cs{title} is not specified.
%    \begin{macrocode}
\def\@title[#1]#2{\gdef\webtitle{#2}\hypersetup{pdftitle={#2}}%
    \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebtitle{#2}\else
    \gdef\shortwebtitle{#1}\fi}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\author}
% Takes one argument, the author name. Used in \cs{maketitle} and ends up in the
% doc info of the PDF file.
%    \begin{macrocode}
\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\subject}
% Takes one argument, the subject. Used in \cs{maketitle} and ends up in the
% doc info of the PDF file.
%    \begin{macrocode}
\def\subject{\@ifnextchar[{\@subject}{\@subject[]}}
\def\@subject[#1]#2{\gdef\websubject{#2}\hypersetup{pdfsubject={#2}}%
    \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebsubject{#2}\else
    \gdef\shortwebsubject{#1}\fi}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\email}
% E-mail address
%    \begin{macrocode}
\def\email#1{\gdef\webemail{#1}}
\def\thewebemail{\href{mailto:\webemail}{\webemail}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\keywords}
% Keywords are passed on to the PDF file through hyperref.
%    \begin{macrocode}
\def\keywords#1{\gdef\webkeywords{#1}\hypersetup{pdfkeywords={#1}}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\university}
% University name of author
%    \begin{macrocode}
\def\university#1{\gdef\webuniversity{#1}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\version}
% A version or revision number.
%    \begin{macrocode}
\def\version#1{\gdef\web@version@value{#1}%
    \edef\webversion{\ifx\web@version@value\@empty
   \else\noexpand\web@versionlabel\noexpand\ #1\fi}}
\let\web@version@value\@empty
\def\versionLabel#1{\def\web@versionlabel{#1}}
\versionLabel{Version}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\copyrightyears}
% Copyright notice
%    \begin{macrocode}
\def\copyrightyears#1{\gdef\webcopyrightyears{#1}}
%    \end{macrocode}
%    \end{macro}
% Language dependent definitions, these are the defaults.
%    \begin{macrocode}
\def\web@toc{Table of Contents}
\def\web@continued{cont.}
\def\web@article{Begin \hyperlink{\web@Start.1}{Article}}
\def\web@directory{Directory}
\def\revisionLabel#1{\def\web@revision{#1}}
\def\web@revision{Last Revision Date:}
\def\web@copyright{Copyright}
\def\nocopyright{\let\web@copyright\@gobble}
\def\nocopyrightNotice{\let\web@copyright\@gobblethree}
\def\web@section{Section}
% Label Navibar
\def\web@back{Back}
\def\web@doc{Doc}   % restricted to three characters
\title{}\author{}\email{}\subject{}\keywords{}\version{}
\university{}\copyrightyears{\the\year}
%    \end{macrocode}
%    \begin{macro}{\prtscr}
% This simple command can be use for specifying a setting for print (prt)
% and a setting for screen (scr). Do not use in the optional arguments of
% the package, but you can use in the preamble, after the \cs{ProcessOptions}
% command.
%    \begin{macrocode}
\def\prtscr#1#2{\ifeqforpaper#1\else#2\fi}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\optionalPageMatter}
%    \begin{macro}{\optionalpagematter}
% The \cs{optionalpagematter} can be used to put a small abstract on the title page,
% or any thing for that matter. The default placement is given in the \cs{maketitle}
% definition. It can be moved around by redefining \cs{maketitle}.
%    \begin{macrocode}
\newcommand{\optionalPageMatter}[1]{\def\optionalpagematter{#1}}
\def\optionalpagematter{}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
% Check whether user is using \texttt{book} or \texttt{article} class. We need
% to adjust the hyperlink target appropriately.
%    \begin{macrocode}
\@ifundefined{thechapter}
    {\def\web@Start{section}}{\def\web@Start{chapter}}
%    \end{macrocode}
% \subsubsection{Redefine \cs{maketitle}}
% In this section we define \cs{maketitle}. You can \cs{renewcommand} this
% definition at will.
%    \begin{macro}{\titleauthorproportion}
% This is the vertical proportion of \cs{textheight} that the title and author
% portion of the title page is to take up. The default is 33\% of the title page.
%    \begin{macrocode}
\newcommand\titleauthorproportion{.33}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\hproportionwebtitle}
% Proportion of the \cs{linewidth} that the title can take up. The default is 70\%.
%    \begin{macrocode}
\newcommand\hproportionwebuniversity{.7}
\newcommand\hproportionwebtitle{.7}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\hproportionwebauthor}
% Proportion of the \cs{linewidth} that the author can take up. The default is 40\%.
%    \begin{macrocode}
\newcommand\hproportionwebauthor{.4}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\minimumskip}
% Minimum skip between the major elements of the title page, see the definition of
% \cs{maketitle} below.
%    \begin{macrocode}
\newcommand\minimumskip{\medskip}
%    \end{macrocode}
%    \end{macro}
\def\web@copyright@symbol{\copyright}
\def\nocopyrightsymbol{\let\web@copyright@symbol\@gobble}
%    \begin{macro}{\titlepageTrailer}
%    \begin{macro}{\trailerFontSize}
% This command controls how the material at the bottom of the title page is constructed.
%    \begin{macrocode}
\newcommand{\trailerFontSize}{\footnotesize}
\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\ \webcopyrightyears}
\def\maketitle@trailer@ll{\web@revision\ \@date}
\def\maketitle@trailer@ur{\thewebemail}
\def\maketitle@trailer@lr{\webversion}
\newcommand{\titlepageTrailer}
{%
    \makebox[\linewidth]{\parbox{\linewidth}{%
        \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
        \maketitle@trailer@ll\hfill\maketitle@trailer@lr}}%
}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\webdirectory}
% The code that places the directory on the title page.
%    \begin{macrocode}
\newcommand\webdirectory
{%
    \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
    \begin{flushleft}\textbf{\large\web@directory}%
    \vspace{-3pt}%
    \begin{itemize}\setlength{\itemsep}{-3pt}%
        \bfseries
        \item \leavevmode\hyperlink{webtoc}{\web@toc}%
        \item \web@article
    \end{itemize}
    \end{flushleft}
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\universityColor}
%    \begin{macro}{\titleColor}
%    \begin{macro}{\authorColor}
%    \begin{macro}{\subjectColor}
% Let's add some colors to spice up the look of the page. Colors for the university, title
% and author. The \cs{subjectColor} is used in the \textsf{eqExam} package.
%    \begin{macrocode}
\newcommand{\universityColor}[1]{\def\webuniversity@color{#1}}
\universityColor{blue}
\newcommand{\titleColor}[1]{\def\webtitle@color{#1}}
\titleColor{black}
\newcommand{\authorColor}[1]{\def\webauthor@color{#1}}
\authorColor{black}
\newcommand{\subjectColor}[1]{\def\websubject@color{#1}}
\subjectColor{black}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\aboveTopTitleSkip}
% Added some glue above the \cs{webuniversity} so whole title can be moved downward.
% \changes{v4.0c}{2007/03/15}
% {
%   Added this command to be able to move whole title downward.
% }
%    \begin{macrocode}
\def\aboveTopTitleSkip#1{\def\web@aboveTopTitleSkip{#1}}
\aboveTopTitleSkip{0pt}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\topTitlePage}
% The top of the title page. This command lays out the university, the title and the author.
%    \begin{macrocode}
\newcommand{\topTitlePage}
{%
%    \end{macrocode}
% Have \cs{webuniversity} centered across the top of the title page.
%    \begin{macrocode}
    \vglue\web@aboveTopTitleSkip
    \noindent\makebox[\linewidth]{\parbox{\linewidth}%
    {\bfseries\color{\webuniversity@color}\ifeqforpaper\large\fi
    \centering\webuniversity}}\par\ifeqforpaper\else\minimumskip\fi
    \vspace{\stretch{1}}%
%    \end{macrocode}
% Now place the title (\cs{webtitle})
%    \begin{macrocode}
    \noindent\makebox[\linewidth]{%
        \parbox{\hproportionwebtitle\linewidth}%
        {\bfseries\color{\webtitle@color}\ifeqforpaper\Large\else
        \large\fi\centering\webtitle}}\par\ifeqforpaper
        \vspace{2\baselineskip}\else\minimumskip\vspace{\stretch{1}}\fi
%    \end{macrocode}
% Now place the author (\cs{webauthor})
%    \begin{macrocode}
    \noindent\makebox[\linewidth]{%
        \parbox{\hproportionwebauthor\linewidth}%
        {\bfseries\color{\webauthor@color}\ifeqforpaper
        \large\fi\centering\webauthor}}
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\maketitlepreamble}
%    \begin{macro}{\maketitlepostamble}
% The space and width commands that appear just before the top of the title page, and just
% after the trailer of the title page.
%    \begin{macrocode}
\newcommand{\maketitlepreamble}
{%
    \thispagestyle{empty}%
    \ifeqforpaper\if@centertitlepage
        \begingroup
        \linewidth=\fullscreenwidth
        \hfuzz=\oddsidemargin
        \advance\linewidth\oddsidemargin
        \setlength{\oddsidemargin}{0pt}
    \fi\fi
}
\newcommand{\maketitlepostamble}
{%
    \newpage
    \ifeqforpaper\if@centertitlepage\endgroup\fi\fi
}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\maketitle}
% Redefining \LaTeX's \cs{maketitle}. Looks a little complicated, but this is only because
% we have the forpaper design as well as the screen design defined here.
%    \begin{macrocode}
\renewcommand{\maketitle}
{%
    \maketitlepreamble
    \ifeqforpaper\vspace*{2\baselineskip}\else
%    \end{macrocode}
% If not for paper, restrict title and author to \cs{titleauthorproportion} of the page
%    \begin{macrocode}
    \vbox to\titleauthorproportion\textheight\bgroup\fi
%    \end{macrocode}
%    \begin{macrocode}
    \topTitlePage
%    \end{macrocode}
%    \begin{macrocode}
    \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
%    \end{macrocode}
% Now place the \cs{optionalpagematter}
%    \begin{macrocode}
    \optionalpagematter
    \par\vspace{\stretch{1}}
%    \end{macrocode}
% Insert the directory, as desired.
%    \begin{macrocode}
    \ifx\web@directory@option y\webdirectory\fi
    \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
%    \end{macrocode}
% Insert the ``bottom matter''.
%    \begin{macrocode}
    \vfill\noindent\begingroup
    \trailerFontSize\titlepageTrailer\par\endgroup
    \maketitlepostamble
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\makeinlinetitle}
% A simple ``inline'' make title command for simple documents. May be redefined.
%\changes{v4.0d}{2007/04/16 }
%{
%    A convenience command for making a simple in line title.
%}
%    \begin{macrocode}
\newcommand{\makeinlinetitle}
{%
    \noindent\makebox[\linewidth][c]{\bfseries\color{\webtitle@color}\webtitle}
    \makebox[\linewidth]{\shortstack[l]{\strut\\\makebox[0pt][l]{\webuniversity}\\
        \makebox[0pt][l]{\@ifundefined{aeb@prepared}{\@date}{\aeb@prepared}}}\hfill
    \shortstack[c]{\strut\webauthor\\\strut}\hfill
    \shortstack[r]{\strut\makebox[0pt][r]{\thewebemail}\\
        \makebox[0pt][r]{\@ifundefined{aeb@talksite}{\webversion}{\ifx\aeb@talksite\@empty\webversion\else\aeb@talksite\fi}}}}%
    \bigskip
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macrocode}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\ifeqforpaper\else
    \clubpenalty=50       % try to squeeze a little more in per page.
    \widowpenalty=50
\fi
%    \end{macrocode}
% \subsection{Tight Settings}
% Make normalsize math display a little tighter
% For Web application, 10pt should be used. People using the
% forpaper option might want to use 11pt or 12pt; for example
% with the eqExam.sty for publishing their exams on paper or for
% the web. So, I'll insert the boolean. Redefine \normalsize
% only for the case of 10pt, otherwise, use LaTeX's definitions.
%    \begin{macrocode}
\def\tightsettings{%
   \setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}%
   \def\@listi{\leftmargin\leftmargini
      \parsep 2\p@ \@plus2\p@ \@minus\p@  %4\p@ \@plus2\p@ \@minus\p@
      \topsep 2\p@ \@plus1\p@ \@minus\p@ %8\p@ \@plus2\p@ \@minus4\p@
      \itemsep2\p@ \@plus1\p@ \@minus\p@}%
      \let\@listI\@listi
      \@listi
      \def\@listii {\leftmargin\leftmarginii
           \labelwidth\leftmarginii
           \advance\labelwidth-\labelsep
           \topsep    \z@ \@plus\p@ \@minus\p@
           \parsep    \z@ \@plus\p@  \@minus\p@
           \itemsep   \parsep}%
     \def\@listiii{\leftmargin\leftmarginiii
           \labelwidth\leftmarginiii
           \advance\labelwidth-\labelsep
           \topsep    \z@ \@plus\p@\@minus\p@
           \parsep    \z@
           \partopsep \p@ \@plus\z@ \@minus\p@
           \itemsep   \topsep}%
}
\ifnum\@ptsize=0
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt\@xiipt
   \abovedisplayskip 5\p@ \@plus3\p@ \@minus1\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 3\p@ \@plus2\p@ \@minus2pt
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\normalsize
\fi
%    \end{macrocode}
% \subsection{Navgational Aids}
% \subsubsection{Navigational Bar}
% Navigational Bar, appears in response to the option \texttt{navibar}.
%    \begin{macro}{\navibarTextColor}
% Color for text in the navigational bar
%    \begin{macrocode}
\def\navibarTextColor#1{\def\@menucolor{#1}}
\def\@menucolor{webblue}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\navibarBgColor}
% Color for background in the navigational bar
%    \begin{macrocode}
\def\navibarBgColor#1{\def\@menuBgColor{#1}}
\def\@menuBgColor{webgray}
%    \end{macrocode}
%    \end{macro}
%    \begin{macrocode}
\newcommand{\newNaviIcon}[1][\@empty]
{%
    \ifx#1m\let\next=\@newNaviIconMenu
    \else\ifx#1j\let\next=\@newNaviIconJS
    \else\ifx#1l\let\next=\@newNaviIconLink
    \else\ifx#1\@empty\let\next=\@newNaviIconLink
    \else\let\next=\relax
    \typeout{\string\newNaviIcon: unknown first parameter}
    \fi\fi\fi\fi
    \next
}
%    \end{macrocode}
%    \begin{macro}{\@newNaviIconMenu}
% This command uses the hyperref command \cs{Acrobatmenu} to create navigational link button. The
% action for this type is restricted to named menu actions.
%\begin{verbatim}
%Parameters
%  [#1] = optional parameter for setting the highlight, N (none),
%         I (invert, the default), O (outline), P (push, also called Inset)
%   #2 = command name of the new navigational icon
%   #3 = width of icon
%   #4 = height of icon
%   #5 = text to appear in the center of the icon.
%   #6 = named menu action, e.g., NextPage, PrevPage, etc.
%\end{verbatim}
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
%    \begin{macrocode}
\def\web@colorbox@w@transparency#1{%
    \ifx#1\@empty\setlength{\fboxrule}{0pt}\let\aeb@next\fbox\else
    \def\aeb@next{\colorbox{#1}}\fi\aeb@next}
\newcommand{\@newNaviIconMenu}[6][I]
{%
    \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
        \Acrobatmenu{#6}{%
        \web@colorbox@w@transparency{\@menuBgColor}{%
            \parbox[c][#4][c]{#3}{\normalsize\centering#5}}}%
        }}%
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@newNaviIconJS}
% Another navigational icon/button, but this one allows for arbitrary JavaScript actions.
%\begin{verbatim}
%Parameters
%  [#1] = optional parameter for setting the highlight, N (none),
%         I (invert, the default) O (outline), P (push, also called Inset)
%   #2 = command name of the new navigational icon
%   #3 = width of icon
%   #4 = height of icon
%   #5 = text to appear in the center of the icon.
%   #6 = JavaScript commands to be executed when the button is clicked.
%\end{verbatim}
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
%    \begin{macrocode}
\newcommand{\@newNaviIconJS}[6][I]
{%
    \ifcase\eq@drivernum
        \def#2{{\setlength{\fboxsep}{0pt}%
            \pdf@rect{\web@colorbox@w@transparency{\@menuBgColor}%
                {\parbox[c][#4][c]{#3}%
                {\normalsize\centering\color{\@menucolor}#5}}}%
            \literalps@out{%
            [ /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
            /Border [0 0 0 ] /H/#1\space
            /Action &lt;&lt; /S /JavaScript /JS (#6) &gt;&gt;
            /Subtype /Link
            /ANN pdfmark}%
        }}%
    \or
        \def#2{{\setlength{\fboxsep}{0pt}%
            \leavevmode\pdfstartlink
                attr {/Border [0 0 0 ] /H/#1}%
                user{ /Subtype /Link
                /A &lt;&lt; /S /JavaScript /JS (#6) &gt;&gt;}%
                \web@colorbox@w@transparency{\@menuBgColor}%
                {\parbox[c][#4][c]{#3}%
                {\normalsize\centering\color{\@menucolor}#5}}%
            \pdfendlink
        }}%
    \or
        \def#2{{\setlength{\fboxsep}{0pt}%
            \@pdfm@mark{bann
                &lt;&lt;
                    /Border [0 0 0 ] /H/#1\space
                    /Subtype /Link
                    /A &lt;&lt; /S /JavaScript /JS (#6) &gt;&gt;
                &gt;&gt;}\web@colorbox@w@transparency{\@menuBgColor}%
                    {\parbox[c][#4][c]{#3}%
                    {\normalsize\centering\color{\@menucolor}#5}}%
            \@pdfm@mark{eann}%
        }}%
    \fi
}
%    \end{macrocode}
%    \end{macro}
% Another navigational icon/button, this one allows jumping to a named destination.
%\begin{verbatim}
%Parameters
%  [#1] = optional parameter for setting the highlight, N (none),
%         I (invert, the default), O (outline), P (push, also called Inset)
%   #2 = command name of the new navigational icon
%   #3 = width of icon
%   #4 = height of icon
%   #5 = text to appear in the center of the icon.
%   #6 = \hyperlink or \href with its first argument
%\end{verbatim}
% For example,
%\begin{verbatim}
%\newNaviIcon[l]{\Home}{40pt}{15pt}{\footnotesize Home}
%   {\href{http://www.math.uakron.edu/}}
%\end{verbatim}
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
%    \begin{macrocode}
\newcommand{\@newNaviIconLink}[6][I]
{%
    \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
        #6{\web@colorbox@w@transparency{\@menuBgColor}%
        {\parbox[c][#4][c]{#3}%
        {\normalsize\centering\color{\@menucolor}#5}}}%
    }}%
}
%    \end{macrocode}
%    \begin{macrocode}
\let\insertwebtoc\relax
\def\insert@webtoc{\web@TOC\ }
\newNaviIcon[l]{\web@TOC}{34pt}{10pt}{\footnotesize Toc}
   {\hyperlink{webtoc}}
%    \end{macrocode}
% Some icon definitions that are used in the navigational bar that appears at the bottom of the page.
%    \begin{macrocode}
\@newNaviIconMenu{\web@FirstPage}{34pt}{10pt}
    {$\blacktriangleleft\blacktriangleleft$}{FirstPage}
\@newNaviIconMenu{\web@LastPage}{34pt}{10pt}
    {$\blacktriangleright\blacktriangleright$}{LastPage}
\@newNaviIconMenu{\web@PrevPage}{34pt}{10pt}
    {$\blacktriangleleft$}{PrevPage}
\@newNaviIconMenu{\web@NextPage}{34pt}{10pt}
    {$\blacktriangleright$}{NextPage}
\@newNaviIconMenu{\web@GoBack}{34pt}{10pt}
    {\footnotesize\web@back}{GoBack}
\@newNaviIconMenu{\web@GoBackDoc}{34pt}{10pt}
    {$\blacktriangleleft$\ \footnotesize\web@doc}{GoBackDoc}
\@newNaviIconMenu{\web@GoForwardDoc}{34pt}{10pt}
    {\footnotesize\web@doc\ \normalsize$\blacktriangleright$}
    {GoForwardDoc}
%    \end{macrocode}
%    \begin{macro}{\web@navigationbar}
% The navigational bar, this can be redefined.
%    \begin{macrocode}
\newcommand\web@navigationbar{%
\hfil\bfseries\footnotesize
\insertwebtoc
\web@FirstPage\
\web@LastPage\
\web@PrevPage\
\web@NextPage\
\web@GoBack\
\web@GoBackDoc\
\web@GoForwardDoc
\hfil}
%    \end{macrocode}
%    \end{macro}
% Here are some icon buttons for the panel, if a panel is desired.
%    \begin{macrocode}
\@newNaviIconMenu{\panel@FirstPage}{28pt}{15pt}
    {$\blacktriangleleft\blacktriangleleft$}{FirstPage}
\@newNaviIconMenu{\panel@LastPage}{28pt}{15pt}
    {$\blacktriangleright\blacktriangleright$}{LastPage}
\@newNaviIconMenu{\panel@PrevPage}{28pt}{15pt}
    {$\blacktriangleleft$}{PrevPage}
\@newNaviIconMenu{\panel@NextPage}{28pt}{15pt}
    {$\blacktriangleright$}{NextPage}
\@newNaviIconMenu{\panel@GoBack}{28pt}{15pt}
    {\footnotesize\web@back}{GoBack}
\@newNaviIconMenu{\panel@GoBackDoc}{28pt}{15pt}
    {$\blacktriangleleft$\,\footnotesize\web@doc}{GoBackDoc}
\@newNaviIconMenu{\panel@GoForwardDoc}{28pt}{15pt}
    {\footnotesize\web@doc\,\normalsize$\blacktriangleright$}
    {GoForwardDoc}
\@newNaviIconMenu{\panel@Close}{28pt}{15pt}{\footnotesize Close}{Close}
%    \end{macrocode}
% Standard navigational group for a panel.
%    \begin{macrocode}
\newcommand\panelNaviGroup
{%
    \parbox[c]{58pt}
    {%
        \panel@FirstPage\hfil\panel@LastPage\\
        \panel@PrevPage\hfil\panel@NextPage\\
        \panel@GoBackDoc\hfil\panel@GoForwardDoc\\
        \panel@GoBack\hfil\panel@Close
    }%
}
%    \end{macrocode}
%    \begin{macro}{\insNaviBar}
% Now, if the navibar option is not on, we can insert arbitrarily defined navigational objects
% through the use of \cs{insNaviBar}. There is two forms for this macro: star and no star. The star
% version makes a global definition, whereas the nostar does not. The command \cs{insNaviBar}
% just defines one of two macros, \cs{gdefInsNaviBar} and \cs{defInsNaviBar}, depending on the
% `star'.
%    \begin{macrocode}
\let\ins@NaviBar=\@empty
\newcommand\insNaviBar{\@ifstar{\@gdefInsNaviBar}{\@defInsNaviBar}}
\def\@gdefInsNaviBar#1{\gdef\ins@NaviBar{#1}}
\def\@defInsNaviBar#1{\def\ins@NaviBar{#1}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\insNaviBarOff}
% Turn the \cs{insNaviBar} off with this macro.
%    \begin{macrocode}
\newcommand\insNaviBarOff{\global\let\ins@NaviBar=\@empty}
%    \end{macrocode}
%    \end{macro}
% \subsubsection{More Navigational Things}
% Navigational Aids
%    \begin{macro}{\insertnaviiconhere}
% Inserts a direction icon on the page on which the command appears.
%    \begin{macrocode}
\newcommand{\insertnaviiconhere}[1]
{%
    \xdef\@thispage{\the\c@page}%
    \rheader{\ifnum\c@page=\@thispage#1\else\web@defaultrightheader\fi}
%    \gdef\web@rightheader
%    {%
%        \ifnum\c@page=\@thispage#1
%        \else\web@defaultrightheader\fi
%    }%
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\insertnaviiconhereafter}
% Inserts a direction icon on the current page, and every page thereafter.
%    \begin{macrocode}
\def\insertnaviiconhereafter#1{\lheader{#1}}
%\def\insertnaviiconhereafter#1{\gdef\web@rightheader{#1}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\defaultpageheader}
% Removes the running icon from the header.
%    \begin{macrocode}
\def\defaultpageheader{\lheader{\web@defaultrightheader}}
%\def\defaultpageheader{\gdef\web@rightheader{\web@defaultrightheader}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\ArrowUp}
%    \begin{macro}{\ArrowDown}
% Pre-Fab Rule Icons \cs{Uparrow} and \cs{Downarrow}, for example,
%\begin{verbatim}
%\insertnaviiconhere{\ArrowUp{\href{http://www.adobe.com/}}}
%\end{verbatim}
%    \begin{macrocode}
\newcommand\ArrowUp[1]
{%
    \setlength{\fboxsep}{6pt}\normalsize
    \raisebox{-\depth}[0pt][0pt]{#1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
    {\textcolor{\web@directionIconTextColor}{$\bigl\Uparrow$}}}}%
}
\newcommand\ArrowDown[1]
{
    \setlength{\fboxsep}{6pt}\normalsize
    \raisebox{-\depth}[0pt][0pt]{#1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
    {\textcolor{\web@directionIconTextColor}{$\bigl\Downarrow$}}}}
}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\directionIconTextColor}
%    \begin{macro}{\directionIconBgColor}
% Text and background color can be changed through these two commands.
%    \begin{macrocode}
\def\directionIconTextColor#1{\def\web@directionIconTextColor{#1}}
\def\web@directionIconTextColor{webblue}
\def\directionIconBgColor#1{\def\web@directionIconBgColor{#1}}
\def\web@directionIconBgColor{webgray}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
% \subsection{Web Headings}
%
% |\pagestyle{webheadings}|
%
%    \begin{macro}{\lheader}
%    \begin{macro}{\cheader}
%    \begin{macro}{\rheader}
% The standard running headers for \textsf{Web}
%    \begin{macrocode}
\def\web@defaultrightheader{\thepage}
\let\web@headerhook\@empty
\let\web@footerhook\@empty
\def\lheader#1{\gdef\web@lhead{#1}}
\def\cheader#1{\gdef\web@chead{#1}}
\def\rheader#1{\gdef\web@rightheader{#1}}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
% Set default headers
%    \begin{macrocode}
\lheader{\rightmark}
\cheader{}
\rheader{\web@defaultrightheader}
%    \end{macrocode}
%    \begin{macro}{\lfooter}
%    \begin{macro}{\cfooter}
%    \begin{macro}{\rfooter}
% The standard running footers for \textsf{Web}
%    \begin{macrocode}
\def\lfooter#1{\gdef\web@lfoot{#1}}
\def\cfooter#1{\gdef\web@cfoot{#1}}
\def\rfooter#1{\gdef\web@rfoot{#1}}
% Set default headers
%    \begin{macrocode}
\lfooter{}\rfooter{}
\cfooter{\ifweb@navibar\web@navigationbar\else
    \ins@NaviBar\global\let\ins@NaviBar=\@empty\fi}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\clearHeaders}
%    \begin{macro}{\restoreHeaders}
%    \begin{macro}{\headerformat}
% Here we offer a simple mechanism for saving and restoring running headers.
%    \begin{macrocode}
\newcommand{\clearHeaders}{%
    \let\web@lhead@save\web@lhead
    \let\web@chead@save\web@chead
    \let\web@rightheader@save\web@rightheader
    \let\web@lhead\@empty\let\web@chead\@empty
    \let\web@rightheader\@empty}
\newcommand{\restoreHeaders}{%
    \let\web@lhead\web@lhead@save
    \let\web@chead\web@chead@save
    \let\web@rightheader\web@rightheader@save}
%    \end{macrocode}
% You can use this command to insert additional formatting into the running header.
% For example, \verb!\headerformat{\bfseries\color{red}}!.
%    \begin{macrocode}
\def\headerformat#1{\def\apb@headerformat{#1}}
\def\web@headerhook{\apb@headerformat}
\let\apb@headerformat\@empty
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\ps@webheadings}
% Standard headings for Web
%    \begin{macrocode}
\newcommand{\ps@webheadings}
{%
    \renewcommand{\@oddhead}{\normalfont\footnotesize\web@headerhook
        \web@lhead\hfil\web@chead\hfil\web@rightheader}
    \renewcommand{\@evenhead}{\@oddhead}
    \renewcommand{\@oddfoot}{\web@footerhook\web@lfoot\hfil
        \web@cfoot\hfil\web@rfoot}
    \renewcommand{\@evenfoot}{\@oddfoot}
}
%    \end{macrocode}
%    \end{macro}
% Make the sections in the format we want in the left side of the runnning
% header
%    \begin{macrocode}
%\renewcommand{\sectionmark}[1]{%
%    \markright{\web@section\ \thesection: #1}}
%    \begin{macrocode}
\renewcommand{\sectionmark}[1]{\markboth{}{\web@section\ \thesection: #1}}
%    \end{macrocode}
% We try to create a running header where the section title does
% not appear in the header on the same page as the section is
% inserted, on subsequent pages, the section head appears, I hope.
%    \begin{macrocode}
\def\aeb@gettopmark#1#2{\def\aeb@topmark{#2}}
\def\aeb@getbotmark#1#2{\def\aeb@botmark{#2}}
\def\aeb@setmarks{%
    \expandafter\aeb@gettopmark\topmark{}{}%
    \expandafter\aeb@getbotmark\botmark{}{}%
    \ifx\aeb@topmark\aeb@botmark\rightmark\fi
}
\lheader{\aeb@setmarks}
%    \end{macrocode}
%    \begin{macrocode}
\AtEndOfPackage{\pagestyle{webheadings}}
%    \end{macrocode}
% \subsection{Sectioning}
%    \begin{macrocode}
\renewcommand*\thesection{\arabic{section}}
\renewcommand*\thesubsection{\thesection.\arabic{subsection}}
\renewcommand*{\thesubsubsection}{\textbullet}
\renewcommand{\section}{%
   \renewcommand{\@seccntformat}[1]{\csname the##1\endcsname.\enspace}%
   \@startsection{section}{1}{\z@}%
   {-3ex\@plus -1ex \@minus-.2ex}%
   {1ex\@plus .2ex}% 6pt
   {\noindent\normalfont\normalsize\bfseries\color{blue}}}%
\renewcommand\subsection{%
   \renewcommand{\@seccntformat}[1]{\csname the##1\endcsname.\enspace}%
   \@startsection{subsection}{2}{\z@}%
   {-2.5ex\@plus -1ex \@minus -.2ex}%
   {1ex\@plus .2ex}%
   {\noindent\normalfont\normalsize\bfseries\color{blue}}}
\renewcommand\subsubsection{%
   \renewcommand{\@seccntformat}[1]{\color{blue}\large$\bullet$\enspace}
   \@startsection{subsubsection}{3}{\z@}%
     {-2ex\@plus -1ex \@minus -.2ex}%
     {.5ex\@plus .2ex}%
     {\noindent\normalfont\normalsize\bfseries}}
%    \end{macrocode}
%    \begin{macrocode}
\def\aebwritelastpage{%
    \immediate\write\@auxout{\string\expandafter\string\gdef
    \string\csname\space aebLastPage\string\endcsname{\arabic{page}}}%
}
\AtEndDocument{%
    \clearpage\addtocounter{page}{-1}\aebwritelastpage
    \addtocounter{page}{1}%
}
%    \end{macrocode}

% \subsection{Web Colors}
% Some Useful Colors
%    \begin{macrocode}
\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}
\definecolor{webyellow}{rgb}{0.98,0.92,0.73}
\definecolor{webgray}{rgb}{.753,.753,.753}
\definecolor{webgrey}{rgb}{.753,.753,.753}
\definecolor{webblue}{rgb}{0,0,.8}
%    \end{macrocode}
% These definitions are taken from pdfscreen.sty, by Radhakrishnan C. V.. These are
% part of the 216 Web friendly colors.
%    \begin{macrocode}
\definecolor{wheat}{rgb}{.96, .87, .70}
\definecolor{oldlace}{rgb}{.992, .96187, .902}
\definecolor{snow}{rgb}{1, .98, .98}
\definecolor{ghostwhite}{rgb}{.973, .973, 1}
\definecolor{cornsilk}{rgb}{1, .973, .863}
\definecolor{honeydew}{rgb}{.941, 1, .941}
\definecolor{lavenderdark}{rgb}{.8, .8, .9529411}
\definecolor{lavender}{rgb}{.902, .902, .980}
\definecolor{lightblue}{rgb}{.8, .8, .95}
\definecolor{lightgray}{rgb}{.827, .827, .827}
\definecolor{lightsteelblue}{rgb}{.690, .769, .871}
\definecolor{lightturquoise}{rgb}{.686, .933, .933}
\definecolor{darkgreen}{rgb}{.0, .392, .0}
\definecolor{yellowgreen}{rgb}{.604, .804, .196}
\definecolor{vlightblue}{rgb}{.88, .85, .95}
\definecolor{khaki}{rgb}{.741, .718, .42}
%    \end{macrocode}
% \subsection{Redefine Table of Contents}
% Redefine the table of contents.
%    \begin{macrocode}
\ifx\web@latextoc y%
    \@ifclassloaded{book}
    {% book.cls
        \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{1.3em}}
        \renewcommand*\l@subsection{\@dottedtocline{2}{2.8em}{2.2em}}
        \renewcommand*\l@subsubsection{\@dottedtocline{3}{5.0em}{1.2em}}
    }{% article.cls
        \if@defaultsubsubding
            \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{1.2em}}
        \else
            \if\webpro@loaded y%
                \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
            \else
                \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{1.2em}}
            \fi
        \fi
    }
\fi
\renewcommand\part{\secdef\web@@part\web@@spart}
\def\web@@part[#1]#2{%
    \newpage
    \ifnum \c@secnumdepth &gt;\m@ne
      \refstepcounter{part}%
    \fi
    \addcontentsline{toc}{part}{#1}%
    {%
        \parindent \z@ \raggedright
        \interlinepenalty \@M
        \normalfont
        \large \bfseries #2%
        \markboth{}{}\par
    }%
    \nobreak
    \vskip 1ex
    \@afterheading
}
\def\web@@spart#1{%
    {
        \parindent \z@ \raggedright
        \interlinepenalty \@M
        \normalfont
        \large \bfseries #1\par
    }%
    \nobreak
    \vskip 1ex
    \@afterheading
}
\@ifclassloaded{book}
{%
    \renewcommand\chapter
    {%
        \global\@topnum\z@
        \@afterindentfalse
        \secdef\web@@chapter\web@@schapter
    }
    \def\web@@chapter[#1]#2{%
        \ifnum \c@secnumdepth &gt;\m@ne
        \if@mainmatter
            \refstepcounter{chapter}%
            \typeout{\@chapapp\space\thechapter.}%
            \addcontentsline{toc}{chapter}%
                    {\protect\numberline{\thechapter}#1}%
        \else
            \addcontentsline{toc}{chapter}{#1}%
        \fi
        \else
            \addcontentsline{toc}{chapter}{#1}%
        \fi
        \chaptermark{#1}%
        \addtocontents{lof}{\protect\addvspace{10\p@}}%
        \addtocontents{lot}{\protect\addvspace{10\p@}}%
        \if@twocolumn
            \@topnewpage[\web@makechapterhead{#2}]%
        \else
            \web@makechapterhead{#2}%
            \@afterheading
        \fi
    }
    \def\web@makechapterhead#1{%
        \vspace{3\p@}%
        {%
            \parindent \z@ \raggedright \normalfont
            \ifnum \c@secnumdepth &gt;\m@ne
                \if@mainmatter
                    \large\bfseries \@chapapp\space \thechapter:
                    \par\nobreak
                \fi
            \fi
            \interlinepenalty\@M
            \noindent\enspace\large \bfseries #1\par\nobreak
            \vskip 12\p@
        }%
    }
    \def\web@@schapter#1{%
        \if@twocolumn
        \@topnewpage[\@makeschapterhead{#1}]%
        \else
        \web@makeschapterhead{#1}%
        \@afterheading
        \fi
    }
    \def\web@makeschapterhead#1{%
        \vspace{3\p@}%
        {%
            \parindent \z@ \raggedright
            \normalfont
            \interlinepenalty\@M
            \large \bfseries  #1\par\nobreak
            \vskip 12\p@
        }%
    }
}{} % end \ifpackageloaded{book}
%    \end{macrocode}
% Before we begin to redefined the table of contents, let's save the old definition:
%\changes{v3.3a}{2006/06/25}
%{
%  Added the command \cs{tocColor} to define the color of the table of contents heading.
%  The argument of \cs{tocColor} is a named color.
%}
%    \begin{macrocode}
\def\tocColor#1{\def\web@tocColor{#1}\def\aeb@toccolor{#1}}
\tocColor{blue}
\let\weblatextocsave=\tableofcontents
\ifx\web@bullets y%
\def\tableofcontents
{%
    \global\let\insertwebtoc=\insert@webtoc
    \def\contentsname{\web@toc}%
    \pdfbookmark[1]{\web@toc}{toc}%
        \thispagestyle{empty}%
        \markright{{\normalfont\small \web@toc\ (\web@continued)}}%
        \@ifundefined{sectionToc}{%
            \begin{center}\hypertarget{webtoc}{}%
            \normalfont\bfseries\Large\color{\web@tocColor}%
            \contentsname
            \end{center}
        }{\sectionToc{\web@toc}}\par
    \ifx\web@latextoc y%
       \@starttoc{toc}%  LaTeX toc listing with page numbers
    \else
        \noindent\webtableofcontents
    \fi
    \newpage
}
\else
\typeout{No Bullets Requested}
\let\tableofcontents=\weblatextocsave
\renewcommand\subsubsection{%
   \renewcommand{\@seccntformat}[1]{\csname the##1\endcsname.\enspace}
   \@startsection{subsubsection}{3}{\z@}%
     {-2ex\@plus -1ex \@minus -.2ex}%
     {.5ex \@plus .2ex}%
     {\noindent\normalfont\normalsize\bfseries}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\renewcommand*{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\fi
%    \end{macrocode}
% Routines for typesetting toc entries.
%    \begin{macrocode}
\def\widestNumber#1{\def\widest@Number{#1}}
\widestNumber{0.0.}
\def\tocindent#1{\def\toc@indent{#1}}
\tocindent{20pt}
\def\webtableofcontents
{%
    \begingroup
%    \end{macrocode}
% Sample line from .aux
%\begin{verbatim}
%   \contentsline {section}{\numberline {1}Introduction}{4}{section.1}
%   \contentsline {section}{\numberline {}References}{56}{section*.1}
%                                #1                   #2     #3
%\end{verbatim}
%    \begin{macrocode}
    \parindent=\toc@indent
    \settowidth{\@tempdima}{\normalfont\textbf{\widest@Number})}% \if\aeb@use@section@numbers0
    \@tempdimb = \@tempdima
    \advance\@tempdimb by\parindent
    \def\par{\endgraf\leftskip=0pt}%
    \def\numberline##1{\makebox[0pt]{##1\enspace}}%
    \def\contentsline##1##2##3##4{%
        \csname web@##1\endcsname{##2}{##3}{##4}}%
    \def\web@parse##1##2##3\\{%
        \def\web@title{##3}\def\numberline{##2}}%
    \def\web@part##1##2##3{%
        \par\noindent{\bfseries\hyperlink{##3}{##1}}\par\smallskip}
    \def\web@chapter##1##2##3{%
        \web@parse##1\\\par\mbox{}\textbf{%
        \makebox[0pt][r]{\hyperlink{##3}
            {\numberline.\phantom{0}}\space}\web@title}%
    }%
    \def\web@section##1##2##3{%
        \penalty-500\web@parse##1\\\par\smallskip\mbox{}\textbf{%
            \ifx\numberline\@empty
                \@ifundefined{d@DingToc}{\hyperlink{##3}{\web@title}}
                {%
                    \ifx\d@DingToc\@empty
                        \hyperlink{##3}{\web@title}%
                    \else
                        \if\aeb@use@section@numbers0\relax
                            \makebox[0pt][r]{\color{\d@DingTocColor}\d@DingToc\space}\hyperlink{##3}{\web@title}%
                        \else
                            \hyperlink{##3}{\web@title}%
                        \fi
                    \fi
                }%
            \else
                \makebox[0pt][r]{\hyperlink{##3}{\numberline.}\space}\web@title
            \fi}\endgraf
    }%
    \def\web@subsection##1##2##3{\web@parse##1\\\par
        \penalty-50 \hspace*{\@tempdima}\mbox{}\textbf{%
        \ifx\numberline\@empty
            \@ifundefined{dd@DingToc}{\hyperlink{##3}{\web@title}}
            {%
                \ifx\dd@DingToc\@empty
                    \hyperlink{##3}{\web@title}%
                \else
                    \makebox[0pt][r]{\color{\dd@DingTocColor}%
                    \dd@DingToc\space}\hyperlink{##3}{\web@title}%
                \fi
            }%
        \else
            \makebox[0pt][r]{\makebox[\@tempdima][l]%
            {\hyperlink{##3}{\numberline.}}}\web@title
        \fi}\endgraf
    }%
    \def\web@subsubsection##1##2##3{%
        \web@parse##1\\\def\numberline{\strut$\bullet$}%
    \leftskip\@tempdimb\noindent\unskip\mbox{}\penalty-50
    \@ifundefined{ddd@DingToc}{}{\if\aeb@use@section@numbers0\relax\ifx\ddd@DingToc\@empty
        \else\def\numberline{\color{\ddd@DingTocColor}\strut\ddd@DingToc}%
    \fi\fi}\hyperlink{##3}{\numberline}~\web@title\
    }%
    \@starttoc{toc}
    \leftskip\@tempdimb
    \par\endgroup
}
%    \end{macrocode}
%\subsection{Template Building and Management}
% The Template, or overlay, capability of the Web Package depends on the \LaTeX{} Packages
% \textsf{everyshi.dtx}, by Martin Schr\"oder, and \textsf{eso-pic.dtx}, by  Rolf Niepraschk.
%
% As with pdfscreen, by Radhakrishnan C. V., we shall have two options, \texttt{leftpanel}
% and \texttt{rightpanel}.  Below we define two commands \cs{template} and \cs{paneltemplate}:
% \cs{template} overlays a background onto the text portion of the screen and
% \cs{paneltemplate} overlays onto the panel portion of the screen.
% If a panel option has not been taken, and \cs{template} has been specified, it will overlay the entire
% screen.
%
% Templates, or overlays, are available only for the
% \texttt{dvipsone}, \texttt{dvips}, and \texttt{pdftex} options.
%
% \subsubsection{The Text Screen Template}
% These commands define and manage the text screen templates.
%\par\medskip\noindent
% \cs{web@textTemplate} will be a macro that holds all commands for building the text template.
% Initially it is set to \cs{@empty}. Text template commands are added using
% \cs{AddToTextTemplate}. Since we are using \textsf{eso-pic}, template objects are placed in the
% background using the \cs{put} command of the picture environment. The \cs{AddToTemplate}, defined below,
% does exactly that.
%    \begin{macrocode}
\let\web@textTemplate=\@empty
\newcommand{\@AddToTextTemplate}{\g@addto@macro\web@textTemplate}
%    \end{macrocode}
%    \begin{macro}{\template}
% Define a graphic file here that will be inserted into the
% background.  The command has two parameters, the first of which
% is optional.  Use any  of the \emph{boolean keys} of the
% \cs{includegraphics} command. Do not use the \texttt{width} or
% \texttt{height} keys in this optional argument. For example,
%\begin{verbatim}
%  \template[hiresbb]{myBG}
%\end{verbatim}
% Causes the driver to import the graphic using the high resolution bounding
% box.
% It is assumed that a graphic defined by \cs{template} is intended to fill the entire
% background. The command \cs{template} defines \cs{web@template}, which is a text macro
% that actually holds the name of the current graphic.
%    \begin{macrocode}
\newcommand{\template}[2][]
{%
    \ifweb@allowtemplates
        \def\web@argi{#1}\ifx\web@argi\@empty
        \edef\web@template@opt@args{\web@addtotemplateArgs}%
        \else\edef\web@template@opt@args{\web@addtotemplateArgs,#1}%
        \fi\gdef\web@template{#2}%
    \fi
}
%    \end{macrocode}
% The text macro \cs{web@template} holds the name of the current graphic.  It starts off as
% \cs{@empty}.
%    \begin{macrocode}
\let\web@template=\@empty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addtotemplateArgs}
%    \begin{macro}{\cleartemplateArgs}
% These commands can be used to globally effect the argument list
% of the \cs{template} command.  To always use the hires bounding
% box for all templates, use \verb!\addtotemplateArgs{hiresbb}!.
% The other command clears the current argument list.
%    \begin{macrocode}
\def\addtotemplateArgs#1{\gdef\web@addtotemplateArgs{#1}}
\def\cleartemplateArgs{\global\let\web@addtotemplateArgs=\@empty}
\let\web@addtotemplateArgs=\@empty
\let\text@scaletype=\@empty
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\textBgColor}
% Use this command to define a background color for the text screen; for example,
% |\textBgColor{webyellow}|. The argument of \cs{textBgColor} is a named color defined
% by the \cs{definecolor} command of the \textsf{color} package.
%    \begin{macrocode}
\newcommand{\textBgColor}[1]{\gdef\web@textBgColor{#1}}
\let\web@textBgColor=\@empty
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\AddToTemplate}
% General purpose command for adding objects to the background of the text screen region; it is
% this command that a document author should use, rather than \cs{AddToTextTemplate}.  The one
% parameter is one or more text/graphics commands, for those who want to create their own unique
% background.
%    \begin{macrocode}
\let\listAddToTemplates=\@empty
\newcommand{\AddToTemplate}[1]
{%
    \expandafter\global\expandafter\let\csname eqTmpl#1\endcsname=y%
    {\toks@=\expandafter{\listAddToTemplates}%
    \xdef\listAddToTemplates{\the\toks@\noexpand\\{#1}}}%
    \ifweb@allowtemplates
    \@AddToTextTemplate
    {%
        \expandafter\ifx\csname eqTmpl#1\endcsname y%
            \fboxsep=0pt\setlength{\unitlength}{1pt}%
            \put(\@textX,0){\csname#1\endcsname}%
        \fi
    }%
    \else
        \expandafter\ifx\csname#1\endcsname\BGColorAndGraphic
            \@AddToTextTemplate
            {%
                \expandafter\ifx\csname eqTmpl#1\endcsname y%
                    \fboxsep=0pt\setlength{\unitlength}{1pt}%
                    \put(\@textX,0){\csname#1\endcsname}%
                \fi
            }%
        \fi
        \expandafter\ifx\csname#1\endcsname\BGColorAndGraphicFullWidth
            \@AddToTextTemplate
            {%
                \expandafter\ifx\csname eqTmpl#1\endcsname y%
                    \fboxsep=0pt\setlength{\unitlength}{1pt}%
                    \put(\@textX,0){\csname#1\endcsname}%
                \fi
            }%
        \fi
    \fi
}
%    \end{macrocode}
%    \end{macro}
% This little fellow gobbles up one token and leaves a \cs{mbox}. See the definitions of \cs{BGColorAndGraphic}
% and \cs{buildPanelBackgound}.
%    \begin{macrocode}
\def\gobblembox#1{\mbox}
%    \end{macrocode}
%    \begin{macro}{\BGColorAndGraphic}
% Insert a background color or a page filling graphic. Fills the page with either the value of
% \cs{web@textBgColor}, which is access by the user through \cs{textBgColor}, or by the value of
% \cs{web@template}, which is defined by the author using \cs{template}
%    \begin{macrocode}
\newcommand\BGColorAndGraphic
{%
%    \end{macrocode}
% If \cs{web@textBgColor} is empty, we replace \cs{colorbox} with an \cs{mbox}, and gobble
% up the first argument of the \cs{colorbox}, which is the color. This is what \cs{gobblembox}
% does, it gobbles up the next token, and inserts a \cs{mbox}.
%    \begin{macrocode}
    \web@colorbox@w@transparency{\web@textBgColor}%
    {%
        \parbox[b][\paperheight]{\textscreenwidth}%
        {%
            \ifx\web@template\@empty
                \hfill\vfill
            \else
                \hfuzz=1pt\vfuzz=1pt\expandafter
                \includegraphics\expandafter[\web@template@opt@args,%
                width=\textscreenwidth,height=\paperheight]%
                {\web@template}%
            \fi
        }%
    }%
}
%    \end{macrocode}
%    \end{macro}
% Now use \cs{AddToTemplate} to add in the background color and graphic.
%    \begin{macrocode}
\AddToTemplate{BGColorAndGraphic}
%\AddToTemplate{\BGColorAndGraphic}
%    \end{macrocode}
% \subsubsection{Panel Template}
% These are the commands that help build the (navigational) panel. We separate the task of building
% the panel into two separate operations: (1) build the background color/graphic; (2) build the
% material that lays on top of this background, such as a logo and navigation buttons, etc. The former
% is created by the \cs{panelBgColor} and \cs{paneltemplate} commands, respectively.  The later is
% build by the \cs{buildpanel}.
%    \begin{macrocode}
\let\web@panelTemplate=\@empty
\newcommand{\@AddToPanelTemplate}{\g@addto@macro\web@panelTemplate}
%    \end{macrocode}
%    \begin{macro}{\AddToPanelTemplate}
% General purpose command for adding objects to the background of the text screen region; it is
% this command that a document author should use, rather than \cs{AddToTextTemplate}.  The one
% parameter is one or more text/graphics commands, for those who want to create their own unique
% background.
%    \begin{macrocode}
\let\listAddToPanelTemplates=\@empty
\newcommand{\AddToPanelTemplate}[1]
{%
    \expandafter\global\expandafter
    \let\csname eqPanTmpl#1\endcsname=y%
    {\toks@=\expandafter{\listAddToPanelTemplates}%
    \xdef\listAddToPanelTemplates{\the\toks@\noexpand\\{#1}}}
    \ifweb@allowtemplates
    \@AddToPanelTemplate
    {%
        \expandafter\ifx\csname eqPanTmpl#1\endcsname y%
            \fboxsep=0pt\setlength{\unitlength}{1pt}%
            \put(\@panelX,0){\csname#1\endcsname}%
        \fi
    }%
    \else
        \expandafter\ifx\csname#1\endcsname\standardPanelBG
            \@AddToPanelTemplate
            {%
                \expandafter\ifx\csname eqPanTmpl#1\endcsname y%
                    \fboxsep=0pt\setlength{\unitlength}{1pt}%
                    \put(\@panelX,0){\csname#1\endcsname}%
                \fi
            }%
        \fi
        \expandafter\ifx\csname#1\endcsname\web@buildpanel
            \@AddToPanelTemplate
            {%
                \expandafter\ifx\csname eqPanTmpl#1\endcsname y%
                    \fboxsep=0pt\setlength{\unitlength}{1pt}%
                    \put(\@panelX,0){\csname#1\endcsname}%
                \fi
            }%
        \fi
    \fi
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\paneltemplate}
% This is the command a document author uses to define a graphic for the background of the
% panel.  As with \cs{template}, there is an optional argument that takes an `n'; in this,
% case, we use \texttt{natwidth} and \texttt{natheight} as the width and height parameters
% in \cs{includegraphics}.
%    \begin{macrocode}
\newcommand{\paneltemplate}[2][]
{%
    \ifweb@allowtemplates\def\web@argi{#1}%
        \ifx\web@argi\@empty
            \edef\web@paneltemplate@opt@args{%
                \web@addtopaneltemplateArgs}%
        \else
            \edef\web@paneltemplate@opt@args{%
                \web@addtopaneltemplateArgs,#1}%
        \fi\gdef\web@paneltemplate{#2}%
    \fi
}
%    \end{macrocode}
%    \end{macro}
% \cs{web@paneltemplate} is the text macro that holds the name of the current graphic to be used
% as the background for the panel.
%    \begin{macrocode}
\let\web@paneltemplate=\@empty
%    \end{macrocode}
%    \begin{macro}{\addtopaneltemplateArgs}
%    \begin{macro}{\clearpaneltemplateArgs}
% Same as \cs{addtopaneltemplateArgs} and \cs{cleartemplateArgs}, but for the panel.
%    \begin{macrocode}
\def\addtopaneltemplateArgs#1{\gdef\web@addtopaneltemplateArgs{#1}}
\def\clearpaneltemplateArgs{%
    \global\let\web@addtopaneltemplateArgs=\@empty}
\let\web@addtopaneltemplateArgs=\@empty
\let\panel@scaletype=\@empty
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\panelsep}
% Amount of separation between the text screen and the panel screen. The default is $10\,\mbox{bp}$.
% Use this command to override the default.
%    \begin{macrocode}
\newcommand\panelsep[1]{\def\@panelsep{#1}}
\def\@panelsep{10bp}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\panelwidth}
% Use this command to set the width of the (navigational) panel. The navigational can be set three ways: (1)
% as an optional parameter in the \cs{margins} command; (2) by the \cs{panelwidth} command;
% or as the default value of $1$\,in, if no panel width is specified by (1) or (2). Example,
% |\panelwidth{1in}|
%    \begin{macrocode}
\newcommand{\panelwidth}[1]
{%
    \setlength{\@panelwidth}{#1}%
    \ifdim\@panelwidth&lt;\web@minpanelwidth
    \setlength{\@panelwidth}{\web@minpanelwidth}\fi
    \InitLayout
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macrocode}
\newcommand{\panelBgColor}[1]{\gdef\web@panelBgColor{#1}}
\let\web@panelBgColor=\@empty
%    \end{macrocode}
% This command builds the panel background: either a background
% with color if \cs{panelBgColor} has been specified or a
% background graphic, if \cs{paneltemplate} has been specified. It
% is assumed that if the graphic is specified, then there is no
% need for a background color.
%    \begin{macrocode}
\newcommand\standardPanelBG
{%
    \web@colorbox@w@transparency{\web@panelBgColor}%
    {\parbox[b][\paperheight]{\@panelwidth}%
    {\ifx\web@paneltemplate\@empty\hfill\vfill\else
    \hfuzz=1pt\vfuzz=1pt\expandafter
    \includegraphics\expandafter[\web@paneltemplate@opt@args,%
    width=\@panelwidth,height=\paperheight]%
    {\web@paneltemplate}\fi}}%
}
%    \end{macrocode}
% Enter \cs{standardPanelBG} into the panel template stack.  Any
% other panel commands whether text or graphics, will be laid on
% top of these.  If you want to design your own background scheme,
% you can always say define your own command, \cs{myBG}, similar to
% \cs{standardPanelBG}, then say \verb+\let\standardPanelBG=\myBG+
%    \begin{macrocode}
\AddToPanelTemplate{standardPanelBG}
%    \end{macrocode}
%    \begin{macro}{\buildpanel}
% This is the user interface to building a panel, at least the material that is above
% the background.  We just feed the argument as the expansion text for \cs{web@buildpanel}.
% The \cs{web@buildpanel} is the macro that actually builds the objects on top of the
% background.
%    \begin{macrocode}
\newcommand{\buildpanel}[1]
{%
    \gdef\web@buildpanel
    {%
        \parbox[b][\paperheight]{\@panelwidth}%
        {%
            \normalsfcodes\normalfont\normalsize
            \spaceskip=0pt\xspaceskip=0pt
            \par\medskip\vfil
            \centering#1%
            \par\medskip\vfil
        }%
    }%
}
%    \end{macrocode}
%    \end{macro}
% Set default value for \cs{web@buildpanel}
%    \begin{macrocode}
\let\web@buildpanel=\@empty
%    \end{macrocode}
% Now add this to the panel template.
%    \begin{macrocode}
\AddToPanelTemplate{web@buildpanel}
%\AddToPanelTemplate{\web@buildpanel}
%    \end{macrocode}
% \subsubsection{Clearing Templates}
%    \begin{macro}{\ClearTextTemplate}
% Clear the text template
%    \begin{macrocode}
\newcommand{\ClearTextTemplate}
{%
    \global\let\web@textBgColor=\@empty
    \global\let\web@template=\@empty
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\ClearPanelTemplate}
% Clear the panel template
%    \begin{macrocode}
\newcommand{\ClearPanelTemplate}
{%
    \global\let\web@panelBgColor=\@empty
    \global\let\web@paneltemplate=\@empty
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\ClearBuildPanel}
% Clear the panel template
%    \begin{macrocode}
\newcommand{\ClearBuildPanel}
{%
    \global\let\web@buildpanel=\@empty
}
%    \end{macrocode}
%    \end{macro}

%    \begin{macro}{\ClearAllTemplates}
% Clear both text and panel templates
%    \begin{macrocode}
\newcommand{\ClearAllTemplates}
{%
    \ClearTextTemplate
    \ClearPanelTemplate
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macrocode}
\newcommand{\ClearTextTemplateBuffer}
{%
    \global\let\web@textTemplate=\@empty
}
\newcommand{\ClearPanelTemplateBuffer}
{%
    \global\let\web@panelTemplate=\@empty
}
%    \end{macrocode}
% (06/15/05)  The following two commands save and clears all design elements, and enables
% the restoring of the design state.
%    \begin{macro}{\saveElements}
%    \begin{macro}{\saveClearElements}
% This command saves the various basic elements (\cs{web@textBgColor}, \cs{web@\-template}, \cs{web@buildpanel},
% \cs{web@panelBgColor} and \cs{web@paneltemplate}) which frees them up to be redefined by
% \cs{textBgColor}, \cs{template}, \cs{buildpanel}, \cs{panelBgColor}, and \cs{paneltemplate},
% respectively. The twist here is that even though these basic elements have been redefined,
% there original ones can be restored using \cs{restoreSavedElements}.
%    \begin{macrocode}
\newcommand{\saveElements}[1]
{%
    \begingroup
        \expandafter\global\expandafter
            \let\csname web@SaveTmpls#1\endcsname=\@empty
        \toks@={}%
        \def\web@addtoSaveToks##1{%
            \edef\web@let{\global\expandafter
                \let\expandafter\noexpand\csname#1##1\endcsname=
                \expandafter\noexpand\csname##1\endcsname}%
            \web@let
            \edef\web@SaveTmpls{\the\toks@\noexpand\\{##1}%
                \expandafter\noexpand\csname#1##1\endcsname}%
                \toks@=\expandafter{\web@SaveTmpls}%
        }%
        \web@addtoSaveToks{web@textBgColor}%
        \web@addtoSaveToks{web@template}%
        \web@addtoSaveToks{web@buildpanel}%
        \web@addtoSaveToks{web@panelBgColor}%
        \web@addtoSaveToks{web@paneltemplate}%
        \expandafter\xdef\csname web@SaveTmpls#1\endcsname{\the\toks@}%
    \endgroup
}
\newcommand{\saveClearElements}[1]{%
    \saveElements{#1}\ClearAllTemplates\ClearBuildPanel
}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\restoreSavedElements}
% Restore the templates and background colors earlier saved by the command \cs{saveClearTemplates}, under
% a name.
%    \begin{macrocode}
\newcommand{\restoreElements}[1]{%
    \ClearAllTemplates
    \ClearBuildPanel
    \begingroup
        \toks@=\expandafter{\csname web@SaveTmpls#1\endcsname}%
        \def\\##1##2{\expandafter\global\expandafter
            \let\csname##1\endcsname=##2}\the\toks@
    \endgroup
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\disableScreens}
% This command disables all templates that are enabled and
% saves the list under a name, the required argument. Includes
% only those templates added in by \cs{AddToTemplate}.
%    \begin{macrocode}
\newcommand{\disableScreens}[1]
{%
    \begingroup
    \toks@ = \expandafter{\listAddToTemplates}%
%\typeout{\string\listAddToTemplates=\listAddToTemplates}%
    \toks2 = {}%
    \def\\##1{\expandafter\if\csname eqTmpl##1\endcsname y%
            \disableTemplate{##1}%
            \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
            \toks2 = \expandafter{\web@saveAddTo}%
        \fi}%
    \the\toks@
%\typeout{\string\toks2=\the\toks2 }%
    \endgroup
    \expandafter\global\expandafter
    \let\csname web@DisabledTmpls#1\endcsname=\web@saveAddTo

}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\restoreAll}
% This command re-enables all templates that are disabled earlier
% under a name, the required argument. Includes
% only those templates added in by \cs{AddToTemplate}.
%    \begin{macrocode}
\newcommand\restoreScreens[1]
{%
    \begingroup
        \toks@=\expandafter{\csname web@DisabledTmpls#1\endcsname}%
        \def\\##1{\enableTemplate{##1}}%
        \the\toks@
    \endgroup
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\disablePanels}
% This command disables all panel templates that are enabled and
% saves the list under a name, the required argument. Includes
% only those templates added in by \cs{AddToPanelTemplate}.
%    \begin{macrocode}
\newcommand{\disablePanels}[1]
{%
    \begingroup
    \toks@ = \expandafter{\listAddToPanelTemplates}%
%\typeout{\string\listAddToPanelTemplates=\listAddToPanelTemplates}%
    \toks2 = {}%
    \def\\##1{\expandafter\if\csname eqPanTmpl##1\endcsname y%
%        \expandafter\ifx\csname##1\endcsname\standardPanelBG\else
            \disablePanelTemplate{##1}%
            \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
            \toks2 = \expandafter{\web@saveAddTo}%
%        \fi
        \fi}%
    \the\toks@
%\typeout{\string\toks2=\the\toks2 }%
    \endgroup
    \expandafter\global\expandafter
    \let\csname web@DisabledPanelTmpls#1\endcsname=\web@saveAddTo
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\restorePanels}
% This command re-enables all panel templates that are disabled earlier
% under a name, the required argument. Includes
% only those templates added in by \cs{AddToPanelTemplate}.
%    \begin{macrocode}
\newcommand{\restorePanels}[1]
{%
    \begingroup
        \toks@=\expandafter{\csname web@DisabledPanelTmpls#1\endcsname}%
        \def\\##1{\enablePanelTemplate{##1}}%
        \the\toks@
    \endgroup
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macrocode}
\newcommand\disableTemplate[1]
{%
    {\expandafter\global\expandafter\let\csname eqTmpl#1\endcsname=n}%
}
\newcommand\enableTemplate[1]
{%
    {\expandafter\global\expandafter\let\csname eqTmpl#1\endcsname=y}%
}
\newcommand\disablePanelTemplate[1]
{%
    {\expandafter\global\expandafter\let\csname eqPanTmpl#1\endcsname=n}%
}
\newcommand\enablePanelTemplate[1]
{%
    {\expandafter\global\expandafter\let\csname eqPanTmpl#1\endcsname=y}%
}
%    \end{macrocode}
% \subsubsection{\cs{AddToShipoutPicture}}
%    \begin{macrocode}
\ifnum\@usetemplates&gt;0
    \ifnum\@panelconfig&gt;0
%    \end{macrocode}
% If the user calls for a left or right panel, then we issue separate templates.
%    \begin{macrocode}
        \AtBeginDocument{%
            \AddToShipoutPicture{\web@textTemplate\web@panelTemplate}}
    \else
%    \end{macrocode}
% otherwise, we use only the \cs{web@textTemplate}
%    \begin{macrocode}
        \AtBeginDocument{\AddToShipoutPicture{\web@textTemplate}}
    \fi
\fi
%    \end{macrocode}
%    \begin{macrocode}
\raggedbottom
%&lt;/package&gt;
%&lt;*webpro&gt;
%    \end{macrocode}
% \section{The \texttt{pro} option}
% We introduce some commands to make life easier for the user.
%    \begin{macrocode}
\RequirePackage{xkeyval}
\RequirePackage{pifont}
%    \end{macrocode}
% \subsection{\protect\cs{DeclareDocInfo}}
%    \begin{macrocode}
\define@key{aebDocInfo}{title}[]{\title{#1}}
\define@key{aebDocInfo}{author}[]{\author{#1}}
\define@key{aebDocInfo}{university}[]{\university{#1}}
\define@key{aebDocInfo}{email}[]{\email{#1}}
\define@key{aebDocInfo}{talksite}[]{\talksite{#1}}
\define@key{aebDocInfo}{talkdate}[]{\talkdate{#1}}
\define@key{aebDocInfo}{talkdateLabel}[Presented:]{\talkdateLabel{#1}}
\define@key{aebDocInfo}{version}[]{\version{#1}}
\define@key{aebDocInfo}{versionLabel}[Version]{\versionLabel{#1}}
\define@key{aebDocInfo}{subject}[]{\subject{#1}}
\define@key{aebDocInfo}{keywords}[]{\keywords{#1}}
\define@key{aebDocInfo}{copyrightyears}[]{\copyrightyears{#1}}
\define@key{aebDocInfo}{prepared}[]{\prepared{#1}}
\define@key{aebDocInfo}{preparedLabel}[]{\preparedLabel{#1}}
\define@key{aebDocInfo}{copyrightStatus}[]%
    {\@ifpackageloaded{aebxmp}{\copyrightStatus{#1}}{}}
\define@key{aebDocInfo}{copyrightNotice}[]%
    {\@ifpackageloaded{aebxmp}{\copyrightNotice{#1}}{}}
\define@key{aebDocInfo}{copyrightInfoURL}[]%
    {\@ifpackageloaded{aebxmp}{\copyrightInfoURL{#1}}{}}
%    \end{macrocode}
%    \begin{macro}{\DeclareDocInfo}
% Here is a \texttt{xkeyval} interface to may of the text macros that are defined
% in the \texttt{web} package. This command should appear in the preamble. Usage:
%\begin{verbatim}
%\DeclareDocInfo
%{
%    title=My First Presentation,
%    author=D. P. Story,
%    university=My University,
%    email=dpstory@uakron.edu,
%    talkdate={Dec.\ 17, \the\year},
%    talksite=The Talking University,
%    subject=A basic APB template,
%}
%\end{verbatim}
%    \begin{macrocode}
\newcommand{\DeclareDocInfo}[1]{%
    \setkeys{aebDocInfo}{#1}
    \ifx\web@talkdate@value\@empty\else\let\webversion\webtalkdate\fi
}
%    \end{macrocode}
%    \end{macro}
% \subsection{\protect\cs{maketitle}}
%
% The title page consists of three parts, the top, the middle. and the bottom.
% Each of these three has distinct content. Above the top is the preamble
% and below the bottom is the postamble.
%    \begin{macro}{\topTitlePage}
%    \begin{macro}{\topTitlePageProportion}
% The following command represents the top of the title page.
%    \begin{macrocode}
\renewcommand{\topTitlePage}
{%
%    \end{macrocode}
% Have \cs{webuniversity} centered across the top of the title page, by
% default. The alignment is set by \cs{halignuniversity}. The UI for this
% value is the \texttt{xhalign} key of \cs{universityLayout}.
%    \begin{macrocode}
    \vglue\web@aboveTopTitleSkip
    \noindent\makebox[\linewidth][\halignuniversity]{\parbox{%
        \hproportionwebuniversity\linewidth}%
    {\sectionUniversity{\webuniversity}}}%
    \par\ifeqforpaper\else\minimumskip\fi
        \vspace{\stretch{1}}%
%    \end{macrocode}
% Have \cs{webtitle} centered across the top of the title page, by
% default. The alignment is set by \cs{haligntitle}. The UI for this
% value is the \texttt{xhalign} key of \cs{titleLayout}.
%    \begin{macrocode}
    \noindent\makebox[\linewidth][\haligntitle]%
        {\parbox{\hproportionwebtitle\linewidth}%
        {\sectionTitle{\webtitle}}}%
        \par\ifeqforpaper\vspace{2\baselineskip}\else
        \minimumskip\vspace{\stretch{1}}\fi
%    \end{macrocode}
% Have \cs{webauthor} centered across the top of the title page, by
% default. The alignment is set by \cs{halignauthor}. The UI for this
% value is the \texttt{xhalign} key of \cs{authorLayout}.
%    \begin{macrocode}
    \noindent\makebox[\linewidth][\halignauthor]%
        {\parbox{\hproportionwebauthor\linewidth}%
        {\sectionAuthor{\webauthor}}}
        \par\ifeqforpaper\vspace{2\baselineskip}\else
        \minimumskip\vspace{\stretch{1}}\fi
}
\newcommand{\topTitlePageProportion}[1]{\def\titleauthorproportion{#1}}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\titlepageTrailer}
% The bottom of the title page consisting of the contents of the macros
% \cs{web@\-copy\-right}, \cs{webcopyrightyears}, \cs{webmail},
% \cs{aeb@talksite}, \cs{aeb@Prepared} and \cs{webversion}. These are all
% populated through the \cs{DelcareDocInfo} command.
%    \begin{macrocode}
\renewcommand{\titlepageTrailer}
{%
    \web@tpTrailerWrapper{\makebox[\web@tp@linewidth]{\parbox{\web@tp@linewidth}{%
        \ifx\tpTrailer@textcolor\@empty\else\color{\tpTrailer@textcolor}\fi
        \web@tpTrailer@formatting
        \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
        \maketitle@trailer@ll\hfill\maketitle@trailer@lr
    }}}%
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\DesignTitlePageTrailer}
% A user interface to entering info in the title page trailer, other than
% the default.
%    \begin{macrocode}
\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\ \webcopyrightyears\
        \thewebemail}
\def\maketitle@trailer@ll{\aeb@Prepared}
\def\maketitle@trailer@ur{\aeb@talksite}
\def\maketitle@trailer@lr{\webversion}
\let\web@tpTrailerWrapper\relax
\let\web@tpTrailerBgColor\@empty
\let\web@tpTrailerBorderColor\@empty
\let\tpTrailer@textcolor\@empty
\let\web@tpTrailer@graphic\@empty
\let\web@tpTrailer@formatting\@empty
\def\web@tp@linewidth{\linewidth}
\define@key{tpTrailer}{ul}{\def\maketitle@trailer@ul{#1}}
\define@key{tpTrailer}{ll}{\def\maketitle@trailer@ll{#1}}
\define@key{tpTrailer}{ur}{\def\maketitle@trailer@ur{#1}}
\define@key{tpTrailer}{lr}{\def\maketitle@trailer@lr{#1}}
\define@key{tpTrailer}{textColor}{\def\tpTrailer@textcolor{#1}}
\define@key{tpTrailer}{bgColor}{\def\web@tpTrailerBgColor{#1}}
\define@key{tpTrailer}{borderColor}{\def\web@tpTrailerBorderColor{#1}}
\define@key{tpTrailer}{fboxsep}{\def\web@tpTrailerfboxsep{#1}}
\define@key{tpTrailer}{fboxrule}{\def\web@tpTrailerfboxrule{#1}}
\define@key{tpTrailer}{graphic}{\def\web@tpTrailer@graphic{#1}}
\define@key{tpTrailer}{fontSize}{\renewcommand{\trailerFontSize}{#1}}
\define@key{tpTrailer}{formatting}{\def\web@tpTrailer@formatting{#1}}
\newcommand{\DesignTitlePageTrailer}[1]
{%
    \setkeys{tpTrailer}{fboxsep=3pt,fboxrule=.4pt}%
    \setkeys{tpTrailer}{#1}%
    \setlength{\fboxsep}{\web@tpTrailerfboxsep}%
    \setlength{\fboxrule}{\web@tpTrailerfboxrule}%
    \ifx\web@tpTrailer@graphic\@empty
        \ifx\web@tpTrailerBgColor\@empty
        \else
            \ifx\web@tpTrailerBorderColor\@empty
                \def\web@tp@linewidth{\linewidth-2\fboxsep}%
                \def\web@tpTrailerWrapper{\colorbox{\web@tpTrailerBgColor}}%
            \else
                \def\web@tp@linewidth{\linewidth-2\fboxsep-2\fboxrule}%
                \def\web@tpTrailerWrapper{\fcolorbox{\web@tpTrailerBorderColor}{\web@tpTrailerBgColor}}%
            \fi
        \fi
    \else
        \begingroup
        \gdef\web@tpTrailerWrapper##1{\def\web@tp@linewidth{\linewidth-2\fboxsep}%
            \setbox0=\hbox{##1}%
            \noindent\makebox[0pt][l]{%
                \raisebox{-\dp0-\fboxsep}{\includegraphics[width=\wd0+2\fboxsep,height=\dp0+\ht0+2\fboxsep]{\web@tpTrailer@graphic}}%
            }%
            \kern\fboxsep\unhbox0\relax
        }\endgroup
    \fi
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\maketitle}
% This is a revision of the \textsf{web} \cs{maketitle} defined above.
% This \cs{maketitle} incorporates into it the new commands defined
% in the \texttt{pro} option section: \cs{sectionUniversity}, \cs{sectionTitle}
% and \cs{sectionAuthor}.
%    \begin{macrocode}
\renewcommand{\maketitle}
{%
%    \end{macrocode}
% If not for paper, restrict title and author to \cs{titleauthorproportion} of the page,
% This value can be set by direct definition, or through the helper command
% \cs{topTitlePageProportion}.
%    \begin{macrocode}
    \maketitlepreamble
%    \end{macrocode}
%    \begin{macrocode}
    \ifeqforpaper\vspace*{2\baselineskip}\else
    \vbox to\titleauthorproportion\textheight\bgroup\fi
%    \end{macrocode}
%    \begin{macrocode}
    \topTitlePage
%    \end{macrocode}
%    \begin{macrocode}
    \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
%    \end{macrocode}
% Now place the \cs{optionalpagematter}
%    \begin{macrocode}
    \leavevmode\optionalpagematter
    \par\vspace{\stretch{1}}
%    \end{macrocode}
% Insert the directory, as desired.
%    \begin{macrocode}
    \ifx\web@directory@option y\webdirectory\fi
    \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
%    \end{macrocode}
% Insert the ``bottom matter''.
%    \begin{macrocode}
    \vfill\noindent\begingroup\trailerFontSize\titlepageTrailer
    \par\endgroup
    \maketitlepostamble
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\preparedLabel}
% Some text labeling for the first page, may be redefined. The revision label
% is defined in the \textsf{Web} package.
%    \begin{macrocode}
\def\preparedLabel#1{\def\web@revision{#1}}
\preparedLabel{Prepared:}
\def\prepared#1{\def\argi{#1}\ifx\argi\@empty
    \else\def\aeb@prepared{#1}\fi}
\def\aeb@prepared{\@date}
\def\aeb@Prepared{\web@revision\ \aeb@prepared}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\talkdate}
%    \begin{macro}{\talksite}
% Here we redefine the \cs{version} from the \textsf{web} package
% to use it as the date of the talk. We also define \cs{talksite}
% to describe where this talk occurred.
%    \begin{macrocode}
%\let\talkdate\version
\def\talkdate#1{\gdef\web@talkdate@value{#1}%
    \edef\webtalkdate{\ifx\web@talkdate@value\@empty
   \else\noexpand\web@talkdatelabel\ #1\fi}}
\let\web@talkdate@value\@empty
%\def\talkdateLabel#1{\def\web@versionlabel{#1}}
\def\talkdateLabel#1{\def\web@talkdatelabel{#1}}
\talkdateLabel{Presented:}
\def\talksite#1{\def\aeb@talksite{#1}}
\talksite{}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%
% \subsection{Options for section headings}
%
%    \begin{macrocode}
\define@choicekey+{aebsection}{reset}[\val\nr]{font,all}{%
    \ifcase\nr\relax
        \aeb@reset@section@fonts\or
        \aeb@reset@section@all\fi
}{\PackageWarning{webpro}{Bad choice for fontseries, permissible values
   are font and all. Try again}}
\define@choicekey+{aebsection}{type}[\val\nr]{section,subsection,%
    subsubsection,university,title,author,toc}%
{%
    \edef\aeb@section@type{#1}%
    \edef\aeb@section@typeIndex{\nr}%
}{}{}
\define@key{aebsection}{special}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
    \aeb@temp@expand{shadow,framebox,colorbox,fcolorbox,frameboxfit,%
    colorboxfit,fcolorboxfit,custom,default}%
{%
  \ifcase\nr\relax
      \expandafter\let
      \csname aeb@\aeb@section@type @special\endcsname\aeb@shadowHead
  \or
      \expandafter\let
      \csname aeb@\aeb@section@type @special\endcsname\aeb@frameboxHead
  \or
      \expandafter\let
      \csname aeb@\aeb@section@type @special\endcsname\aeb@colorboxHead
  \or
      \expandafter\let
      \csname aeb@\aeb@section@type @special\endcsname\aeb@fcolorboxHead
  \or
      \expandafter\let\csname aeb@\aeb@section@type @special\endcsname
        \aeb@frameboxfitHead
  \or
      \expandafter\let\csname aeb@\aeb@section@type @special\endcsname
          \aeb@colorboxfitHead
  \or
      \expandafter\let\csname aeb@\aeb@section@type @special\endcsname
          \aeb@fcolorboxfitHead
  \or
      \edef\aeb@temp{%
      \noexpand\def\expandafter\noexpand
      \csname aeb@\aeb@section@type @special\endcsname{\expandafter
      \noexpand\csname aeb@\aeb@section@type @customHead\endcsname}}%
      \aeb@temp
  \or
      \expandafter\let
      \csname aeb@\aeb@section@type @special\endcsname\@empty
  \fi
}{%
   \PackageWarning{webpro}{Bad choice for special, permissible values
   are shadow, framebox, colorbox, fcolorbox, custom and default.
   Try again}}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}%
{university}{title}{author}{toc}\do{%
    \expandafter\let\csname aeb@\@@tmp @special\endcsname\@empty
}
%    \end{macrocode}
%    \begin{macro}{\customSecHead}
%    \begin{macro}{\customSubsecHead}
%    \begin{macro}{\customSubsubsecHead}
%    \begin{macro}{\customUniversity}
%    \begin{macro}{\customTitle}
%    \begin{macro}{\customAuthor}
%    \begin{macro}{\customToc}
% Here is a user friendly interface to redefining custom heads.
%    \begin{macrocode}
\newcommand{\customSecHead}[1]{\def\aeb@section@customHead##1{#1}}
\newcommand{\customSubsecHead}[1]{\def\aeb@subsection@customHead##1{#1}}
\newcommand{\customSubsubsecHead}[1]
    {\def\aeb@subsubsection@customHead##1{#1}}
\newcommand{\customUniversity}[1]{\def\aeb@university@customHead##1{#1}}
\newcommand{\customTitle}[1]{\def\aeb@title@customHead##1{#1}}
\newcommand{\customAuthor}[1]{\def\aeb@author@customHead##1{#1}}
\newcommand{\customToc}[1]{\def\aeb@toc@customHead##1{#1}}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macrocode}
\def\aeb@frameboxHead#1{%
    \begingroup
    \@tempdima=\linewidth
    \advance\@tempdima-2\fboxsep
    \advance\@tempdima-2\fboxrule
    \edef\@@aeb@sectionframecolor
        {\csname aeb@\aeb@section@type framecolor\endcsname}%
    \edef\@@aeb@sectioncolor
        {\csname aeb@\aeb@section@type color\endcsname}%
    \setbox0\vbox{\hsize=\@tempdima#1}\color{\@@aeb@sectionframecolor}%
    \framebox{\color{\@@aeb@sectioncolor}\copy0}%
    \endgroup
}
\def\aeb@colorboxHead#1{%
    \begingroup
    \@tempdima=\linewidth
    \advance\@tempdima-2\fboxsep
    \setbox0\vbox{\hsize=\@tempdima#1}%
    \edef\@@aeb@sectionbgcolor
        {\csname aeb@\aeb@section@type bgcolor\endcsname}%
    \colorbox{\@@aeb@sectionbgcolor}{\copy0}%
    \endgroup
}
\def\aeb@fcolorboxHead#1{%
    \begingroup
    \@tempdima=\linewidth
    \advance\@tempdima-2\fboxsep
    \advance\@tempdima-2\fboxrule
    \setbox0\vbox{\hsize=\@tempdima#1}%
    \edef\@@aeb@sectionbgcolor
        {\csname aeb@\aeb@section@type bgcolor\endcsname}%
    \fcolorbox{\aeb@sectionframecolor}%
    {\@@aeb@sectionbgcolor}{\copy0}
    \endgroup
}
\def\aeb@frameboxfitHead#1{%
    \begingroup
    \edef\@@aeb@sectionframecolor
        {\csname aeb@\aeb@section@type framecolor\endcsname}%
    \edef\@@aeb@sectioncolor
        {\csname aeb@\aeb@section@type color\endcsname}%
    \vbox{\color{\@@aeb@sectionframecolor}%
    \framebox{\color{\@@aeb@sectioncolor}#1}}%
    \endgroup
}
\def\aeb@colorboxfitHead#1{%
    \begingroup
    \edef\@@aeb@sectioncolor
        {\csname aeb@\aeb@section@type color\endcsname}%
    \edef\@@aeb@sectionbgcolor
        {\csname aeb@\aeb@section@type bgcolor\endcsname}%
    \vbox{\colorbox{\@@aeb@sectionbgcolor}%
    {\color{\@@aeb@sectioncolor}#1}}%
    \endgroup
}
\def\aeb@fcolorboxfitHead#1{%
    \begingroup
    \edef\@@aeb@sectioncolor
        {\csname aeb@\aeb@section@type color\endcsname}%
    \edef\@@aeb@sectionbgcolor
        {\csname aeb@\aeb@section@type bgcolor\endcsname}%
    \edef\@@aeb@sectionframecolor
        {\csname aeb@\aeb@section@type framecolor\endcsname}%
    \vbox{\fcolorbox{\@@aeb@sectionframecolor}{\@@aeb@sectionbgcolor}%
    {\color{\@@aeb@sectioncolor}#1}}%
    \endgroup
}
\def\shadowhoffset#1{\def\aeb@shadowhoffset{#1}}
\shadowhoffset{.2ex}
\def\shadowvoffset#1{\def\aeb@shadowvoffset{#1}}
\shadowvoffset{-.2ex}
\def\aeb@shadowHead#1{%
    \begingroup
    \edef\@@aeb@sectionshadowcolor
        {\csname aeb@\aeb@section@type shadowcolor\endcsname}%
    \edef\@@aeb@sectioncolor
        {\csname aeb@\aeb@section@type color\endcsname}%
    \setbox0\vbox{\hsize=\linewidth#1}%
    \wd0\z@\dp0\z@\relax\raisebox{\aeb@shadowvoffset}%
    {\hbox to\z@{\kern\aeb@shadowhoffset%
    \color{\@@aeb@sectionshadowcolor}\box0\hss}}%
    \setbox0\vbox{\hsize=\linewidth%
    \textcolor{\@@aeb@sectioncolor}{#1}}\box0
    \endgroup
}
%    \end{macrocode}
% \texttt{usefont} allows for a custom shift in font for the title.
% it takes four argument, each of which are enclosed in braces:
%\begin{verbatim}
%   {&lt;fontencoding&gt;}{&lt;fontfamily&gt;}{&lt;fontseries&gt;}{&lt;fontshape&gt;}
%       {{&lt;fontsize&gt;}{&lt;skip&gt;}}
%\end{verbatim}
%    \begin{macrocode}
\define@key{aebsection}{usefont}{%
    \expandafter\def\csname aeb@\aeb@section@type @usefont\endcsname
        {\aeb@usefont#1}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}
{university}{title}{author}{toc}\do
{\expandafter\let\csname aeb@\@@tmp @usefont\endcsname\@empty}
\def\aeb@usefont#1#2#3#4#5{\def\aeb@usefontargv{#5}%
    \ifx\aeb@usefontargv\@empty
%    \end{macrocode}
% If the fifth parameter is empty, no font size is specified, we'll
% use the default sizes. We gobble up the next three tokens in the
% definition of \cs{section}, excluding the token that sets size.
%    \begin{macrocode}
        \def\aeb@next{\expandafter\@gobble\@gobbletwo}%
    \else
%    \end{macrocode}
% If the fifth parameter is not empty, font size is specified,
% we'll gobble up the next four tokens in the
% definition of \cs{section}, including the token that sets size.
%    \begin{macrocode}
        \def\aeb@next{\expandafter\@gobbletwo\@gobbletwo}%
    \fi
    \fontencoding{#1}\fontfamily{#2}%
    \fontseries{#3}\fontshape{#4}\ifx\aeb@usefontargv\@empty\else
    \fontsize#5\fi\selectfont\aeb@next
}
%    \end{macrocode}
% Font related keys.
%    \begin{macrocode}
\define@key{aebsection}{fontfamily}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{rmfamily,sffamily,ttfamily}{%
    \expandafter\def\csname aeb@\aeb@section@type @fontfamily\endcsname
        {\csname#1\endcsname}%
}{\PackageWarning{webpro}{Bad choice for fontfamily, permissible values
   are rmfamily, sffamily and ttfamily. Try again}}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
{author}{toc}\do{\expandafter\let\csname aeb@\@@tmp @fontfamily\endcsname\aeb@defaultfamily}
\define@key{aebsection}{fontseries}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{bfseries,mdseries}{%
    \expandafter\def\csname aeb@\aeb@section@type @fontseries\endcsname
        {\csname#1\endcsname}%
}{\PackageWarning{webpro}{Bad choice for fontseries, permissible values
   are bfseries and mdseries. Try again}}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
{author}{toc}\do{\expandafter\let\csname aeb@\@@tmp @fontseries\endcsname\bfseries}
\define@key{aebsection}{fontshape}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{upshape,itshape,%
    scshape,slshape}{%
    \expandafter\def\csname aeb@\aeb@section@type @fontshape\endcsname
        {\csname#1\endcsname}%
}{\PackageWarning{webpro}{Bad choice for fontshape, permissible values
   are upshape, itshape, scshape and slshape. Try again}}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
{author}{toc}\do{\expandafter\let\csname aeb@\@@tmp @fontshape\endcsname\upshape}
\define@key{aebsection}{fontsize}{%
   \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{tiny,scriptsize,footnotesize,%
    small,normalsize,large,Large,LARGE,huge,Huge}{%
    \expandafter\def\csname aeb@\aeb@section@type @fontsize\endcsname
        {\csname#1\endcsname}%
}{\PackageWarning{webpro}{Bad choice for fontsize, permissible values
   are tiny, scriptsize, footnotesize, small, normalsize,
    large, Large, LARGE, huge and Huge. Try again}}%
}
\@tfor\@@tmp:={{section}{\normalsize}}{{subsection}{\normalsize}}{{subsubsection}{\normalsize}}%
{{university}{\normalsize}}{{title}{\large}}{{author}{\normalsize}}{{toc}{\small}}\do
{%
    \expandafter\getargs\@@tmp
    \edef\aeb@temp{\global\noexpand\let\expandafter\noexpand\csname aeb@\aeb@argi @fontsize\endcsname
    \expandafter\noexpand\aeb@argii}\aeb@temp
}
\define@key{aebsection}{halign}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
    \aeb@temp@expand{l,c,r}{%
    \ifcase\nr\relax
        \expandafter\let
        \csname aeb@\aeb@section@type @halign\endcsname\raggedright
    \or
        \expandafter\let
        \csname aeb@\aeb@section@type @halign\endcsname\centering
    \or
        \expandafter\let
        \csname aeb@\aeb@section@type @halign\endcsname\raggedleft
    \fi
}{\PackageWarning{webpro}{Bad choice for halign, permissible values
   are l, c and r. Try again}}%
}
\@tfor\@@tmp:={\aeb@section@halign\raggedright}
{\aeb@subsection@halign\raggedright}
{\aeb@subsubsection@halign\raggedright}
{\aeb@university@halign\centering}
{\aeb@title@halign\centering}{\aeb@author@halign\centering}%
{\aeb@toc@halign\centering}\do
{%
    \expandafter\getargs\@@tmp
    \edef\aeb@temp{\noexpand\let\expandafter\noexpand\aeb@argi
    \expandafter\noexpand\aeb@argii}\aeb@temp
}
%    \end{macrocode}
% Color related keys
%    \begin{macrocode}
\define@key{aebsection}{ding}{\if\aeb@use@section@numbers0
   \expandafter\def\csname aeb@\aeb@section@type Num\endcsname##1{#1\ }%
   \else\PackageWarning{webpro}{The ding key is not available with a
   section numbering system, ignoring request for a ding.}\fi
}
\define@key{aebsection}{color}{\expandafter
    \def\csname aeb@\aeb@section@type color\endcsname{#1}}
\define@key{aebsection}{numdingcolor}{\expandafter
    \def\csname aeb@\aeb@section@type numdingcolor\endcsname{#1}}
% This definition was a \gdef, don't remember why. Change back
% to \def
%    \gdef\csname aeb@\aeb@section@type color\endcsname{#1}}
\def\aeb@sectioncolor{blue}
\def\aeb@subsectioncolor{\aeb@sectioncolor}
\def\aeb@subsubsectioncolor{\aeb@sectioncolor}
\def\aeb@sectionnumdingcolor{\aeb@sectioncolor}
\def\aeb@subsectionnumdingcolor{\aeb@sectioncolor}
\def\aeb@subsubsectionnumdingcolor{\aeb@sectioncolor}
\def\aeb@universitycolor{black}
\def\aeb@titlecolor{blue}
\def\aeb@authorcolor{black}
\def\aeb@toccolor{blue}
\define@key{aebsection}{framecolor}{\expandafter
  \def\csname aeb@\aeb@section@type framecolor\endcsname{#1}}
\def\aeb@sectionframecolor{blue}
\def\aeb@subsectionframecolor{blue}
\def\aeb@subsubsectionframecolor{blue}
\def\aeb@universityframecolor{blue}
\def\aeb@titleframecolor{blue}
\def\aeb@authorframecolor{blue}
\def\aeb@tocframecolor{blue}
\define@key{aebsection}{bgcolor}{\expandafter
    \def\csname aeb@\aeb@section@type bgcolor\endcsname{#1}}
\def\aeb@sectionbgcolor{cornsilk}
\def\aeb@subsectionbgcolor{cornsilk}
\def\aeb@subsubsectionbgcolor{cornsilk}
\def\aeb@authorbgcolor{cornsilk}
\def\aeb@titlebgcolor{cornsilk}
\def\aeb@authorbgcolor{cornsilk}
\def\aeb@tocbgcolor{cornsilk}
\define@key{aebsection}{shadowcolor}{\expandafter
    \def\csname aeb@\aeb@section@type shadowcolor\endcsname{#1}}
\def\aeb@sectionshadowcolor{black}
\def\aeb@subsectionshadowcolor{black}
\def\aeb@subsubsectionshadowcolor{black}
\def\aeb@universityshadowcolor{black}
\def\aeb@titleshadowcolor{black}
\def\aeb@authorshadowcolor{black}
\def\aeb@tocshadowcolor{black}
%    \end{macrocode}
% Indent
%    \begin{macrocode}
\define@key{aebsection}{indent}{\expandafter
    \def\csname aeb@\aeb@section@type @indent\endcsname{#1}}
\def\aeb@section@indent{\z@}
\def\aeb@subsection@indent{\z@}
\def\aeb@subsubsection@indent{\z@}
\def\aeb@university@indent{\z@}
\def\aeb@title@indent{\z@}
\def\aeb@author@indent{\z@}
\def\aeb@toc@indent{\z@}
\define@key{aebsection}{beforeskip}{\expandafter
    \def\csname aeb@\aeb@section@type @beforeskip\endcsname{#1}}
\def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
\def\aeb@subsection@beforeskip{-2.5ex\@plus -1ex \@minus -.2ex}
\def\aeb@subsubsection@beforeskip{-2ex\@plus -1ex \@minus -.2ex}
\def\aeb@university@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
\def\aeb@title@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
\def\aeb@author@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
\def\aeb@toc@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
\define@key{aebsection}{afterskip}{\expandafter
    \def\csname aeb@\aeb@section@type @afterskip\endcsname{#1}}
\def\aeb@section@afterskip{1ex\@plus .2ex}
\def\aeb@subsection@afterskip{1ex\@plus .2ex}
\def\aeb@subsubsection@afterskip{.5ex\@plus .2ex}
\def\aeb@university@afterskip{1ex\@plus .2ex}
\def\aeb@title@afterskip{1ex\@plus .2ex}
\def\aeb@author@afterskip{1ex \@plus1fill} %{1ex\@plus .2ex}
\def\aeb@toc@afterskip{1ex\@plus .2ex}
%    \end{macrocode}
% Some special keys for \cs{titleLayout}, \cs{universityLayout} and \cs{authorLayout}.
% The \texttt{hproportion} is the proportion of \cs{linewidth} the title, university
% author elements are restricted to. Useful for setting natural line breaks for a wide
% title, for example. The value of the key should be a number between 0 and 1, exclusive of 0.
%    \begin{macrocode}
\define@key{aebsection}{hproportion}{\expandafter
    \def\csname hproportionweb\aeb@section@type\endcsname{#1}}
%    \end{macrocode}
% Some special keys for \cs{titleLayout}, \cs{universityLayout} and \cs{authorLayout}.
% The \texttt{xhalign} is the alignment of the \cs{makebox} that encloses the university,
% the title or author. This alignment will be across the width of the text region.
%    \begin{macrocode}
\define@key{aebsection}{xhalign}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{l,c,r}{%
        \expandafter\def\csname halign\aeb@section@type\endcsname{#1}%
}{\PackageWarning{webpro}{Bad choice for xhalign, permissible values
   are l, c and r. Try again}}%
}
\def\halignuniversity{c}
\def\haligntitle{c}
\def\halignauthor{c}
\let\halignsection\relax
\let\halignsubsection\relax
\let\halignsubsubsection\relax
\let\haligntoc\relax
%    \end{macrocode}
% Commands that hold the reset values.
%    \begin{macrocode}
\def\aeb@reset@section@fonts{%
        \normalfont\normalsize
    \ifcase\aeb@section@typeIndex\relax
        \let\aeb@section@usefont\@empty
        \let\aeb@section@fontfamily\aeb@defaultfamily
        \let\aeb@section@fontseries\bfseries
        \let\aeb@section@fontshape\upshape
        \let\aeb@section@fontsize\Large
    \or
        \let\aeb@subsection@usefont\@empty
        \let\aeb@subsection@fontfamily\aeb@defaultfamily
        \let\aeb@subsection@fontseries\bfseries
        \let\aeb@subsection@fontshape\upshape
        \let\aeb@subsection@fontsize\large
    \or
        \let\aeb@subsubsection@usefont\@empty
        \let\aeb@subsubsection@fontfamily\aeb@defaultfamily
        \let\aeb@subsubsection@fontseries\bfseries
        \let\aeb@subsubsection@fontshape\upshape
        \let\aeb@subsubsection@fontsize\normalsize
    \fi
}
\def\aeb@reset@section@all{%
    \aeb@reset@section@fonts
    \ifcase\aeb@section@typeIndex\relax
        \let\aeb@section@halign\raggedright
        \def\aeb@sectioncolor{blue}%
        \def\aeb@sectionshadowcolor{black}%
        \let\aeb@section@special=\@empty
        \def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
        \def\aeb@section@afterskip{1ex\@plus .2ex}
        \def\aeb@sectionframecolor{blue}
        \def\aeb@sectionframecolor{cornsilk}
    \or
        \let\aeb@subsection@halign\raggedright
        \def\aeb@subsectioncolor{blue}%
        \def\aeb@subsectionshadowcolor{black}%
        \let\aeb@subsection@special=\@empty
        \def\aeb@subsection@beforeskip{-2.5ex\@plus -1ex \@minus -.2ex}
        \def\aeb@subsection@afterskip{1ex\@plus .2ex}
        \def\aeb@subsectionframecolor{blue}
        \def\aeb@subsectionframecolor{cornsilk}
    \or
        \let\aeb@subsubsection@halign\raggedright
        \def\aeb@subsubsectioncolor{blue}%
        \def\aeb@subsubsectionshadowcolor{black}%
        \let\aeb@subsubsection@special=\@empty
        \def\aeb@subsubsection@beforeskip{-2ex\@plus -1ex \@minus -.2ex}
        \def\aeb@subsubsection@afterskip{1ex\@plus .2ex}
        \def\aeb@subsubsectionframecolor{blue}
        \def\aeb@subsubsectionframecolor{cornsilk}
    \fi
}
%    \end{macrocode}
% Here I've taken the \cs{section} command, as defined in \textsf{web},
% and modified it, inserting \verb!\xdef\aeb@sectionpage{\the\c@page}!.
% This helps to keep track of the page of the current section; used
% with the panel table of contents.
%
% For the minitoc, we want to count all non-stared sections, so we intercept the
% \cs{section} command, see if there's a star, if so, increment the counter.
%    \begin{macrocode}
\renewcommand{\section}{\@ifstar{\aeb@section*}{\aeb@section}}
\newcommand{\aeb@section}{%
   \renewcommand{\@seccntformat}[1]{\color{\aeb@sectionnumdingcolor}\aeb@sectionNum{##1}}%
   \@startsection{section}{1}{\aeb@section@indent}%
   {\aeb@section@beforeskip}{\aeb@section@afterskip}%
   {\xdef\aeb@sectionpage{\the\c@page}\def\aeb@section@type{section}%
   \aeb@section@usefont\aeb@section@fontfamily\aeb@section@fontseries
   \aeb@section@fontshape\aeb@section@fontsize\aeb@section@halign
   \color{\aeb@sectioncolor}\aeb@section@special}}
\renewcommand\subsection{%
   \renewcommand{\@seccntformat}[1]{\color{\aeb@subsectionnumdingcolor}\aeb@subsectionNum{##1}}%
   \@startsection{subsection}{2}{\aeb@subsection@indent}%
   {\aeb@subsection@beforeskip}{\aeb@subsection@afterskip}%
   {\def\aeb@section@type{subsection}\aeb@subsection@usefont
   \aeb@subsection@fontfamily\aeb@subsection@fontseries
   \aeb@subsection@fontshape\aeb@subsection@fontsize
   \aeb@subsection@halign\color{\aeb@subsectioncolor}%
   \aeb@subsection@special}}
\def\subsubDefaultDing#1{\def\web@subsubDefaultDing{{#1}}}
\subsubDefaultDing{\textrm\textbullet}
\renewcommand\subsubsection{%
   \renewcommand{\@seccntformat}[1]{\color{\aeb@subsubsectionnumdingcolor}%
   \if@defaultsubsubding\web@subsubDefaultDing\ \else\aeb@subsubsectionNum{##1}\fi}
   \@startsection{subsubsection}{3}{\aeb@subsubsection@indent}%
   {\aeb@subsubsection@beforeskip}{\aeb@subsubsection@afterskip}%
   {\def\aeb@section@type{subsubsection}\aeb@subsubsection@usefont
   \aeb@subsubsection@fontfamily\aeb@subsubsection@fontseries
   \aeb@subsubsection@fontshape\aeb@subsubsection@fontsize
   \aeb@subsubsection@halign\color{\aeb@subsubsectioncolor}%
   \aeb@subsubsection@special}}
\renewcommand*\thesection{%
    \if\aeb@use@section@numbers1\arabic{section}\fi}
\renewcommand*\thesubsection{%
    \if\aeb@use@section@numbers1\thesection.\arabic{subsection}\fi}
\renewcommand*{\thesubsubsection}{%
   \if\aeb@use@section@numbers1%
        \if@defaultsubsubding
            \web@subsubDefaultDing
        \else
            \thesubsection.\arabic{subsubsection}%
        \fi
   \fi}
%    \end{macrocode}
% We attempt to format the university, title and author in the same way as
% we do the sections
%    \begin{macrocode}
\newcommand{\sectionTitle}{\aeb@sectionTitle*}
\newcommand{\aeb@sectionTitle}{%
   \renewcommand{\@seccntformat}[1]{\aeb@titleNum{##1}}%
   \@startsection{section}{1}{\aeb@title@indent}%
   {\aeb@title@beforeskip}{\aeb@title@afterskip}%
   {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{title}%
   \aeb@title@usefont\aeb@title@fontfamily\aeb@title@fontseries
   \aeb@title@fontshape\aeb@title@fontsize\aeb@title@halign
   \ifx\webtitle@color\@empty\else\color{\aeb@titlecolor}\fi
   \aeb@title@special}}
\newcommand{\sectionAuthor}{\aeb@sectionAuthor*}
\newcommand{\aeb@sectionAuthor}{%
   \renewcommand{\@seccntformat}[1]{\aeb@authorNum{##1}}%
   \@startsection{section}{1}{\aeb@author@indent}%
   {\aeb@author@beforeskip}{\aeb@author@afterskip}%
   {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{author}%
   \aeb@author@usefont\aeb@author@fontfamily\aeb@author@fontseries
   \aeb@author@fontshape\aeb@author@fontsize\aeb@author@halign
   \ifx\webauthor@color\@empty\else\color{\aeb@authorcolor}\fi
   \aeb@author@special}}
\newcommand{\sectionUniversity}{\aeb@sectionUniversity*}
\newcommand{\aeb@sectionUniversity}{%
   \renewcommand{\@seccntformat}[1]{\aeb@universityNum{##1}}%
   \@startsection{section}{1}{\aeb@university@indent}%
   {\aeb@university@beforeskip}{\aeb@university@afterskip}%
   {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{university}%
   \aeb@university@usefont\aeb@university@fontfamily
   \aeb@university@fontseries\aeb@university@fontshape
   \aeb@university@fontsize\aeb@university@halign
   \ifx\webuniversity@color\@empty\else
   \color{\aeb@universitycolor}\fi\aeb@university@special}}
\newcommand{\sectionToc}{\aeb@sectionToc*}
\newcommand{\aeb@sectionToc}{%
   \renewcommand{\@seccntformat}[1]{\aeb@universityNum{##1}}%
   \@startsection{section}{1}{\aeb@toc@indent}%
   {\aeb@toc@beforeskip}{\aeb@toc@afterskip}%
   {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{toc}%
   \aeb@toc@usefont\aeb@toc@fontfamily
   \aeb@toc@fontseries\aeb@toc@fontshape
   \aeb@toc@fontsize\aeb@toc@halign
   \ifx\aeb@toccolor\@empty\else
   \color{\aeb@toccolor}\fi\aeb@toc@special}}
%    \end{macrocode}
% \subsection{Layout Commands}\label{sectionLayout}
%
% The command \cs{sectionLayout} defines the style for your section headings.
% To set these properties globally, it is recommended you place this command
% in the preamble.
% \subsubsection{\texorpdfstring{\cs{sectionLayout}}{\textbackslash sectionLayout} and Friends}
%    \begin{macro}{\sectionLayout}
%    \begin{macro}{\subsectionLayout}
%    \begin{macro}{\subsubsectionLayout}
% If placed in preamble or \textsl{between} slides, these changes are global, if placed
% \textsl{within} the slide environment, they are local.  Note that the reset key will
% globally reset the values. Here we process the keys devoted to the section layout.
%    \begin{macrocode}
\newcommand{\sectionLayout}[1]{%
    \setkeys{aebsection}{type=section,color=blue}\setkeys{aebsection}{#1}}
\newcommand{\subsectionLayout}[1]{%
    \setkeys{aebsection}{type=subsection,color=blue}\setkeys{aebsection}{#1}}
\newcommand{\subsubsectionLayout}[1]{%
    \setkeys{aebsection}{type=subsubsection,color=blue}\setkeys{aebsection}{#1}}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
% \subsubsection{\texorpdfstring{\cs{titleLayout}}{\textbackslash titleLayout} and Friends}
%    \begin{macro}{\universityLayout}
%    \begin{macro}{\titleLayout}
%    \begin{macro}{\authorLayout}
% These three commands are used to create layouts for the university,
% title and author on the title page of the presentation.
%    \begin{macrocode}
\newcommand{\universityLayout}[1]{%
    \setkeys{aebsection}{type=university}%
    \edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}\aeb@temp}
\universityLayout{fontsize=\prtscr{large}{normalsize}}
\newcommand{\titleLayout}[1]{%
    \setkeys{aebsection}{type=title}%
        \edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}\aeb@temp}
\titleLayout{fontsize=\prtscr{Large}{normalsize}}
\newcommand{\authorLayout}[1]{%
    \setkeys{aebsection}{type=author}%
    \edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}\aeb@temp}
\authorLayout{fontsize=\prtscr{large}{normalsize}}
\newcommand{\tocLayout}[1]{%
    \setkeys{aebsection}{type=toc,color=\web@tocColor}%
    \edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}\aeb@temp}
\tocLayout{fontsize=Large}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
% \subsection{\texorpdfstring{\cs{useSectionNumbers}}{\textbackslash useSectionNumbers}}
%    \begin{macro}{\useSectionNumbers}
%    \begin{macro}{\noSectionNumbers}
% When developing out talks, we must decide whether to number the
% parts of our slides in the usual latexy way.  This decision should
% remain in effect throughout the who document.  I've set the default
% value at no, i.e., I've executed \cs{noSectionNumbers}.
%    \begin{macrocode}
\newcommand{\useSectionNumbers}
{
    \let\aeb@use@section@numbers1\relax
    \def\aeb@sectionNum##1{\csname the##1\endcsname.\ }
    \def\aeb@subsectionNum##1{\csname the##1\endcsname.\ }
    \def\aeb@subsubsectionNum##1{\csname the##1\endcsname.\ }
    \def\sectionmark##1{\markright{##1}}
}
\newcommand{\noSectionNumbers}
{
    \let\aeb@use@section@numbers0\relax
    \let\aeb@sectionNum\@gobble
    \let\aeb@subsectionNum\@gobble
    \let\aeb@subsubsectionNum\@gobble
}
\useSectionNumbers
%\@onlypreamble\useSectionNumbers
%\@onlypreamble\noSectionNumbers
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
% \subsection{Select Commands}
%
% \subsubsection{\texorpdfstring{\cs{selectColors}}{\textbackslash selectColors}}
%
% Use \cs{selectColors} to set the color scheme of your document. All the following
% keys take a defined color as its value. All of them have defaults define
% elsewhere in this document, or in the \textsf{web} and \textsf{hyperref}.
%    \begin{macrocode}
\define@key{aebcolordesign}{universityColor}{\universityColor{#1}}
    \def\aeb@universitycolor{\webuniversity@color}
\define@key{aebcolordesign}{titleColor}{\titleColor{#1}}
    \def\aeb@titlecolor{\webtitle@color}
\define@key{aebcolordesign}{authorColor}{\authorColor{#1}}
    \def\aeb@authorcolor{\webauthor@color}
\define@key{aebcolordesign}{textBgColor}{\textBgColor{#1}}
\define@key{aebcolordesign}{panelBgColor}{\panelBgColor{#1}}
\define@key{aebcolordesign}{urlColor}{\def\@urlcolor{#1}}
\define@key{aebcolordesign}{linkColor}{\def\@linkcolor{#1}}
\define@key{aebcolordesign}{fileColor}{\def\@filecolor{#1}}
%    \end{macrocode}
%    \begin{macro}{\selectColors}
% The \cs{selectColors} is a convenience command for setting
% many of the colors involved in the design of an \textsf{APB} document.
% The default colors are \dots
%\begin{verbatim}
%\selectColors
%{
%    universityColor = blue,
%    titleColor = black,
%    authorColor = black,
%    textBgColor = white,
%    panelBgColor = white,
%    fullwidthBgColor = white,
%    urlColor = webbrown,
%    linkColor = webgreen,
%    fileColor = webbrown
%}
%\end{verbatim}
%    \begin{macrocode}
\newcommand{\selectColors}[1]{\setkeys{aebcolordesign}{#1}}
%    \end{macrocode}
%    \end{macro}
% \subsubsection{\texorpdfstring{\cs{selectTocDings}}{\textbackslash selectTocDings}}
% We define necessary keys to create a simple interface to set the dings of
% an \textsf{APB} document.
%    \begin{macrocode}
\define@key{aebDings}{dDing}{\dDingToc{#1}}
\define@key{aebDings}{ddDing}{\ddDingToc{#1}}
\define@key{aebDings}{dddDing}{\dddDingToc{#1}}
\define@key{aebDings}{dDingColor}{\dDingTocColor{#1}}
\define@key{aebDings}{ddDingColor}{\ddDingTocColor{#1}}
\define@key{aebDings}{dddDingColor}{\dddDingTocColor{#1}}
\def\dDingToc#1{\def\d@DingToc{#1}}
\def\ddDingToc#1{\def\dd@DingToc{#1}}
\def\dddDingToc#1{\def\ddd@DingToc{#1}}
\def\dDingTocColor#1{\def\d@DingTocColor{#1}}
\def\ddDingTocColor#1{\def\dd@DingTocColor{#1}}
\def\dddDingTocColor#1{\def\ddd@DingTocColor{#1}}
\dDingTocColor{red}
\ddDingTocColor{blue}
\dddDingTocColor{webgreen}
\@tfor\@@tmp:={d@DingToc}{dd@DingToc}{ddd@DingToc}\do
    {\expandafter\let\csname\@@tmp\endcsname\@empty}
%    \end{macrocode}
%    \begin{macro}{\selectTocDings}
% This is an \textsf{xkeyval} interface to setting the dings used by
% the structured lists and the table of contents. Usage:
%\begin{verbatim}
%\selectDings
%{
%    dDingToc=\ding{082},
%    ddDingToc=\ding{079},
%    dddDingToc=\ding{254}
%}
%\end{verbatim}
%    \begin{macrocode}
\newcommand{\selectTocDings}[1]{\setkeys{aebDings}{#1}}
%    \end{macrocode}
% The following command is used in \cs{tableofcontents} for setting
% the dings there.
%    \begin{macrocode}
\def\@setTocDings{%
    \ifx\d@DingToc\@empty\else\dDing{\d@DingToc}\fi
    \ifx\dd@DingToc\@empty\else\ddDing{\dd@DingToc}\fi
    \ifx\ddd@DingToc\@empty\else\dddDing{\ddd@DingToc}\fi
}
%    \end{macrocode}
%    \end{macro}% Now, if for paper\dots
%    \begin{macrocode}
\ifeqforpaper
%    \end{macrocode}
%    \begin{environment}{forpaper}
%    \begin{environment}{forscreen}
% Using the required \texttt{comment} package, we define two
% comment environments one \texttt{forpaper} and another for
% \texttt{forscreen}.
%    \begin{macrocode}
    \includecomment{forpaper}
    \excludecomment{forscreen}
\else
    \includecomment{forscreen}
    \excludecomment{forpaper}
\fi
%    \end{macrocode}
%    \end{environment}
%    \end{environment}
%    \begin{macrocode}
%&lt;/webpro&gt;
%    \end{macrocode}
\endinput
</pre></body></html>