%\iffalse
% makeindex -s gglo.ist -o web.gls web.glo
% makeindex -s gind.ist -o web.ind web.idx
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Web package,                                         %%
%% Copyright (C) 1999-2019  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.
%%---------------------------------------------------------
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{web}
%<package> [2019/12/16 v6.1.4 web: A Screen Design Package (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
%\def\texorpdfstring#1#2{#1}
%\pdfstringdefDisableCommands{\let\\\textbackslash}
\OnlyDescription  % comment out for implementation details
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\InputIfFileExists{aebdocfmt.def}{\PackageInfo{web}{Inputting aebdocfmt.def}}
    {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
     \PackageInfo{web}{aebdocfmt.def cannot be found}}
\begin{document}
\def\CMD#1{\textbackslash#1}
\let\pkg\textsf
\let\opt\texttt
\addtolength{\marginparwidth}{3pt}
  \GetFileInfo{web.sty}
  \title{Web: A Screen Design Package}
  \author{D. P. Story\\
    Email: \texttt{dpstory@uakron.edu}}
  \date{processed \today}
  \maketitle
  \tableofcontents
  \DocInput{web.dtx}
\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
    \texttt{makeindex -s gind.ist -o web.ind web.idx} on the command line and recompile
    \texttt{web.dtx}.}
\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
    \texttt{makeindex -s gglo.ist -o web.gls web.glo} on the command line and recompile
    \texttt{web.dtx}.}
\end{document}
%</driver>
% \fi
% \MakeShortVerb{|}
% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{web}{Inputting aebdonotindex.def}}
%    {\PackageInfo{web}{cannot find aebdonotindex.def}}
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
%    Begin by requiring the \pkg{xkeyval} package (2016/08/17).
%\changes{v6.0i}{2016/04/28}{Added segments \string\texttt{docdefs} and
% \string\texttt{dnidefs} to format changes and index. Compile \string\texttt{web.ins}
% to obtain the files \string\texttt{aebdocfmt.def} and \string\texttt{aebdonotindex.def}.}
% \changes{v6.0l}{2016/08/17}{Switched over to \string\texttt{xkeyval} package}
%    \begin{macrocode}
\RequirePackage{xkeyval}
%    \end{macrocode}
% \section{Declare Options}
% Options for \texttt{dvipsone}, \texttt{dvips}, \texttt{dviwindo}, \texttt{pdftex},
% \texttt{dvipdfm}, \texttt{dvipdfmx}, \texttt{xetex}, and \texttt{textures}.
%\par\medskip\noindent
% We introduce these two packages early. We use them to automatically
% detect pdftex and xetex.
%\changes{v4.2k}{2012/06/18}{New requirement \string\textsf{ifpdf}}%
%    \begin{macrocode}
\RequirePackage{ifpdf}[2006/02/20]
\RequirePackage{ifxetex}[2006/08/21]
%    \end{macrocode}
%
% \subsection{Drivers Supported}
%    \begin{macrocode}
\IfFileExists{xcolor.sty}{%
    \def\eq@ColorPackage{xcolor}%
    \PassOptionsToPackage{xcolor}{table,hyperref}%
}{\def\eq@ColorPackage{color}}
%    \end{macrocode}
%    Force package to use \textsf{color}.\IndexOpt{noxcolor}
%    \begin{macrocode}
\DeclareOptionX{noxcolor}{\def\eq@ColorPackage{color}}
%    \end{macrocode}
%\changes{v4.2d}{2009/11/22}{%
%   Added \cs{i@web@ddtoHyOpts},
%   in the dvips option, we use it to set \texttt{setpagesize} to \texttt{false}.
%}
% Added \DescribeMacro{\i@web@ddtoHyOpts}\cs{i@web@ddtoHyOpts}. In recent versions of \textsf{hyperref}, \textsf{hyperref}
% sets the page size first, shutting out a custom page size later
% by the web package. By putting \texttt{setpagesize=false}, web
% can set the page size. This is done through the \cs{i@web@ddtoHyOpts}
% mechanism. This is strictly an internal command. The option \texttt{addtoHyOpts} is for users.
%    \begin{macrocode}
\let\i@web@ddtoHyOpts\@empty
\let\eq@driver@name\@empty
\let\web@YES=y \let\web@NO=n
%    \end{macrocode}
% \textsf{dvipsone}\IndexOpt{dvipsone}\space is the dvi-to-ps driver of the YandY system that I still
% use, I hate to give it up. Even I have not used the \IndexOpt{dviwindo}\texttt{dviwindo} option
% for many years, and is obsolete.
%    \begin{macrocode}
\DeclareOptionX{dvipsone}{%
    \def\eq@drivernum{0}\def\eq@driver@name{dvipsone}%
%    \end{macrocode}
% Below is the original definition of \cs{web@set@paper}, this has now
% changed with \texttt{v4.2j} to accommodate \cs{addtoWebHeight} and
% \cs{addtoWebWidth}.
%\begin{verbatim}
%    \def\web@set@paper{%
%        \special{papersize=\the\paperwidth,\the\paperheight}}%
%\end{verbatim}
% \changes{v4.2j}{2012/05/11}{In support of \string\cs{addtoWebHeight}, we introduce
% the pagesize special at the beginning of the document. Changes are in the
% \string\texttt{dvipsone} and \string\texttt{dvips} options only.}
% The revised definition of \cs{web@set@paper}, we now set the papersize
% at the beginning of the document.
%    \begin{macrocode}
    \let\web@set@paper\@empty
    \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}%
}
\DeclareOptionX{dviwindo}{%
    \def\eq@drivernum{4}\def\eq@driver@name{dviwindo}%
    \@namedef{papersize@for@\eq@driver@name}{\def\web@set@paper{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}%
}
%    \end{macrocode}
% Various extensions of \textsf{dvipdfm}, the dvi-to-pdf driver.\IndexOpt{dvipdfm}\IndexOpt{dvipdfmx}\IndexOpt{xetex}
%    \begin{macrocode}
\DeclareOptionX{dvipdfm}{%
    \def\eq@drivernum{2}\def\eq@driver@name{dvipdfm}%
    \web@opts@xdvipdfmx
}
%    \end{macrocode}
%\changes{v4.3}{2012/06/20}{Added \string\texttt{dvipdfmx} and \string\texttt{xetex} options}
%    \begin{macrocode}
\DeclareOptionX{dvipdfmx}{%
   \def\eq@drivernum{2}\def\eq@driver@name{dvipdfmx}%
   \web@opts@xdvipdfmx
}
%    \end{macrocode}
%    \begin{macrocode}
\DeclareOptionX{xetex}{%
   \def\eq@drivernum{2}\def\eq@driver@name{xetex}%
   \web@opts@xdvipdfmx
}
%    \end{macrocode}
%    \begin{macrocode}
\newcommand{\web@opts@xdvipdfmx}{%
    \@namedef{papersize@for@\eq@driver@name}%
        {\def\web@set@paper{\AtBeginDvi{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}}%
}
%    \end{macrocode}
% \texttt{dvips}\IndexOpt{dvips} is the dvi-to-ps driver.
%    \begin{macrocode}
\DeclareOptionX{dvips}{%
    \def\eq@drivernum{0}\def\eq@driver@name{dvips}%
    \def\i@web@ddtoHyOpts{setpagesize=false}%
%    \end{macrocode}
% The old definition of \cs{web@set@paper}
%\begin{verbatim}
%    \def\web@set@paper{%
%        \special{papersize=\the\paperwidth,\the\paperheight}}
%\end{verbatim}
% New definitions (\texttt{v4.2j}). See comments for the \texttt{dvipsone} option.
%    \begin{macrocode}
    \let\web@set@paper\@empty
    \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
        \special{papersize=\the\paperwidth,\the\paperheight}}}%
}
%    \end{macrocode}
% \texttt{pdftex}\IndexOpt{pdftex} is for users of \textsf{pdflatex}.
%    \begin{macrocode}
\DeclareOptionX{pdftex}{\ifx\eq@driver@name\@empty
   \def\eq@drivernum{1}\def\eq@driver@name{pdftex}%
   \def\i@web@ddtoHyOpts{setpagesize}\def\web@set@paper{}\fi
}
%    \end{macrocode}
%    Added \texttt{luatex}\IndexOpt{luatex} option. We use automatic detection anyway so
%    there is no reason to specify this option. We do not pass it on to \pkg{hyperref}.
%    \changes{v6.0n}{2016/12/15}{added luatex option for completeness}
%    \begin{macrocode}
\DeclareOptionX{luatex}{\ifx\eq@driver@name\@empty
   \def\eq@drivernum{1}\def\eq@driver@name{luatex}%
   \def\i@web@ddtoHyOpts{setpagesize}\def\web@set@paper{}\fi
}
%    \end{macrocode}
% The `\texttt{textures}\IndexOpt{textures}' option was contributed by Ross Moore.  {(2003/3/6)}
%    \begin{macrocode}
\DeclareOptionX{textures}{%
    \def\eq@drivernum{3}\def\eq@driver@name{textures}%
    \@namedef{papersize@for@\eq@driver@name}%
        {\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}
% These two options\IndexOpt{forpaper}\IndexOpt{forcolorpaper}
% cause \textsf{web} to ignore the \cs{screensize} and \cs{margins} commands, though
% the same \cs{textwidth} is used in both paper options and screen options.
%    \changes{v6.0j}{2016/06/04}{Added \string\cs{ifequsecolor} to easily distinguish between
%    \string\texttt{forpaper} and \string\texttt{forcolorpaper} options.}
%    \begin{macrocode}
\@ifundefined{ifequsecolor}{\newif\ifequsecolor \equsecolorfalse}{}
\DeclareOptionX{forpaper}{\equsecolorfalse\eqforpapertrue
  \PassOptionsToPackage{forpaper}{eqexam}
  \PassOptionsToPackage{monochrome}{\eq@ColorPackage}%
  \PassOptionsToPackage{forpaper}{exerquiz}}
\DeclareOptionX{forcolorpaper}{\equsecolortrue\eqforpapertrue
  \PassOptionsToPackage{forcolorpaper}{eqexam}
  \PassOptionsToPackage{forcolorpaper}{exerquiz}}
%    \end{macrocode}
% \subsection{First Page Options}
% Various options for setting the look of the document.\IndexOpt{latexlayout}^^A
% \IndexOpt{nodirectory}^^A
% \IndexOpt{usedirectory}^^A
% \IndexOpt{latextoc}^^A
% \IndexOpt{nobullets}^^A
%    \begin{macrocode}
\DeclareOptionX{latexlayout}{%
    \let\web@layout\web@NO\ExecuteOptionsX{forcolorpaper}}
\DeclareOptionX{uselatexsectioning}{%
    \web@sectioningfalse
}
\newif\ifweb@sectioning \web@sectioningtrue
\DeclareOptionX{weblikeclass}{%
    \ExecuteOptionsX{latexlayout}%
    \ExecuteOptionsX{nobullets}%
    \ExecuteOptionsX{uselatexsectioning}%
}
\DeclareOptionX{nodirectory}{\let\web@directory@option\web@NO}
\DeclareOptionX{usedirectory}{\let\web@directory@option\web@YES}
\DeclareOptionX{latextoc}{\let\web@latextoc\web@YES}
\DeclareOptionX{nobullets}{\let\web@bullets\web@NO
    \let\web@latextoc\web@YES\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.
%
% \cs{web@MargScrDimOpts} is an internal macro for setting the margins and the
% screen size; this command can only be used once per document (no overwriting
% of parameters).
%    \begin{macrocode}
\def\web@MargScrDimOpts#1#2#3#4#5#6{%
    \margins{#1}{#2}{#3}{#4} % left,right,top, bottom
    \screensize{#5}{#6}      % height, width
%    \end{macrocode}
% We save the current settings, then change \cs{margins} and \cs{screensize}
% to gobble their arguments up if used again.
%    \begin{macrocode}
%    \let\margins@web@save\margins
%    \let\screensize@web@save\screensize
    \let\margins\@@margins\let\screensize\@gobbletwo
}
%    \end{macrocode}
% The original design concept for various dimensions.\IndexOpt{designi...designvix}
%    \begin{macrocode}
\DeclareOptionX{designi}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}}}
\DeclareOptionX{designii}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}}}
\DeclareOptionX{designiii}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}}}
\DeclareOptionX{designiv}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}}}
\DeclareOptionX{designv}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}}}
\DeclareOptionX{designvi}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}}}
\DeclareOptionX{designvii}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}}}
\DeclareOptionX{designviii}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}}}
\DeclareOptionX{designix}{\AtEndOfPackage{%
    \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}}}
%    \end{macrocode}
% The \texttt{usesf}\IndexOpt{usesf} option makes the default font sans serif.
% Popular for presentations.
%    \begin{macrocode}
\DeclareOptionX{usesf}{%
    \def\aeb@defaultfamily{\sffamily}
    \def\itdefault{sl}
    \renewcommand{\familydefault}{\sfdefault}
    \selectfont
    \renewcommand\labelitemi{\textrm{\textbullet}}
    \AtEndOfPackage{\def\web@copyright@symbol{\textrm{\copyright}}}
}
\def\aeb@defaultfamily{\rmfamily}
%    \end{macrocode}
% Passes the \texttt{unicode}\IndexOpt{unicode} option to \textsf{hyperref}.
% \changes{v4.1}{2008/03/21}
% {%
%   Added the \string\texttt{unicode} option, which is passed to \string\textsf{hyperref}.
% }
%    \begin{macrocode}
\DeclareOptionX{unicode}{\def\aeb@useunicode{unicode}}
\let\aeb@useunicode\@gobble
%    \end{macrocode}
% If the option \IndexOpt{xhyperref}\opt{xhyperref} is taken, \textsf{hyperref} is not input by this
% package. The document author must do it prior to the \textsf{web} package.
%\changes{v4.3}{2012/06/20}{Added \string\texttt{xhyperref} option that bypasses
% the inclusion of \string\textsf{hyperref}.}
%    \begin{macrocode}
\newif\if@web@hyperref \@web@hyperreftrue
\DeclareOptionX{xhyperref}{\@web@hyperreffalse}
%    \end{macrocode}
%    \begin{macro}{addtoHyOpts}
%    Due to the ongoing development of \pkg{hyperref}, we make it easier to pass options to that package with
%    the \texttt{addtoHyOpts} option. This may cause clashes with other \pkg{hyperref} options, author may need
%    to back off as needed.
%    \changes{v6.0l}{2016/08/17}{Added \string\texttt{addtoHyOpts} option}
%    \begin{macro}{addtoHyOpts*}
%    The \opt{addtoHyOpts} passes its value to a \cs{hypersetup} command that is emitted after
%    the options have been processed.
%    \changes{v6.0m}{2016/08/19}{Added \string\texttt{addtoHyOpts*} option}
%    \begin{macrocode}
\define@choicekey+{webHyOpts}{pdfencoding}[\val\nr]%
    {auto,pdfdoc,unicode}[pdfdoc]{\edef\web@Hypdfencoding{\val}}
    {\PackageWarning{web}{Bad choice for pdfencoding,
    permissible values\MessageBreak
    are auto, pdfdoc, and unicode.\MessageBreak Try again}}
\let\web@Hypdfencoding\@empty
\let\u@web@ddtoHyOpts\@empty
\let\u@web@ddtoHySetup\@empty
\def\web@addtoHyOpts#1{\g@addto@macro\u@web@ddtoHyOpts{#1}}
\def\web@addtoHySetup#1{\g@addto@macro\u@web@ddtoHySetup{#1}}
\define@key{web.sty}{addtoHyOpts}[]{%
    \setkeys*{webHyOpts}{#1}\web@addtoHyOpts{#1}}
\define@key{web.sty}{addtoHyOpts*}[]{%
    \setkeys*{webHyOpts}{#1}\web@addtoHySetup{#1}}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
% Passes the \texttt{useui}\IndexOpt{useui} option to \textsf{eforms}. With this option,
% the key-value pairs \textsl{\'{a} la \textsf{xkeyval}} can be used.
% \changes{v4.1}{2008/03/21}
% {%
%   Added the \string\texttt{useui} option, which is passed to \string\textsf{eforms}.
% }
%    \begin{macrocode}
\DeclareOptionX{useui}{\PassOptionsToPackage{useui}{eforms}}
%    \end{macrocode}
% Force the use of subsubsection numbers\IndexOpt{forceSubSubNumbers}
%    \begin{macrocode}
\DeclareOptionX{forceSubSubNumbers}{\ExecuteOptionsX{nobullets}}
%    \end{macrocode}
% This options\IndexOpt{centertitlepage}\IndexOpt{centertitlepagefull} attempt to center the title page. The first one centers the content
% on the title page without changing the \cs{textwidth}, the second one centers the
% content on the page with \texttt{\cs{textwidth}=\cs{paperwidth}-2in}.
%    \begin{macrocode}
\DeclareOptionX{centertitlepage}{\@centertitlepagetrue}
\newif\if@centertitlepage \@centertitlepagefalse
\DeclareOptionX{centertitlepagefull}{\@centertitlepagefulltrue}
\newif\if@centertitlepagefull \@centertitlepagefullfalse
%    \end{macrocode}
% The \texttt{pro}\IndexOpt{pro} option introduces many enhanced features,
% these are cataloged in the \texttt{webpro} section of this file. An alias
% of \texttt{extended}\IndexOpt{extended} was introduced to avoid confusion with
% the `pro' naming convention of AeB to indicate \textsf{Distiller} is required as
% a PDF creator.
%    \begin{macrocode}
\DeclareOptionX{pro}{\let\webpro@loaded\web@YES}
\DeclareOptionX{extended}{\let\webpro@loaded\web@YES}
\let\webpro@loaded\web@NO
\def\loadwebpro{\InputIfFileExists{webpro.def}{}{}}
%    \end{macrocode}
%
% When you take the \texttt{draft}\IndexOpt{draft} 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
\DeclareOptionX{draft}{\web@allowtemplatesfalse}
%    \end{macrocode}
%
% \subsection{Panel Related Options}
% The \IndexOpt{usetemplates}\texttt{usetemplates} option allows the use of templates;
% \IndexOpt{leftpanel} \texttt{leftpanel} declares the use of a left (navigational)
% panel; \IndexOpt{rightpanel} \texttt{rightpanel} declares the use of a left (navigational)
% panel.
%    \begin{macrocode}
\DeclareOptionX{usetemplates}{\def\@usetemplates{1}}
\DeclareOptionX{leftpanel}%
    {\def\@panelconfig{1}\def\@usetemplates{1}}
\DeclareOptionX{rightpanel}%
    {\def\@panelconfig{2}\def\@usetemplates{1}}
%    \end{macrocode}
% Normally, the templates feature is removed
% when the \texttt{forpaper} or \texttt{forcolorpaper} open is used. There may be
% situation when templates are a good thing for paper. We offer \texttt{templatesforpaper}\IndexOpt{templatesforpaper}
% as an option.
%    \begin{macrocode}
\newif\iftemplatesforpaper \templatesforpaperfalse
\DeclareOptionX{templatesforpaper}{\templatesforpapertrue
    \ExecuteOptionsX{forcolorpaper}}
%    \end{macrocode}
% Here we come to a couple of options, \IndexOpt{rightpanelprt}\IndexOpt{leftpanelprt}
% \texttt{rightpanelprt} and \texttt{leftpanelprt}, I remember nothing about.
% apparently, these are \texttt{rightpanel} and \texttt{leftpanel} options for screen mode only.
%    \begin{macrocode}
\DeclareOptionX{rightpanelprt}{%
    \ifeqforpaper\else\ExecuteOptionsX{rightpanel}\fi
}
\DeclareOptionX{leftpanelprt}{%
    \ifeqforpaper\else\ExecuteOptionsX{leftpanel}\fi
}
%    \end{macrocode}
% \DescribeMacro{\templatedefaults} sets the defaults for the template code.
%    \begin{macrocode}
\def\templatedefaults{\def\@panelsep{0pt}\def\@usetemplates{0}%
    \def\@panelconfig{0}\def\@textX{0}\def\@panelX{0}%
}
\templatedefaults
%    \end{macrocode}
% \subsection{Miscellaneous Options}
%
% The \texttt{navibar}\IndexOpt{navibar} option places
% a set of navigation buttons on footer.
%    \begin{macrocode}
\DeclareOptionX{navibar}{\web@navibartrue}
%    \end{macrocode}
%    The \texttt{tight}\IndexOpt{tight} option reduces
%    the vertical spaces around equations and verbatim environments. The \texttt{tight*}\IndexOpt{tight*}
%    is the same as \texttt{tight} but is operational only for the screen.
%    \begin{macrocode}
\DeclareOptionX{tight}{\AtEndOfPackage{\tightsettings}}
\DeclareOptionX{tight*}{\AtEndOfPackage{\tightsettings*}}
%    \end{macrocode}
%    The \cs{web@tight} flag signals that tight settings are in effect. Currently, the flag is not
%    used.
%    \begin{macrocode}
\let\web@tight\web@NO
%    \end{macrocode}
% If either of these options is used\IndexOpt{uselatexparts}\IndexOpt{uselatexchapters},
% the re-definitions that \textsf{web} makes are bypassed, and the original {\LaTeX}
% definitions are used.
%    \begin{macrocode}
\DeclareOptionX{uselatexparts}{%
    \AtEndOfPackage{\@ifundefined{part}{}{\let\part\web@save@part}}}
\DeclareOptionX{uselatexchapters}{%
    \AtEndOfPackage{\@ifundefined{chapter}{}
        {\let\chapter\web@save@chapter}}}
%    \end{macrocode}
% \subsection{Language Options}
% The \texttt{french}\IndexOpt{french} option
%    \begin{macrocode}
\DeclareOptionX{french}{%
  \AtEndOfPackage{%
%======> 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}
%======> 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}
}
%    \end{macrocode}
% The \texttt{german}\IndexOpt{german} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{norsk}\IndexOpt{norsk} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{dutch}\IndexOpt{dutch} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{spanish}\IndexOpt{spanish} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{italian}\IndexOpt{italian} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{russian}\IndexOpt{russian} option
% \DoNotIndex{\cyrCommand,\cyra,\cyrn,\cyrv,\cyra,\cyrr,\cyrya,
% \cyrf,\cyre,\cyrv,\cyrr,\cyra,\cyrl,\cyrya,\cyrm,\cyra,\cyrr,\cyrt,\cyra,
% \cyrm,\cyra,\cyrya,\cyri,\cyryu,\cyrn,\cyryacyri,\cyryu,\cyrl,\cyrya,
% \cyra,\cyrv,\cyrg,\cyru,\cyrs,\cyrt,\cyra,\cyrs,\cyre,\cyrn,\cyrt,\cyrya,\cyrb,\cyrr,\cyrya,
% \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya\cyrn\cyro\cyrya\cyrb\cyrr\cyrya,
% \cyrd,\cyre,\cyrk,\cyrya,\cyrb,\cyrr,\cyrya,\CYRO,\cyrg,\cyrl,\cyra,\cyrv,\cyrl,\cyre,\cyrn,
% \cyri,\cyre,\cyrd,\cyro,\cyrk,\cyru,\cyrm,\cyre,\cyrn,\cyrt,\cyra,
% \CYRN,\cyra,\cyrch,\cyra,\cyrl,\cyro,\CYRS,\CYRP,\CYRV,\CYRN,\CYRCH,
% \cyrp,\cyrz,\cyrz,\cyrzh,\CYRK,\cyrishrt,\cyrsftsn}
%    \begin{macrocode}
\DeclareOptionX{russian}{%
  \ExecuteOptionsX{unicode}%
  \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}
}
%    \end{macrocode}
% The \texttt{dansk}\IndexOpt{dansk} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{polish}\IndexOpt{polish} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{finnish}\IndexOpt{finnish} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{catalan}\IndexOpt{catalan} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{czech}\IndexOpt{czech} option
%    \begin{macrocode}
\DeclareOptionX{czech}{%
  \AtEndOfPackage{%
  \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}
  \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}
}
%    \end{macrocode}
% The \texttt{brazil}\IndexOpt{brazil} option
%    \begin{macrocode}
\DeclareOptionX{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}
}
%    \end{macrocode}
% The \texttt{turkish}\IndexOpt{turkish} option
%    \begin{macrocode}
\DeclareOptionX{turkish}{%
  \ExecuteOptionsX{unicode}%
  \AtEndOfPackage{%
%======> Modification : Mahmut Ko\c{c}ak
  \def\today{\the\day\ \ifcase\month\or Ocak
    \or \c{S}ubat \or Mart  \or Nisan
    \or May{\i}s \or Haziran  \or Temmuz  \or A\u{g}ustos
    \or Eyl\"ul  \or Ekim  \or Kas{\i}m
    \or Aral{\i}k \fi \the\year}
%======> Modification : MK
  \def\web@toc{{\.I}\c{c}indekiler}
  \def\web@continued{suite}
  \def\web@article{\hyperlink{\web@Start.1}{D\"ok\"umanta} ba{\c s}la}
  \def\web@directory{Dosya}
  \def\web@revision{Son versiyon tarihi :}
  \def\web@copyright{Copyright}
  \def\web@versionlabel{Versiyon}
  \def\web@section{K{\i}s{\i}m}
  \def\web@back{Geri}
  \def\web@doc{D\"ok}}
  \PassOptionsToPackage{turkish}{exerquiz}
}
%    \end{macrocode}
% Unknown options are passed to the color package
%    \begin{macrocode}
\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}
    {\eq@ColorPackage}}
%    \end{macrocode}
% We use \textsf{xcolor} if available.
%    \begin{macrocode}
\@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 navigation 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
\newif\ifweb@margins@set \web@margins@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{%
    \ifx\web@latextoc\web@YES\else
    \PackageWarning{webpro}{\string\forSubSubNumbers\space
    requested,\MessageBreak I'm adding the option of latextoc}\fi
    \let\web@latextoc\web@YES\@defaultsubsubdingfalse
}
%    \end{macrocode}
%    \end{macro}
% A hack so that the redefinition of \cs{chapter} will work for
% \texttt{report} class as well as \texttt{book} class.
%    \begin{macrocode}
\@ifclassloaded{report}{\newif\if@mainmatter\@mainmattertrue}{}
%    \end{macrocode}
%    \begin{macro}{\NewPage}
% A convenient definition for people using the forpaper option
%    \begin{macrocode}
\newcommand\NewPage{\ifeqforpaper\else\newpage\fi}
%    \end{macrocode}
%    \end{macro}
% (03/14/09) Changed \cs{web@directory@option} from a default value of \texttt{y}
% to a default value of \texttt{n}. Added a new option \texttt{usedirectory}
% to get the directory to appear.
%    \begin{macrocode}
\let\web@directory@option\web@NO
\let\web@latextoc\web@NO
\let\web@layout\web@YES
\let\web@bullets\web@YES
\def\web@finalDot{.}
\def\noFinalDot{\let\web@finalDot\@empty}
\@onlypreamble\noFinalDot
%    \end{macrocode}
% \subsection{Load Configuration File: web.cfg}
% Look for configuration file, \texttt{web.cfg}, for example
%\begin{verbatim}
%    \ExecuteOptionsX{dvips}
%\end{verbatim}
% sets \texttt{dvips} 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}
% If we are running \textsf{pdflatex} or \textsf{xelatex}, execute either the \texttt{pdftex}
% or \texttt{xetex} option, else input \texttt{web.cfg} and process options.
% In support of version 6.1.3 (2019/10/23), we \cs{let} \cs{bWebCustomize} and
% \cs{eWebCustomize} to \cs{endinput} and \cs{relax}, respectively. Also see the
% definition of \cs{inputWebCfg} below.
%\changes{v4.2k}{2012/06/18}{Check for \string\texttt{pdftex}}
%\changes{v6.0h}{2016/04/16}{An attempt to better guess the driver if
%there is no \string\texttt{web.cfg} file.}%
%    \begin{macrocode}
\let\bWebCustomize\endinput
\let\eWebCustomize\relax
\ifpdf\ExecuteOptionsX{pdftex}\else
  \ifxetex\ExecuteOptionsX{xetex}\else
%    \end{macrocode}
%    For backward compatibility, we \cs{let} \cs{ExecuteOptions} to
%    \cs{ExecutedOptionsX}, saving and restoring as we go.
%    \changes{v6.0l}{2016/08/17}{For backward compatibility, we \string\cs{let} \string\cs{ExecuteOptions} to
%    \string\cs{ExecutedOptionsX}}
%    \begin{macrocode}
    \let\ExecuteOptions@SAVE\ExecuteOptions
    \let\ExecuteOptions\ExecuteOptionsX
    \InputIfFileExists{web.cfg}{}
    {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
      {\ExecuteOptionsX{dvipsone}}}%
    \let\ExecuteOptions\ExecuteOptions@SAVE
  \fi
\fi
%    \end{macrocode}
%    We allow \texttt{web.cfg} to be imported in the preamble. Expand
%    \DescribeMacro\inputWebCfg\cs{inputWebCfg} in the preamble only to
%    input the \texttt{web.cfg} file again. The \cs{ExecuteOptions} command is ignored.
%    Redefinitions should be placed between \cs{bWebCustomize} and \cs{eWebCustomize}.
%    \changes{v6.1.3}{2019/10/23}{Allow \string\texttt{web.cfg} to be imported in the preamble.}
%    \begin{macrocode}
\providecommand{\inputWebCfg}{%
  \let\bWebCustomize\relax
  \let\eWebCustomize\endinput
  \let\ExecuteOptions@SAVE\ExecuteOptions
  \let\ExecuteOptions\@gobble
  \makeatletter
  \InputIfFileExists{web.cfg}{}{}\makeatother
  \let\ExecuteOptions\ExecuteOptions@SAVE
  \let\bWebCustomize\endinput
  \let\eWebCustomize\relax
}
\@onlypreamble\inputWebCfg
%    \end{macrocode}
% \subsection{Process Options}
%    \begin{macrocode}
\ProcessOptionsX
%    \end{macrocode}
%    If the user specified a value for the \texttt{pdfencoding} key of \textsf{hyperref},
%    then ignore the \texttt{unicode} option.
%    \begin{macrocode}
\ifx\web@Hypdfencoding\@empty\else
    \let\aeb@useunicode\@gobble\fi
%    \end{macrocode}
% We use a utility command, taken and renamed from the \texttt{comment} package.
%    \begin{macrocode}
\def\w@csarg#1#2{\expandafter#1\csname#2\endcsname}
%    \end{macrocode}
% Based on the selected driver, we set the page size.
%    \begin{macrocode}
\@nameuse{papersize@for@\eq@driver@name}
\ifx\web@layout\web@YES\else\templatedefaults\fi
%    \end{macrocode}
%    \begin{macrocode}
\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}
\pdfmarkupfalse\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
%    \end{macrocode}
% If the \texttt{templatesforpaper} option is taken, we need to declare
% \cs{@usetemplates=1}, changed in the previous line.
%    \begin{macrocode}
\iftemplatesforpaper\def\@usetemplates{1}\fi
%    \end{macrocode}
% \changes{v4.4}{2012/08/26}{Using \string\texttt{centertitlepagefull} implies
%\string\texttt{centertitlepage}}
%    \begin{macrocode}
\if@centertitlepagefull\@centertitlepagetrue\fi
%    \end{macrocode}
% \subsection{Required Packages}
%    \begin{macrocode}
\RequirePackage{\eq@ColorPackage}
\RequirePackage{calc}
\RequirePackage{amssymb}% used for navibar
%    \end{macrocode}
%\changes{v4.2g}{2011/01/15}
%{%
%    Remove the \string\cs{PassOptionsToPackage} mechanism to pass the driver
%    option to \string\textsf{hyperref}. Instead, we pass the driver option directly
%    in the key-value pairs of \string\textsf{hyperref} as \string\cs{eq@driver@name}.
%}
%\changes{v6.0j}{2016/07/22}{Using \string\cs{edef}, do not pass driver in case of
% pdftex, luatex, or xetex.}
% We declare options to be passed to \pkg{hyperref}.
%    \begin{macrocode}
\edef\web@RequireHyperref{\noexpand\RequirePackage[%
%    \end{macrocode}
% (2016/07/22) We do not pass the driver to \pkg{hyperref} in the cases the driver
% is \texttt{pdftex} or \texttt{xetex}.
%    \begin{macrocode}
    \ifpdf\else\ifxetex\else\eq@driver@name,\fi\fi
    bookmarks,bookmarksnumbered,bookmarksopen,%
    colorlinks,\aeb@useunicode,linkcolor=webgreen,%
    filecolor=webbrown,citecolor=webgreen,%
    urlcolor=webbrown,pagebackref,pdfpagemode=UseNone,%
    pdfstartview=Fit,pdfpagelayout=SinglePage%
%    \end{macrocode}
%    (2016/08/19) Moved the following code to the end of the option list so these options can override
%    earlier options in the list.
%    \changes{v6.0m}{2016/08/19}{Moved user and internal options for \string\pkg{hyperref} to end of option list so they
%    can override earlier options.}
%    \begin{macrocode}
    \ifx\u@web@ddtoHyOpts\@empty\else,\u@web@ddtoHyOpts\fi
    \ifx\i@web@ddtoHyOpts\@empty\else,\i@web@ddtoHyOpts\fi]{hyperref}%
}
%    \end{macrocode}
% If the option \texttt{xhyperref} is taken, \textsf{hyperref} is not input by this
% package. The document \emph{\textbf{author must do it prior}} to the \textsf{web} package.
%    \changes{v6.0n}{2016/08/30}{Fixed a problem with \string\cs{web@RequireHyperref}
%    and its placement in \string\cs{w@isHyLoaded}.}
%    \begin{macrocode}
\def\w@isHyLoaded{\@ifpackageloaded{hyperref}{}{\PackageError{web}
    {The xhyperref option used, but hyperref is not\MessageBreak
    already loaded. Will load hyperref with the options\MessageBreak
    chosen by web}{Remove xhyperref or load hyperref prior to the web
    package.}\web@RequireHyperref}%
}
%    \end{macrocode}
%    Now if the \opt{xhyperref} option \emph{is not taken}, we load \pkg{hyperref}; otherwise, if \pkg{hyperref}
%    is not already loaded, we issue a warning and load \pkg{hyperref} with the standard \pkg{web}
%    options.
%    \begin{macrocode}
\if@web@hyperref\expandafter\web@RequireHyperref\else
    \expandafter\w@isHyLoaded\fi
\ifx\u@web@ddtoHySetup\@empty\else\edef\x{\noexpand\hypersetup
    {\u@web@ddtoHySetup}}\expandafter\x\fi
%    \end{macrocode}
%    We declare that `The AcroTeX eDucation Bundle' is the pdf creator.
%    \begin{macrocode}
\def\@pdfcreator{The AcroTeX eDucation Bundle}
%    \end{macrocode}
%    The \pkg{comment} package is required to this package's success.
%    \changes{v6.1.1}{2017/12/05}{require aeb-comment (version 3.1 of comment)}
%    \begin{macrocode}
\RequirePackage{aeb-comment}
\def\web@commentChkMsg{\@ifpackageloaded{comment}
  {\PackageWarningNoLine{web}
    {The comment package is incompatible with the\MessageBreak
     aeb-comment package, do not use the comment package}}{}}
\AtBeginDocument{\web@commentChkMsg}
%    \end{macrocode}
% If the user specifies the use of templates, we assume they are going
% to do some graphical work, so we include \textsf{graphicx}.
%    \begin{macrocode}
\ifnum\@usetemplates=1\relax
    \def\x{\RequirePackage{graphicx}}\expandafter\x\fi
%    \end{macrocode}
% If the user specifies an option requiring templates, then we better
% load \textsf{eso-pic}, which itself requires \textsf{everyshi} or \textsf{atbegshi}.
%    \begin{macrocode}
\ifnum\@usetemplates=1\relax
    \RequirePackage{eso-pic}
%    \end{macrocode}
% Here is a fix for \textsf{dvipdfm}.  If using templates, then we need to
% redefine the way we set the page size using \textsf{eso-pic}. We also need
% to redefine the \textsf{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\relax
        \def\web@set@paper{\AddToShipoutPicture*{%
            \special{papersize=\the\paperwidth,\the\paperheight}}}%
%    \end{macrocode}
% We use some code from \textsf{hyperref} to set the page size.
%    \begin{macrocode}
        \AtBeginShipoutFirst{%
            \begingroup
              \@ifundefined{stockwidth}{%
                \ifx\special@paper\@empty
                  \special{papersize=\the\paperwidth,\the\paperheight}%
                \else
                  \special{papersize=\special@paper}%
                \fi
              }{%
                \ifdim\stockwidth=\z@
                \else
                  \special{papersize=\the\stockwidth,\the\stockheight}%
                \fi
              }%
            \endgroup
        }%
%    \end{macrocode}
% \changes{v4.2d}{2009/11/22}{Modifications to use
%   new \string\textsf{eso-pic}}
%    \begin{macrocode}
    \@ifundefined{@ShipoutPicture}{}{%
%    \end{macrocode}
% The new version of \textsf{eso-pic} does not define \cs{@ShipoutPicture}.
% If \cs{@Ship\-out\-Pic\-ture} defined, so we use some of the old code.
%    \begin{macrocode}
            \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}}
\let\getargsii\getargs
%    \end{macrocode}
%
% \subsection{Compute Page Layout}
%
% We require two new lengths for the template support. Set the default
% to be \cs{paperwidth}.
%    \begin{macrocode}
\newlength{\textscreenwidth}
\setlength{\textscreenwidth}{\paperwidth}
%    \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}
\def\panelscreenwidth{\@panelwidth}
%    \end{macrocode}
% This is the width of the (navigation) panel. The navigation 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 \textsf{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 \texttt{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
%    \end{macrocode}
%    \begin{macrocode}
\newcommand{\websetheadheight}{8pt}
\newcommand{\web@footskip}{4pt}
\def\web@additionalheadsep{0pt}
%    \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
      \setlength\headheight{\websetheadheight}
      \hoffset=0pt \voffset=0pt
    \fi
    \ifeqforpaper\else
    {\@tempdima=\paperwidth
    \addtolength{\@tempdima}{-\@Leftmargin}%
    \addtolength{\@tempdima}{-\@Rightmargin}%
    \xdef\fullscreenwidth{\the\@tempdima}}%
    \fi
    \ifx\web@layout\web@YES\else\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 (\topmargin)
%\end{verbatim}
%    \begin{macrocode}
        \setlength{\headsep}{\@Topmargin}
        \addtolength\headsep{-\headheight}
        \setlength{\topmargin}{\web@Topmargin}
        \addtolength\headsep{-\topmargin}
        \addtolength\headsep{\web@additionalheadsep}
        \addtolength{\topmargin}{-1in}
        \setlength\footskip{\@Bottommargin}
        \addtolength{\footskip}{-\web@footskip} % 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\web@YES
        \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\relax
            \setlength{\textscreenwidth}{\paperwidth}
            \def\@textX{0}
            \ifnum\@panelconfig=1 % leftpanel
                \addtolength{\textwidth}{-\@panelsep}
                \addtolength{\oddsidemargin}{\@panelsep}
                \addtolength{\evensidemargin}{\@panelsep}
                \addtolength{\textscreenwidth}{-\@panelwidth}
                \def\@textX{\strip@pt\@panelwidth}
                \def\@panelX{0}
            \fi
            \ifnum\@panelconfig=2 % rightpanel
                \addtolength{\textwidth}{-\@panelsep}
                \addtolength{\textscreenwidth}{-\@panelwidth}
                \def\@textX{0}
                \def\@panelX{\strip@pt\textscreenwidth}
            \fi
            \calculatefullwidth
        \fi
    \fi
}
%    \end{macrocode}
%    \subsection{Distiller related commands}
% When distilling with large paper sizes, for example \texttt{designvii}, the standard distiller
% page is too small to cover the large page. One option is to use a custom joboptions such as
% \texttt{Oversized Pages\_20x20.joboptions}. However, the page size the distiller uses can be set
% through the {\LaTeX} source file. For this purpose, we introduce the command
% \DescribeMacro\setPageDevice\cmd\setPageDevice. The optional first argument is the resolution
% in dots per inch. The standard joboptions file has 600 as this value; the high quality and
% press quality have this parameter at 2400. The second and third parameters are the
% width and height, respectively, of the \textbf{/PageSize}. For greatest accuracy, the values of
% width and height should be entered in printers points (without dimensions). For example,
%\begin{verbatim}
%\setPageDevice{1400}{1400}
%\end{verbatim}
% is preferred to
%\begin{verbatim}
%\setPageDevice{20in}{20in}
%\end{verbatim}
% \texttt{20in} gets converted to \texttt{1439.9965}. The conversion, if necessary, is done
% by \cs{@convLtoP}
%
% The command \cs{@convLtoP} is taken from the \textsf{graphics} package and is based on
% \cs{Gin@defaultbp}.
%
% The commands seems only effect with the \textsf{dvipsone} driver.
%    \begin{macrocode}
\def\@convLtoP#1#2{%
  \afterassignment\@convLtoP@i\dimen@#2bp\relax{#1}{#2}}
\def\@convLtoP@i#1\relax#2#3{%
   \if!#1!%
     \def#2{#3}%
    \else
      \dimen@.99626\dimen@
      \edef#2{\strip@pt\dimen@}%
    \fi}
\providecommand\setPageDevice[3][600]{\bgroup
    \@convLtoP{\width}{#2}\@convLtoP{\height}{#3}
    \ifpdfmarkup\headerps@out{<< /HWResolution [#1 #1] %
      /PageSize [\width\space\height] >> setpagedevice}\else
    \PackageWarning{web}{This is a distiller only command,\MessageBreak
    ignoring \string\setPageDevice}\fi\egroup}
%    \end{macrocode}
%\DescribeMacro\allowTransparency sets the \textbf{AllowTransparency} key of
% the distiller to \textbf{true}. We do this with \texttt{setdistillerparams}.
%    \begin{macrocode}
\providecommand\allowTransparency{\bgroup
    \ifpdfmarkup\headerps@out{<< %
    /AllowTransparency true >> setdistillerparams}\else
    \PackageWarning{web}{This is a distiller only command,\MessageBreak
    ignoring \string\allowTransparency}\fi\egroup}
\@onlypreamble\setPageDevice
\@onlypreamble\allowTransparency
%    \end{macrocode}
%    \subsection{Preamble Content}
%    \subsubsection{\texorpdfstring{\protect\cs{screensize}}{\CMD{screensize}}}
%    \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. The second and third parameters are the width and height, respectively, as measured
% in printer points ($72\,\mbox{points} = 1\,\mbox{inch}$, or measures in the \texttt{bp} points of \TeX.)
%\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{%
    \def\webSaveSSDim{{#1}{#2}}%
    \begingroup
    \ifeqforpaper
        \ifx\web@layout\web@YES
            \setlength{\@tempdima}{#2}%
            \global\textwidth\@tempdima
            \addtolength{\@tempdima}{-\@Leftmargin}%
            \addtolength{\@tempdima}{-\@Rightmargin}%
            \xdef\fullscreenwidth{\the\@tempdima}%
        \else
            \xdef\fullscreenwidth{\the\textwidth}%
        \fi
    \else
        \setlength{\@tempdima}{#1}%
        \global\paperheight\@tempdima
        \setlength{\@tempdima}{#2}%
        \global\paperwidth\@tempdima
    \fi
    \endgroup
        \web@papersize@settrue
        \web@set@paper  % dps modified
        \let\screensize\@gobbletwo
    \InitLayout
}
%    \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}{\setScreensizeFromGraphic}
% If a design is not specified in the option list of web, you can use a graphic
% to set the screen size. The two parameters of this command correspond to
% the parameters of \cs{includegraphics}, and they are just passed to that
% command. This is useful if you have a graphic to be used for a template but
% cannot be deformed to fit one of the standard designs. The solution is to
% create a screen size matching the graphic, then using that graphic as a template.
% Example usage,
%\begin{verbatim}
%    \margins{1in}{1in}{24pt}{.25in}
%    \setScreensizeFromGraphic{acro_30}
%    \template{acro_30}
%\end{verbatim}
% This command takes two arguments, the first is optional and is passed
% to the \cs{includegraphics} command, the second it the path to the file.
%
% It may become necessary with some graphics to use the
% \texttt{hiresbb} option for \cs{includegraphics}, both in
% \cs{setScreensizeFromGraphic} and \cs{template} like so,
%\begin{verbatim}
%    \margins{1in}{1in}{24pt}{.25in}
%    \setScreensizeFromGraphic[hiresbb]{acro_30}
%    \template[hiresbb]{acro_30}
%\end{verbatim}
% \changes{v4.0f}{2007/06/11}
% {
%   This command measures the dimensions of an EPS file, and sets the
%   screen dimensions to these dimensions.
% }
%    \begin{macrocode}
\newcommand{\setScreensizeFromGraphic}[2][]{%
    \getDimsFromGraphic[#1]{#2}%
    {\web@graphicScreenWidth}{\web@graphicScreenHeight}%
    \screensize{\web@graphicScreenHeight}{\web@graphicScreenWidth}%
}
\@onlypreamble\setScreensizeFromGraphic
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\getDimsFromGraphic}
% This command uses the graphicx package. It loads a graphic
% into a box and measures its dimensions.
% \changes{v4.1a}{2008/07/06}
% {
%   Added the command \string\cs{getDimsFromGraphic} as a helper command for
%   \string\cs{setScreensizeFromGraphic}, but also useful as
%   stand alone as well.
% }
%
%\medskip\noindent The parameters are:
%\begin{enumerate}
%   \item[]\texttt{[\#1]}: Optional argument that is passed to \cs{includegraphics} command
%   \item[]\texttt{\#2}: The path to the graph to be read
%   \item[]\texttt{\#3}: A control sequence to be used to hold the width
%   \item[]\texttt{\#4}: A control sequence to be used to hold the height
%\end{enumerate}
%    \begin{macrocode}
\newcommand{\getDimsFromGraphic}[4][]{{%
    \setbox0=\hbox{\includegraphics[draft,#1]{#2}}%
    \dimen@=\dp0 \advance\dimen@\ht0
    \xdef#3{\the\wd0 }\xdef#4{\the\dimen@}%
}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\addtoWebHeight}
%    \begin{macro}{\addtoWebWidth}
% Convenience macros to adjusting the height or width of the page
% relative to dimensions already declared by a design option or
% the \cs{screensize} command.
%\changes{v4.2i}{2012/05/08}{Added \string\cs{addtoWebHeight} and
% \string\cs{addtoWebWidth} to adjust height and width relative to
% already declared dimensions.}
%    \begin{macrocode}
\def\web@getSSDims#1#2{\edef\web@@height{#1}\edef\web@@width{#2}}
\def\addToWebHWError{\PackageError{web}{%
    You must declare screen size first by using\MessageBreak
    the \string\screensize\space command, or by declaring \MessageBreak
    a design in the web option list}%
    {Do as is suggested in error message!}}
\newcommand{\addtoWebHeight}[1]{%
%    \end{macrocode}
%    If the \cmd{\screensize} has already been set, it has been
%    \cmd{\let} to \cmd{\@gobbletwo}. We use this to detect the error
%    of not already declaring page dimensions.
%    \begin{macrocode}
    \ifx\screensize\@gobbletwo
    \expandafter\web@getSSDims\webSaveSSDim
%    \end{macrocode}
%    Even though \cmd{\screensize} has already been expanded and is now
%    \cs{let} to \cs{@gobbletwo}, we can use our saved version of
%    \cs{screensize} that no one knows about.
%    \begin{macrocode}
    \screensize@web@save{\web@@height+#1}{\web@@width}%
    \else\addToWebHWError\fi
}
%    \end{macrocode}
% \cs{addtoWebWidth} works the same way as \cmd{\addtoWebHeight}.
%    \begin{macrocode}
\newcommand{\addtoWebWidth}[1]{%
    \ifx\screensize\@gobbletwo
    \expandafter\web@getSSDims\webSaveSSDim
    \screensize@web@save{\web@@height}{\web@@width+#1}%
    \else\addToWebHWError\fi
}
%    \end{macrocode}
% Expand in preamble only.
%    \begin{macrocode}
\@onlypreamble\addtoWebHeight
\@onlypreamble\addtoWebWidth
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \subsubsection{\texorpdfstring{\protect\cs{margins}}{\CMD{margins}}}
%    \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][\web@minpanelwidth]
{%
    \def\webSaveMargDim{[#1]{#2}{#3}{#4}{#5}}%
    \setlength{\@panelwidth}{#1}%
    \ifdim\@panelwidth<\web@minpanelwidth
        \setlength{\@panelwidth}{\web@minpanelwidth}\fi
    \setlength{\@Leftmargin}{#2}%
    \setlength{\@Rightmargin}{#3}%
    \setlength{\@Topmargin}{#4}%
    \setlength{\@Bottommargin}{#5}%
    \web@margins@settrue
    \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}
% \DescribeMacro{\resetmargins} a companion command to
% |\addtoWebWidth| and |\addtoWebHeight|, this command readjusts
% the margins. Within the arguments \cs{incby}
% refer to the current dimension.
%\begin{verbatim}
%\resetsmargins{\incby+.25in}{\incby+.25in}{}{}
%\end{verbatim}
% This line adds .25in to each of the side margins.
%    \begin{macrocode}
\newcommand\get@MargDim[5][]{%
    \def\currPanelWidth{#1}%
    \def\currLeftMarg{#2}\def\currRightMarg{#3}%
    \def\currTopMarg{#4}\def\currBottomMarg{#5}}
\newcommand{\resetmargins}[5][\web@minpanelwidth]{%
    \expandafter\get@MargDim\webSaveMargDim
    \begingroup
        \let\incby\currPanelWidth
        \def\web@arg{#1}\ifx\web@arg\@empty
        \setlength{\@tempdima}{\currPanelWidth}\else
        \setlength{\@tempdima}{#1}\fi
        \xdef\newPanelWidth{\the\@tempdima}%
        \let\incby\currLeftMarg
        \def\web@arg{#2}\ifx\web@arg\@empty
        \setlength{\@tempdima}{\currLeftMarg}\else
        \setlength{\@tempdima}{#2}\fi
        \xdef\newLeftMarg{\the\@tempdima}%
        \let\incby\currRightMarg
        \def\web@arg{#3}\ifx\web@arg\@empty
        \setlength{\@tempdima}{\currRightMarg}\else
        \setlength{\@tempdima}{#3}\fi
        \xdef\newRightMarg{\the\@tempdima}%
        \let\incby\currTopMarg
        \def\web@arg{#4}\ifx\web@arg\@empty
        \setlength{\@tempdima}{\currTopMarg}\else
        \setlength{\@tempdima}{#4}\fi
        \xdef\newTopMarg{\the\@tempdima}%
        \let\incby\currBottomMarg
        \def\web@arg{#4}\ifx\web@arg\@empty
        \setlength{\@tempdima}{\currBottomMarg}\else
        \setlength{\@tempdima}{#5}\fi
        \xdef\newBottomMarg{\the\@tempdima}%
    \endgroup
    \margins@web@save[\newPanelWidth]{\newLeftMarg}{\newRightMarg}
        {\newTopMarg}{\newBottomMarg}
}
\@onlypreamble\resetscreensize
%    \end{macrocode}
% \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}
\let\web@save@title\title
%\def\title{\@ifnextchar[{\@title}{\@title[]}}
\def\title{\@ifnextchar[{\@web@title}{\@web@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\@web@title[#1]#2{\gdef\webtitle{#2}\hypersetup{pdftitle={#2}}%
    \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebtitle{#2}\else
    \gdef\shortwebtitle{#1}\fi\web@save@title{#2}}
%    \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}
\let\web@saved@author\author
%\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}}
\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}%
    \web@saved@author{#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{%
    \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebsubject{#2}\else
    \gdef\shortwebsubject{#1}\fi\gdef\websubject{#2}%
    \hypersetup{pdfsubject={#2}}}
%    \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}
% \DescribeMacro{\pdfLang} Primary language for this PDF document
%    \begin{macrocode}
\def\pdfLang#1{\def\web@pdfLang{#1}\hypersetup{pdflang={#1}}}
\let\web@pdfLang\@empty
%    \end{macrocode}
%    \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\
        \noexpand\web@version@value\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}
% \paragraph*{Language dependent definitions.} Definitions and defaults.\par\medskip\noindent
% \textbf{Table of Contents related strings.} \DescribeMacro{\tocName}\cs{tocName} is the name of the table of contents. \DescribeMacro{\tocNameCont}
% \cs{tocNameCont} is a continuation annotation for the table of contents.
%    \begin{macrocode}
\newcommand{\tocName}[1]{\def\web@toc{#1}}
\tocName{Table of Contents}
\newcommand{\tocNameCont}[1]{\def\web@continued{#1}}
\tocNameCont{cont.}
%    \end{macrocode}
% \textbf{Directory related strings.} \DescribeMacro{\dirContentLink}
% \cs{dirContentLink} is the line in the directory that gives the link to
% that start of the article. \DescribeMacro{\directoryName}\cs{directoryName}
% is the text string used to label the directory.
%    \begin{macrocode}
\newcommand{\dirContentLink}[1]{\def\web@article{#1}}
\dirContentLink{Begin \hyperlink{\web@Start.1}{Article}}
\newcommand{\directoryName}[1]{\def\web@directory{#1}}
\directoryName{Directory}
%    \end{macrocode}
%\textbf{Page trailer strings.}
% \DescribeMacro{\revisionLabel} \cs{revisionLabel} is the revision label,
% \DescribeMacro{\norevisionLabel} \cs{norevisionLabel} cancels out the label and the
% hard space that follows.
%    \begin{macrocode}
\newcommand{\revisionLabel}[1]{\def\web@revision{#1}}
\revisionLabel{Last Revision Date:}
\def\norevisionLabel{\let\web@revision\@gobble}
%    \end{macrocode}
% Copyright labels of various types. \DescribeMacro{\copyrightLabel}
% \DescribeMacro{\nocopyright}\DescribeMacro{\nocopyrightNotice}.
% \cs{copyrightLabel} sets the text for the copyright, the default is
% `Copyright'; the others cancel out the copyright part.
%    \begin{macrocode}
\newcommand{\copyrightLabel}[1]{\def\web@copyright{#1}}
\copyrightLabel{Copyright}
\def\nocopyright{\let\web@copyright\@gobble}
\def\nocopyrightNotice{\let\web@copyright\@gobblethree}
%    \end{macrocode}
%    \begin{macrocode}
\def\web@section{Section}
%    \end{macrocode}
% Labels used by the Navibar.
%    \begin{macrocode}
\def\web@back{Back}
\def\web@doc{Doc}   % restricted to three characters
%    \end{macrocode}
% We set the default definitions for these document information
% commands.
%    \begin{macrocode}
\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).
%    \begin{macrocode}
\let\IF@AorBswitch\ifeqforpaper
\def\prtscr{\@ifstar{\prtscrV}{\prtscrA}}
\def\prtscrA#1#2{\ifeqforpaper#1\else#2\fi}
%    \end{macrocode}
%\DescribeMacro{\prtscrV} is the version of \cs{prtscr} that allows
% verbatim text in its arguments.
%\changes{v4.4b}{2013/01/01}{Added \string\texttt{*} version of \string\cs{prtscr}. This version
% can take verbatim text as an argument.}
%\changes{v6.0n}{2016/11/03}{Generalized support commands for \string\cs{prtscr}.}
%    \begin{macrocode}
\newtoks\webtoksi
\newbox\webtempboxi
\newbox\webtempboxii
\providecommand\SHOWTEMPBOXi{\unhbox\webtempboxi}
\providecommand\TRUEACTIONi{\aftergroup\SETTEMPBOXii}
\providecommand\TRUEACTIONia{\aftergroup\SHOWTEMPBOXi}
\providecommand\FALSEACTIONii{\aftergroup\SETTEMPBOXi}
\providecommand\FALSEACTIONiia{\aftergroup\SHOWTEMPBOXi}
\providecommand\SETTEMPBOXi{\IF@AorBswitch\else
    \afterassignment\TRUEACTIONia\fi
    \setbox\webtempboxi=\hbox}
\providecommand\SETTEMPBOXii{\IF@AorBswitch
    \afterassignment\FALSEACTIONiia\fi
    \setbox\webtempboxii=\hbox}
\def\prtscrV{\let\IF@AorBswitch\ifeqforpaper
        \ifeqforpaper
        \def\web@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else
        \def\web@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi
    \web@next}
%    \end{macrocode}
%    \end{macro}
%\subsubsection{\texorpdfstring{\protect\cs{optionalPageMatter}}{\CMD{optionalPageMatter}}}
%    \begin{macro}{\optionalPageMatter}
%    \begin{macro}{\optionalpagematter}
%    \begin{macro}{\aboveOPMvspace}
% 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}.
%\changes{v4.4}{2012/08/26}{Added optional parameter to \string\cs{optionalPageMatter},
% added a skip command}
%    \begin{macrocode}
\newcommand{\web@aboveOptPgMatDef}{\minimumskip\vspace{\stretch{1}}}
\newcommand{\aboveOPMvspace}{\web@aboveOptPgMatDef}
\newcommand{\optionalPageMatter}[2][\web@aboveOptPgMatDef]{%
    \def\aboveOPMvspace{#1}\def\optionalpagematter{#2}%
}
\def\optionalpagematter{}
%    \end{macrocode}
%    \end{macro}
%    \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{\texorpdfstring{\protect\cs{maketitle}}{\CMD{maketitle}} and the Directory}
% 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}
\newcommand{\copyrightSymbol}[1]{\def\web@copyright@symbol{#1}}
\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}
%    \begin{macro}{\removeDirTOC}
%    \begin{macro}{\removeDirArticle}
%    \begin{macro}{\formatWordDirectory}
%    \begin{macro}{\formatDirectoryItems}
%    \begin{macro}{\addtoDirList}
%    \begin{macro}{\vspaceAfterDirName}
%    \begin{macro}{\priorDirList}
%    \begin{macro}{\afterDirList}
%    \begin{macro}{\priorDirMatter}
%    \begin{macro}{\afterDirMatter}
% The code that places the directory on the title page.
%    \begin{macrocode}
\newcommand{\webdirectory}{%
    \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
    \web@priorDirMatter
    \begin{flushleft}{\web@formatWordDirectory\web@directory}%
    \web@priorDirList
    \vspace{\vspaceAfterDirName}%
    \begin{itemize}\setlength{\itemsep}{-3pt}\web@formatDirectoryItems
        \ifx\web@removeDirTOC\web@YES\else\item\relax\dirTOCItem\fi
        \ifx\web@removeDirArticle\web@YES\else
            \item\relax\dirArticleItem\fi
        \web@addtoDirList
    \end{itemize}
    \web@afterDirList
    \end{flushleft}
    \web@afterDirMatter
}
%    \end{macrocode}
% (02/10/2009) We include some additional commands to give control over the
% directory listing, without having to redefine \cs{webdirectory}
%    \begin{macrocode}
\newcommand{\directoryhook}[1]{\def\web@directory@hook##1{#1}}
\let\web@directory@hook\@empty
\newcommand{\vspaceAfterDirName}{-3pt}
\newcommand{\dirTOCItem}{\hyperlink{webtoc}{\web@toc}}
\newcommand{\dirArticleItem}{\web@article}
\newcommand{\removeDirTOC}{\let\web@removeDirTOC\web@YES}
\let\web@removeDirTOC\web@NO
\newcommand{\removeDirArticle}{\let\web@removeDirArticle\web@YES}
\let\web@removeDirArticle\web@NO
\let\web@addtoDirList\@empty
\newcommand{\formatWordDirectory}[1]{\def\web@formatWordDirectory{#1}}
\formatWordDirectory{\bfseries\large}
\newcommand{\formatDirectoryItems}[1]{\def\web@formatDirectoryItems{#1}}
\formatDirectoryItems{\bfseries}
\newcommand{\addtoDirList}[1]{\g@addto@macro\web@addtoDirList{\item #1}}
\newcommand{\priorDirList}[1]{\def\web@priorDirList{#1}}
\let\web@priorDirList\@empty
\newcommand{\afterDirList}[1]{\def\web@afterDirList{#1}}
\let\web@afterDirList\@empty
\newcommand{\priorDirMatter}[1]{\def\web@priorDirMatter{#1}}
\let\web@priorDirMatter\@empty
\newcommand{\afterDirMatter}[1]{\def\web@afterDirMatter{#1}}
\let\web@afterDirMatter\@empty
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \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{\hproportionwebuniversity\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{\allowHeadingsTitlePage}{\let\web@titlepagestyle\@gobble}
\def\web@titlepagestyle#1{#1}
\newcommand{\coverpagemargin}{1in}
\newcommand{\maketitlepreamble}
{%
    \web@titlepagestyle{\thispagestyle{empty}}%
    \ifeqforpaper\if@centertitlepage
        \begingroup
%    \end{macrocode}
% We center the content on the title page, much better than before.
% \changes{v4.4}{2012/08/26}{No code to center the cover page content.}
%    \begin{macrocode}
        \if@centertitlepagefull
            \@tempdima=\coverpagemargin
        \else
            \@tempdima\paperwidth
            \advance\@tempdima-\textwidth
            \@tempdima=.5\@tempdima
            \edef\coverpagemargin{\the\@tempdima}%
        \fi
        \@tempdimb\paperwidth
        \addtolength{\@tempdimb}{-2\@tempdima}%
        \edef\fullscreenwidth{\the\@tempdimb}%
        \linewidth\fullscreenwidth
        \textwidth\fullscreenwidth
        \hfuzz\linewidth
        \setlength{\oddsidemargin}{\coverpagemargin-1in}%
        \setlength{\evensidemargin}{\oddsidemargin}%
        \marginparsep=0pt
        \marginparwidth=0pt
        \parindent0pt
    \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}
\newcommand{\web@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}
    \ifx\optionalpagematter\@empty\par\else
    \begingroup\par
    \aboveOPMvspace
    \noindent\parbox{\linewidth}{\optionalpagematter}%
    \par\endgroup\fi
    \vspace{\stretch{1}}
%    \end{macrocode}
% Insert the directory, as desired.
%    \begin{macrocode}
    \ifx\web@directory@option\web@YES\web@directory@hook\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
}
\let\web@save@maketitle\maketitle
\let\maketitle\web@maketitle
%    \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}
% \subsection{Section and TOC depth}
%    \begin{macrocode}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
%    \end{macrocode}
% Try to squeeze a little more in per page.
%    \begin{macrocode}
\ifeqforpaper\else
    \clubpenalty=50
    \widowpenalty=50
\fi
%    \end{macrocode}
% \subsection{Tight Settings}
%
% We squeeze display vertical spaces a little to fit more content on the screen page.
% \changes{v6.0m}{2016/10/22}{Extend the tight option to 11pt and 12pt}
% (2016/10/22) Extended the \texttt{tight} option to \texttt{11pt} and \texttt{12pt}.
% \par\medskip\noindent
% Begin by saving all {\LaTeX} commands that are to be changed, so we can restore them later.
%    \begin{macrocode}
\let\web@save@listi\@listi
\let\web@save@listii\@listii
\let\web@save@listiii\@listiii
\let\web@save@normalsize\normalsize
\let\web@save@partopsep\partopsep
\let\web@normalsize\normalsize
%    \end{macrocode}
%    \paragraph*{Tight settings for \texttt{10pt}}
%    \begin{macrocode}
\def\w@ppp#1#2#3{#1\p@ \@plus#2\p@ \@minus#3\p@}
\def\w@zpp#1#2{\z@ \@plus#1\p@ \@minus#2\p@}
\def\tightsettings@z{%
    \setlength\partopsep{\w@ppp{2}{}{}} % unchanged
    \def\web@listi{\leftmargin\leftmargini
    \parsep \w@ppp{2}{2}{}% 4+2-1
    \topsep \w@ppp{2}{1}{}% 8+2-4
    \itemsep\w@ppp{2}{1}{}}% 4+2-1
    \let\@listi\web@listi
    \let\@listI\@listi
    \@listi
    \def\web@listii {\leftmargin\leftmarginii
       \labelwidth\leftmarginii
       \advance\labelwidth-\labelsep
       \topsep    \w@zpp{}{}% 4+2-1
       \parsep    \w@zpp{}{}% 2+1-1
       \itemsep   \parsep}% unchanged
    \def\web@listiii{\leftmargin\leftmarginiii
       \labelwidth\leftmarginiii
       \advance\labelwidth-\labelsep
       \topsep    \w@zpp{}{}% 2+1-1
%    \end{macrocode}
%    Uncommented text now commented out.
%    \changes{v6.0o}{2017/01/20}{Uncommented text, now commented out}
%    \begin{macrocode}
       \parsep    \z@         % unchanged
       \partopsep \w@ppp{}{}{}% unchanged
       \itemsep   \topsep}% unchanged
    \let\@listii\web@listii
    \let\@listiii\web@listiii
    \renewcommand\web@normalsize{%
       \@setfontsize\normalsize\@xpt\@xiipt
       \abovedisplayskip \w@ppp{5}{3}{}% 10+2-5
       \abovedisplayshortskip \w@zpp{3}{0}% unchanged
       \belowdisplayshortskip \w@ppp{3}{2}{2}% 6+3-3
       \belowdisplayskip \abovedisplayskip
       \let\@listi\@listI}%
    \let\normalsize\web@normalsize
    \normalsize
}
%    \end{macrocode}
%    \paragraph*{Tight settings for \texttt{11pt}}
%    \begin{macrocode}
\def\tightsettings@i{%
    \setlength\partopsep{\w@ppp{2}{}{}}% 3+1-1
    \def\web@listi{\leftmargin\leftmargini
    \parsep \w@ppp{2.5}{2}{}% 4.5+2-1
    \topsep \w@ppp{4.5}{1.5}{2.5}% 9+3-5
    \itemsep \w@ppp{2.5}{}{}}% 4.5+2-1
    \let\@listi\web@listi
    \let\@listI\@listi
    \@listi
    \def\web@listii {\leftmargin\leftmarginii
       \labelwidth\leftmarginii
       \advance\labelwidth-\labelsep
       \topsep    \w@ppp{}{}{}% 4.5+2-1
       \parsep    \w@ppp{}{}{}% 2+1-1
       \itemsep   \parsep}% unchanged
    \def\web@listiii{\leftmargin\leftmarginiii
       \labelwidth\leftmarginiii
       \advance\labelwidth-\labelsep
       \topsep    \w@ppp{}{}{}% 2+1-1
       \parsep    \z@         % unchanged
       \partopsep \w@ppp{}{}{}% unchanged
       \itemsep   \topsep}% unchanged
    \let\@listii\web@listii
    \let\@listiii\web@listiii
    \renewcommand\web@normalsize{%
       \@setfontsize\normalsize\@xipt{13.6}%
       \abovedisplayskip \w@ppp{5.5}{3}{3}% 11+3-6
       \abovedisplayshortskip \w@zpp{}{0}% unchanged
       \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
       \belowdisplayskip \abovedisplayskip
       \let\@listi\@listI}%
    \let\normalsize\web@normalsize
    \normalsize
}
%    \end{macrocode}
%    \paragraph*{Tight settings for \texttt{12pt}}
%    \begin{macrocode}
\def\tightsettings@ii{%
    \setlength\partopsep{\w@ppp{3}{2}{2}}% unchanged
    \def\web@listi{\leftmargin\leftmargini
    \parsep \w@ppp{3}{2}{}% 5+2.5-1
    \topsep \w@ppp{5}{2}{3}% 10+4-6
    \itemsep\w@ppp{2.5}{}{}}% 5+2.5-1
    \let\@listi\web@listi
    \let\@listI\@listi
    \@listi
    \def\web@listii {\leftmargin\leftmarginii
       \labelwidth\leftmarginii
       \advance\labelwidth-\labelsep
       \topsep    \w@ppp{2.5}{}{}% 5+2.5-1
       \parsep    \w@ppp{2}{}{}% 2.5+1-1
       \itemsep   \parsep}% unchanged
    \def\web@listiii{\leftmargin\leftmarginiii
       \labelwidth\leftmarginiii
       \advance\labelwidth-\labelsep
       \topsep    \w@ppp{1.5}{}{}% 2.5+1-1
       \parsep    \z@            % unchanged
       \partopsep \w@ppp{}{}{}% unchanged
       \itemsep   \topsep}% unchanged
    \let\@listii\web@listii
    \let\@listiii\web@listiii
    \renewcommand\web@normalsize{%
       \@setfontsize\normalsize\@xiipt{14.5}%
       \abovedisplayskip \w@ppp{6}{1.5}{3.5}% 12+3-7
       \abovedisplayshortskip \w@zpp{3}{0}% unchanged
       \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
       \belowdisplayskip \abovedisplayskip
       \let\@listi\@listI}%
    \let\normalsize\web@normalsize
    \normalsize
}
%    \end{macrocode}
%    Select \DescribeMacro{\tightsettings}\cs{tightsettings} according to point size
%    \begin{macrocode}
\def\tightsettings{\@ifstar{\ifeqforpaper\else\tightsettings@cont\fi}
    {\tightsettings@cont}}
\def\tightsettings@cont{\let\web@tight\web@YES
    \ifcase\@ptsize
        \tightsettings@z\or
        \tightsettings@i\or
        \tightsettings@ii
   \fi
}
%    \end{macrocode}
%    Restore to normal document class settings using
%    \DescribeMacro{\restorenormalsettings}\cs{restorenormalsettings}.
%    \begin{macrocode}
\def\restorenormalsettings{\let\web@tight\web@NO
    \let\@listi\web@save@listi
    \let\@listii\web@save@listii
    \let\@listiii\web@save@listiii
    \let\normalsize\web@save@normalsize
    \let\partopsep\web@save@partopsep
    \let\@listI\@listi
    \@listi
    \normalsize
}
%    \end{macrocode}
% \subsection{Navgation Aids}
% \subsubsection{Navigation Bar}
% Navigation Bar, appears in response to the option \texttt{navibar}.
%    \begin{macro}{\navibarTextColor}
% Color for text in the navigation bar
%    \begin{macrocode}
\def\navibarTextColor#1{\def\@menucolor{#1}}
\def\@menucolor{webblue}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\navibarBgColor}
% Color for background in the navigation 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\web@next\@newNaviIconMenu
    \else\ifx#1j\let\web@next\@newNaviIconJS
    \else\ifx#1l\let\web@next\@newNaviIconLink
    \else\ifx#1\@empty\let\web@next\@newNaviIconLink
    \else\let\web@next\relax
    \PackageWarning{web}{\string\newNaviIcon: unknown first parameter}
    \fi\fi\fi\fi\web@next
}
%    \end{macrocode}
%    \begin{macro}{\@newNaviIconMenu}
% This command uses the hyperref command \cs{Acrobatmenu} to create navigation 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 navigation 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\color{\@menucolor}#5}}}%
        }}%
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\@newNaviIconJS}
% Another navigation 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 navigation 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 <</S/JavaScript/JS (#6) >>
            /Subtype/Link
            /ANN pdfmark}%
        }}%
    \or
        \def#2{{\setlength{\fboxsep}{0pt}%
            \leavevmode\pdfstartlink
                attr {/Border [0 0 0 ] /H/#1}%
                user{ /Subtype /Link
                /A << /S/JavaScript/JS (#6) >>}%
                \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
                <<
                    /Border [0 0 0 ] /H/#1\space
                    /Subtype /Link
                    /A << /S/JavaScript/JS (#6) >>
                >>}\web@colorbox@w@transparency{\@menuBgColor}%
                    {\parbox[c][#4][c]{#3}%
                    {\normalsize\centering\color{\@menucolor}#5}}%
            \@pdfm@mark{eann}%
        }}%
    \fi
}
%    \end{macrocode}
%    \end{macro}
% Another navigation 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 navigation 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\ }
\def\web@TocText{Toc}
\newNaviIcon[l]{\web@TOC}{\web@nb@width}{\web@nb@height}
    {\footnotesize\web@TocText}{\hyperlink{webtoc}}
%    \end{macrocode}
% Some icon definitions that are used in the navigation bar that appears at the bottom of the page.
%    \begin{macrocode}
\newcommand\navibariconWidth[1]{\def\web@nb@width{#1}}
\newcommand\navibariconHeight[1]{\def\web@nb@height{#1}}
\navibariconWidth{34pt}\navibariconHeight{10pt}
\@newNaviIconMenu{\web@FirstPage}{\web@nb@width}{\web@nb@height}
    {\web@FirstPageText}{FirstPage}
\def\web@FirstPageText{$\blacktriangleleft\blacktriangleleft$}
\@newNaviIconMenu{\web@LastPage}{\web@nb@width}{\web@nb@height}
    {\web@LastPageText}{LastPage}
\def\web@LastPageText{$\blacktriangleright\blacktriangleright$}
\@newNaviIconMenu{\web@PrevPage}{\web@nb@width}{\web@nb@height}
    {\web@PrevPageText}{PrevPage}
\def\web@PrevPageText{$\blacktriangleleft$}
\@newNaviIconMenu{\web@NextPage}{\web@nb@width}{\web@nb@height}
    {\web@NextPageText}{NextPage}
\def\web@NextPageText{$\blacktriangleright$}
\@newNaviIconMenu{\web@GoBack}{\web@nb@width}{\web@nb@height}
    {\footnotesize\web@back}{GoBack}
\@newNaviIconMenu{\web@GoBackDoc}{\web@nb@width}{\web@nb@height}
    {$\blacktriangleleft$\ \footnotesize\web@doc}{GoBackDoc}
\@newNaviIconMenu{\web@GoForwardDoc}{\web@nb@width}{\web@nb@height}
    {\footnotesize\web@doc\ \normalsize$\blacktriangleright$}
    {GoForwardDoc}
\@newNaviIconMenu{\web@FS}{\web@nb@width}{\web@nb@height}
    {\footnotesize\web@FSText}{FullScreen}
\def\web@FSText{FS}
\@newNaviIconMenu{\web@GoToPage}{\web@nb@width}{\web@nb@height}
    {\footnotesize\web@GoToPageText}{GoToPage}
\def\web@GoToPageText{Page...}
%    \end{macrocode}
%    \begin{macro}{\web@navigationbar}
% The navigation 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}
\newcommand{\panelgroupWidth}[1]{%
    \global\let\chkpanelgroup\web@chkpanelgroup
    \def\web@pg@width{#1}}
\newcommand{\panelgroupHeight}[1]{%
    \global\let\chkpanelgroup\web@chkpanelgroup
    \def\web@pg@height{#1}}
\newcommand{\panelgroupSep}[1]{%
    \global\let\chkpanelgroup\web@chkpanelgroup
    \def\web@pg@sep{#1}}
\@newNaviIconMenu{\panel@FirstPage}{\web@pg@width}{\web@pg@height}
    {\web@FirstPageText}{FirstPage}
\@newNaviIconMenu{\panel@LastPage}{\web@pg@width}{\web@pg@height}
    {\web@LastPageText}{LastPage}
\@newNaviIconMenu{\panel@PrevPage}{\web@pg@width}{\web@pg@height}
    {\web@PrevPageText}{PrevPage}
\@newNaviIconMenu{\panel@NextPage}{\web@pg@width}{\web@pg@height}
    {\web@NextPageText}{NextPage}
\@newNaviIconMenu{\panel@GoBack}{\web@pg@width}{\web@pg@height}
    {\footnotesize\web@back}{GoBack}
\@newNaviIconMenu{\panel@GoBackDoc}{\web@pg@width}{\web@pg@height}
    {$\blacktriangleleft$\,\footnotesize\web@doc}{GoBackDoc}
\@newNaviIconMenu{\panel@GoForwardDoc}{\web@pg@width}{\web@pg@height}
    {\footnotesize\web@doc\,\normalsize$\blacktriangleright$}
    {GoForwardDoc}
\@newNaviIconMenu{\panel@Close}{\web@pg@width}{\web@pg@height}
    {\footnotesize Close}{Close}
\def\web@CloseText{Close}
\@newNaviIconMenu{\panel@FS}{\web@pg@width}{\web@pg@height}
    {\footnotesize\web@FSText}{FullScreen}
\@newNaviIconMenu{\panel@GoToPage}{\web@pg@width}{\web@pg@height}
    {\footnotesize\web@GoToPageText}{GoToPage}
%    \end{macrocode}
% A check to see if the panel group is too wide.
%    \begin{macrocode}
\newcommand{\web@chkpanelgroup}{\bgroup
    \setlength{\@tempdima}{\web@pg@width+\web@pg@width+\web@pg@sep}%
    \ifdim\@tempdima>\@panelwidth\PackageError{web}{Width of
    \string\panelNaviGroup\space is wider than the panel}{}\else
    \xdef\panelNavigroupWidth{\the\@tempdima}\fi
    \egroup\global\let\chkpanelgroup\@empty
}
\panelgroupWidth{28pt}\panelgroupHeight{15pt}
\panelgroupSep{2pt}
\newcommand{\panelrowsep}{1pt}
%    \end{macrocode}
% Standard navigation group for a panel.
%    \begin{macrocode}
\newcommand\panelNaviGroup{\chkpanelgroup
    \parbox[c]{\panelNavigroupWidth}{%
        \offinterlineskip
        \panelIconGroup
    }%
}
\newcommand{\panelIconGroup}{%
    \panel@FirstPage\hfill\panel@LastPage\\[\panelrowsep]
    \panel@PrevPage\hfill\panel@NextPage\\[\panelrowsep]
    \panel@GoBack\hfill\panel@Close
}
%    \end{macrocode}
%    \begin{macro}{\insNaviBar}
% Now, if the navibar option is not on, we can insert arbitrarily defined navigation objects
% through the use of \cs{insNaviBar}. There are 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 Navigation Things}
% Navigation Aids
%    \begin{macro}{\insertnaviiconhere}
% Inserts a direction icon on the page on which the command appears.
%    \begin{macrocode}
\def\web@ifOnThisPage#1#2{\ifnum\c@page=\@thispage\relax
    #1\else#2\fi}
\newcommand{\insertnaviiconhere}[1]
{%
    \xdef\@thispage{\the\c@page}%
    \def\web@insToRight{%
    \ifeqforpaper\makebox[0pt][l]{\ifdim\marginparsep>0pt\relax
    \hspace{\marginparsep}\else\ \fi#1}\else
        \makebox[0pt][l]{%
        \ifnum\@panelconfig=2\relax
            \hspace{\@panelsep}\else
            \hspace{\@Rightmargin}\fi
        \makebox[0pt][r]{#1}}\fi
    }\expandafter\rheader\expandafter
        {\expandafter\web@ifOnThisPage
        \expandafter{\web@rightheader\web@insToRight}%
        {\web@defaultrightheader}}%
}
%    \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{\def\web@insToLeft{%
    \ifeqforpaper\makebox[0pt][r]{#1\ifdim\marginparsep>0pt\relax
        \hspace{\marginparsep}\else\ \fi}\else
    \makebox[0pt][r]{\makebox[0pt][l]{#1}%
        \ifnum\@panelconfig=1\relax
            \hspace{\@panelsep}\else
            \hspace{\@Leftmargin}\fi}\fi
    }\expandafter\lheader\expandafter
        {\expandafter\web@insToLeft\web@lhead}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\removehereaftericon}
% Removes the running icon from the header.
%    \begin{macrocode}
\def\removehereaftericon{\lheader{\aeb@setmarks}}
\let\defaultpageheader\removehereaftericon
%    \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]
{%
    \normalsize\ifeqforpaper
    \setlength{\fboxsep}{6pt}\else
    \setlength{\fboxsep}{4pt}\fi
    \raisebox{\depth-\fboxsep}[0pt][0pt]{%
    #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
    {\textcolor{\web@directionIconTextColor}{$\bigl\Uparrow$}}}}%
}
\newcommand\ArrowDown[1]
{%
    \normalsize\ifeqforpaper
    \setlength{\fboxsep}{6pt}\else
    \setlength{\fboxsep}{4pt}\fi
    \raisebox{\depth-\fboxsep}[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{\ifnum\value{page}=1\relax\else\thepage\fi}
\let\web@headerhook\@empty
\let\web@headerprivate\@empty
\let\web@footerhook\@empty
\let\web@footerprivate\@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}}
%    \end{macrocode}
% Set default headers
%    \begin{macrocode}
\lfooter{}\rfooter{}
\newcommand{\placeScreenNavibar}{%
    \ifweb@navibar\web@navigationbar\else
    \ins@NaviBar\global\let\ins@NaviBar\@empty\fi}
\cfooter{\placeScreenNavibar}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\clearHeaders}
%    \begin{macro}{\restoreHeaders}
%    \begin{macro}{\clearFooters}
%    \begin{macro}{\restoreFooters}
% 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}
\newcommand{\clearFooters}{%
    \let\web@lfoot@save\web@lfoot
    \let\web@cfoot@save\web@cfoot
    \let\web@rfoot@save\web@lfoot
    \let\web@lfoot\@empty\let\web@cfoot\@empty
    \let\web@rfoot\@empty}
\newcommand{\restoreFooters}{%
    \let\web@lfoot\web@lfoot@save
    \let\web@cfoot\web@cfoot@save
    \let\web@rfoot\web@rfoot@save}
%    \end{macrocode}
% You can use this command to insert additional formatting into the running header.
% For example, \verb!\headerformat{\bfseries\color{red}}!.
%    \begin{macro}{\headerformat}
%    \begin{macro}{\footerformat}
%    \begin{macrocode}
\def\headerformat#1{\def\web@headerhook{#1}}
\headerformat{}
\def\footerformat#1{\def\web@footerhook{#1}}
\footerformat{}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\ps@webheadings}
% Standard headings for Web
%    \begin{macrocode}
\let\webheadwrapper\@empty
\let\webfootwrapper\@empty
\newcommand{\headWrapper}[1]{\def\webheadwrapper##1{#1}}
\newcommand{\footWrapper}[1]{\def\webfootwrapper##1{#1}}
\newcommand{\ps@webheadings}
{%
    \renewcommand{\@oddhead}{\webheadwrapper{%
        \normalfont\ifeqforpaper\else\footnotesize\fi
        \web@headerprivate\web@headerhook\web@lhead\hfil\web@chead\hfil
        \web@rightheader}}
    \renewcommand{\@evenhead}{\@oddhead}
    \renewcommand{\@oddfoot}{\webfootwrapper{%
        \normalfont\ifeqforpaper\else\footnotesize\fi
        \web@footerprivate\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 running
% header
%    \begin{macrocode}
\renewcommand{\sectionmark}[1]{%
    \markboth{}{\web@section\ \thesection: #1}}
%    \end{macrocode}
%    \begin{macro}{\noHeadersOnSectionPage}
%    \begin{macro}{\headersOnSectionPage}
%\changes{v4.1b}{2008/08/21}
%{
%   Added additional control over the \string\cs{lheader}, with
%   \string\cs{noHeadersOnSectionPage} (default) and
%   \string\cs{headersOnSectionPage}
%}
% 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.
%
% The two commands control this behavior, the default is to not
% show the section heading (\cs{lheader}) on the page where the
% section begins. Use the command \cs{headersOnSectionPage} to place headers
% on the same page as the beginning of a section.
%    \begin{macrocode}
\newcommand{\noHeadersOnSectionPage}{%
    \gdef\web@headerpolicy{%
        \expandafter\aeb@gettopmark\topmark{}{}%
        \expandafter\aeb@getbotmark\botmark{}{}%
        \ifx\aeb@topmark\aeb@botmark\rightmark\fi
    }%
}
%    \end{macrocode}
% The default is to show no headers on a page with a section in it.
%    \begin{macrocode}
\noHeadersOnSectionPage
\newcommand{\headersOnSectionPage}{%
    \gdef\web@headerpolicy{\rightmark}%
}
\def\aeb@gettopmark#1#2{\def\aeb@topmark{#2}}
\def\aeb@getbotmark#1#2{\def\aeb@botmark{#2}}
\def\aeb@setmarks{\web@headerpolicy}
\lheader{\aeb@setmarks}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macrocode}
\AtEndOfPackage{\pagestyle{webheadings}}
%    \end{macrocode}
% \subsection{Sectioning}
% We redefine the sectioning commands by default; if \texttt{uselatexsection} option
% is taken, we bypass these definitions.
% \changes{v4.4a}{2012/08/31}{Introduce \string\cs{ifweb@sectioning} switch}
%    \begin{macrocode}
\newcommand{\sectionColor}[1]{\def\web@sectionsColorOld{#1}
    \def\aeb@sectioncolor{#1}}
\sectionColor{blue}
\def\web@inputsectiondefs{\InputIfFileExists{websec.def}{}
    {\PackageError{web}{Cannot find the file websec.def}{}}
}
\ifweb@sectioning\expandafter\web@inputsectiondefs\fi
%</package>
%<*websectioning>
\renewcommand*\thesection{\arabic{section}}
\renewcommand*\thesubsection{\thesection.\arabic{subsection}}
\renewcommand*{\thesubsubsection}{\textbullet}
\renewcommand{\section}{\renewcommand{\@seccntformat}[1]{%
   \@nameuse{the##1}\web@finalDot\enspace}%
   \@startsection{section}{1}{\z@}%
   {-3ex\@plus -1ex \@minus-.2ex}%
   {1ex\@plus .2ex}% 6pt
   {\noindent\normalfont\normalsize\bfseries
    \color{\web@sectionsColorOld}}}%
\renewcommand{\subsection}{\renewcommand{\@seccntformat}[1]{%
   \@nameuse{the##1}\web@finalDot\enspace}%
   \@startsection{subsection}{2}{\z@}%
   {-2.5ex\@plus -1ex \@minus -.2ex}%
   {1ex\@plus .2ex}%
   {\noindent\normalfont\normalsize\bfseries
    \color{\web@sectionsColorOld}}}
\renewcommand{\subsubsection}{%
   \renewcommand{\@seccntformat}[1]{\color{\web@sectionsColorOld}\large
   $\bullet$\enspace}%
   \@startsection{subsubsection}{3}{\z@}%
     {-2ex\@plus -1ex \@minus -.2ex}%
     {.5ex\@plus .2ex}%
     {\noindent\normalfont\normalsize\bfseries}}
%    \end{macrocode}
% We define our own \cs{part} command, and reserve it as \cs{@webpart}.
% Commands for handing the \cs{part} format. The formatting of
% the part text can be accessed through \cs{web@makeparthead}.
%    \begin{macrocode}
\def\tocPartTitle#1{\def\web@tocPartTitle##1{#1}}
\tocPartTitle{\thepart\hspace{1em}#1}
\newcommand\@webpart{\secdef\web@@part\web@@spart}
\def\web@@part[#1]#2{%
    \newpage
  \def\@currentlabelname{#1}%
  \ifnum\Hy@secnum@part>\c@secnumdepth
    \phantomsection
  \fi
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\web@tocPartTitle{#1}}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    {\web@makeparthead{#2}}%
    \nobreak
    \vskip 1ex
    \@afterheading
}
\def\web@@spart#1{%
    \Hy@GlobalStepCount\Hy@linkcounter
    \xdef\@currentHref{part*.\the\Hy@linkcounter}%
    \Hy@raisedlink{%
        \hyper@anchorstart{\@currentHref}\hyper@anchorend
    }{\web@makesparthead{#1}}%
    \nobreak
    \vskip 1ex
    \@afterheading
}
\let\web@save@part\part
\let\part\@webpart
%    \end{macrocode}
%    \begin{macro}{\web@makeparthead}
%    \begin{macro}{\web@makesparthead}
%    \begin{macro}{\formatPartTitle}
%    \begin{macro}{\noPartNumbers}
% These commands can be redefined to format who the part text
% looks in the document.
%    \begin{macrocode}
\newcommand{\formatPartTitle}[1]{%
    \def\web@formatPartTitle##1{#1}}
\def\web@defaultFormatPartTitle#1{%
    \large\bfseries
     \ifnum \c@secnumdepth >\m@ne
       \partname~\thepart:\space
    \fi#1}
\let\web@formatPartTitle\web@defaultFormatPartTitle
\newcommand{\restorePartTitleFormat}{%
    \let\web@formatPartTitle\web@defaultFormatPartTitle}
\def\noPartNumbers{\formatPartTitle{\large\bfseries##1}%
    \tocPartTitle{##1}}
\def\web@makeparthead#1{%
    \parindent\z@\raggedright
    \interlinepenalty \@M
    \normalfont
    \web@formatPartTitle{#1}%
    \markboth{}{}\par
}
\def\web@makesparthead#1{%
    \parindent\z@\raggedright
    \interlinepenalty \@M
    \normalfont
    \large\bfseries #1\par
}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
% Here's the same thing for \cs{chapter}.
%    \begin{macrocode}
\@ifundefined{chapter}{}{%
    \newcommand\@webchapter{%
        \global\@topnum\z@
        \@afterindentfalse
        \secdef\web@@chapter\web@@schapter
    }
    \let\web@save@chapter\chapter
    \let\chapter\@webchapter
    \def\web@@chapter[#1]#2{%
        \def\@currentlabelname{#1}%
        \def\Hy@next{%
          \Hy@GlobalStepCount\Hy@linkcounter
          \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
          \Hy@raisedlink{%
            \hyper@anchorstart{\@currentHref}\hyper@anchorend
          }%
        }%
        \ifnum\c@secnumdepth>\m@ne
          \@ifundefined{if@mainmatter}%
          \iftrue{\@nameuse{if@mainmatter}}%
            \let\Hy@next\relax
          \fi
        \fi
        \Hy@next
        \ifnum \c@secnumdepth >\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@@schapter#1{%
        \if@twocolumn
        \@topnewpage[\@makeschapterhead{#1}]%
        \else
        \web@makeschapterhead{#1}%
        \@afterheading
        \fi
    }
%    \end{macrocode}
%    \begin{macro}{\web@makechapterhead}
%    \begin{macro}{\web@makeschapterhead}
% These commands can be redefined to format who the part text
% looks in the document.
%    \begin{macrocode}
    \long\def\formatChapterNumber#1{\def\web@formatChapterNumber{#1}}
    \formatChapterNumber{\large\bfseries
        \@chapapp\space\thechapter\par\nobreak}
    \long\def\formatChapterTitle#1{\def\web@formatChapterTitle##1{#1}}
    \formatChapterTitle{%
        \interlinepenalty\@M
        \noindent\hspace{1em}\large\bfseries#1\par\nobreak
    }
    \def\web@makechapterhead#1{%
        \vspace{3\p@}{%
            \parindent\z@ \raggedright \normalfont
            \ifnum \c@secnumdepth >\m@ne
                \if@mainmatter
                    \web@formatChapterNumber
                \fi
            \fi
            \web@formatChapterTitle{#1}%
            \vskip 12\p@
        }%
    }
    \def\web@makeschapterhead#1{%
        \vspace{3\p@}{%
            \parindent\z@\raggedright
            \normalfont
            \interlinepenalty\@M
            \large\bfseries #1\par\nobreak
            \vskip 12\p@
        }%
    }
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macrocode}
}     % end \@ifundefined{chapter}
%</websectioning>
%<*package>
%    \end{macrocode}
%    \begin{macrocode}
\def\aebwritelastpage{%
    \immediate\write\@auxout{%
%    \string\expandafter\string\gdef
%    \string\csname\space aebLastPage\string\endcsname{\arabic{page}}}%
    \string\w@csarg\string\gdef{aebLastPage}{\arabic{page}}}%
}
%    \end{macrocode}
%    \begin{macrocode}
\AtEndDocument{%
    \clearpage\addtocounter{page}{-1}\aebwritelastpage
    \addtocounter{page}{1}}
%    \end{macrocode}
% \subsection{\texorpdfstring{\protect\cs{useFullWidthForPaper}}{\CMD{useFullWidthForPaper}}}
%
% We introduce a command of resetting the page layout paper. The primary
% use is to create standard documents for academics, such as homework
% and other handouts.
%
%    \begin{macro}{\useFullWidthForPaper}
% This command is used to set the page layout to its maximum width, given
% a 1 inch margin. The height is maximized after taking into account
% other page parameters that effect it.  The parameters \cs{marginparwidth}
% and \cs{marginparsep} are set to zero; for this layout, there are no
% marginal comments. The command may be redefined as desired.
%
% The command should be used in the preamble, otherwise, it has no effect.
%\changes{v4.0g}{2007/10/21}
%{
%   Added the command \cs{useFullWidthForPaper} to reset the page layout for paper.
%   Useful for using web in writing homework assignments and other routine
%   ordinary documents.
%}
%    \begin{macrocode}
\def\useFullWidthForPaper{\ifeqforpaper
    \setlength{\textwidth}{\paperwidth-2in}
    \setlength{\textheight}
        {\paperheight-2in-\footskip-\topmargin-\headheight-\headsep}
    \oddsidemargin=0pt
    \evensidemargin=0pt
    \marginparsep=0pt
    \marginparwidth=0pt
    \fi
}
%    \end{macrocode}
%    \end{macro}
% \DescribeMacro{\maxtextscreentext} tries to maximize the \cs{textwidth} for
% the text screen. Works for one-sided paper. Has not effect unless a paper
% option is used, and the \texttt{templatesforpaper} option is not taken.
%    \begin{macrocode}
\def\maxtextscreentext{%
    \iftemplatesforpaper\else\ifeqforpaper
        \ifnum\@usetemplates=1
            \ifnum\@panelconfig=1 % left panel
                \setlength{\oddsidemargin}%
                    {\@panelwidth+\@panelsep-1in}%
                \setlength{\textwidth}%
                    {\paperwidth-\@panelwidth-\@panelsep-%
                    \marginparwidth-\marginparsep}%
            \else\ifnum\@panelconfig=2 % right panel
                \setlength{\oddsidemargin}{0in}%
                \setlength{\textwidth}%
                    {\paperwidth-\@panelwidth-\@panelsep-%
                    \oddsidemargin-\marginparwidth-\marginparsep}%
            \else
                \useFullWidthForPaper
            \fi\fi\fi
    \fi\fi
}
%    \end{macrocode}
%
% \subsection{\texorpdfstring{\protect\cs{centertextonpage}}{\CMD{centertextonpage}}}
%
%    \begin{macro}{\centertextonpage}
% This is a companion command to the options \texttt{centertitlepage} and \texttt{center\-title\-page\-full}.
% The command centers the body of the text on the page when the \texttt{forpaper} option is in effect.
% \changes{v4.4}{2012/08/26}{Added the command \string\cs{centertextonpage}}
%    \begin{macrocode}
\newcommand{\centertextonpage}{%
    \ifeqforpaper\AtBeginDocument{\web@centertextonpage}\fi}
\def\web@centertextonpage{%
    \setlength{\oddsidemargin}{\paperwidth-\textwidth-2in}%
    \oddsidemargin=.5\oddsidemargin
    \evensidemargin=\oddsidemargin
}
%    \end{macrocode}
%    \end{macro}
%
% \subsection{Web Colors}
% The original colors of web style back in the 1990s.
%    \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.
%
% If the user asks for the \texttt{latextoc} option, but wants bullets, we
% adjust things so the bullets look good.
%    \begin{macrocode}
\ifx\web@latextoc\web@YES\ifx\web@bullets\web@YES%
    \@ifundefined{chapter} {%
        \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{1.2em}}
    }{%
        \renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{1.2em}}
    }%
\fi\fi
%    \end{macrocode}
%    \begin{macrocode}
\def\tocColor#1{\def\web@tocColor{#1}\def\aeb@toccolor{#1}}
\tocColor{blue}
%    \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}
\newcommand{\allowHeadingsTocPage}{\let\web@Tocpagestyle\@gobble}
\def\web@Tocpagestyle#1{#1}
\let\web@latextoc@save\tableofcontents
\ifx\web@bullets\web@YES
\def\tableofcontents
{%
    \global\let\insertwebtoc\insert@webtoc
    \def\contentsname{\web@toc}%
    \pdfbookmark[1]{\web@toc}{toc}%
        \web@Tocpagestyle{\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\web@YES
        \@starttoc{toc}%  LaTeX toc listing with page numbers
    \else
        \noindent\webtableofcontents
    \fi
    \newpage
}
\else
    \PackageInfo{web}{No Bullets Requested}
    \def\tableofcontents{%
        \begingroup
        \def\contentsname{\web@toc}%
        \let\web@save@mkboth\@mkboth
        \def\@mkboth{\protect\hypertarget{webtoc}{}\web@save@mkboth}%
        \ifx\web@finalDot\@empty\else
        \def\numberline##1{\hb@xt@\@tempdima{##1.\hfil}}\fi
        \web@latextoc@save
        \endgroup\newpage
    }
    \renewcommand\subsubsection{\renewcommand{\@seccntformat}[1]{%
        \@nameuse{the##1}\web@finalDot\enspace}
        \@startsection{subsubsection}{3}{\z@}%
            {-2ex\@plus -1ex \@minus -.2ex}{.5ex \@plus .2ex}%
            {\noindent\normalfont\normalsize\bfseries}}
    \renewcommand*{\thesubsubsection}
        {\thesubsection.\arabic{subsubsection}}
\fi
%    \end{macrocode}
% \DescribeMacro{\widestNumber}\DescribeMacro{\tocIndent}
% \DescribeMacro{\tocIndentByNumber} These are used for
% setting the amount of indentation for the \cs{webtableofcontents}
%    \begin{macrocode}
\def\widestNumber#1{%
    \def\widest@Number{#1\ }}
\widestNumber{0.0.}
\newcommand{\tocIndent}[1]{\def\toc@indent{#1}}
\tocIndent{20pt}
\def\tocIndentByNumber#1{{%
    \settowidth{\@tempdima}{\normalfont\textbf{#1\ }}%
    \xdef\toc@indent{\the\@tempdima}%
}}
\tocIndentByNumber{00.}
%    \end{macrocode}
% The following are legacy definitions.
%    \begin{macrocode}
\let\tocindent\tocIndent
\let\tocindentByNumber\tocIndentByNumber
%    \end{macrocode}
% \DescribeMacro{\webtableofcontents} is the table of contents for
% the \texttt{web} package.
%    \begin{macrocode}
\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}
    \global\let\isChapter\web@NO
    \parskip0pt\parindent\toc@indent\relax
    \settowidth{\@tempdima}{\normalfont
        \textbf{\widest@Number}}%
    \@tempdimb\@tempdima
    \advance\@tempdimb by\parindent
    \edef\web@subsubSecIndent{\the\@tempdimb}%
    \def\par{\endgraf\leftskip=0pt}%
    \let\numberline\web@numberline
    \let\contentsline\web@contentsline
    \def\web@section##1##2##3{\web@parse##1\\%
        \web@toc@section{##1}{##2}{##3}}%
    \def\web@subsection##1##2##3{\web@parse##1\\%
        \web@toc@subsection{##1}{##2}{##3}}%
    \def\web@subsubsection##1##2##3{\web@parse##1\\%
        \web@toc@subsubsection{##1}{##2}{##3}}%
    \def\web@part##1##2##3{\web@toc@part{##1}{##2}{##3}}%
    \def\web@chapter##1##2##3{\web@parse##1\\%
        \web@toc@chapter{##1}{##2}{##3}}%
    \@starttoc{toc}%
    \setlength{\@tempdimb}{\ifx\isChapter\web@YES
        \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
    \leftskip\@tempdimb
    \par\endgroup
}
%    \end{macrocode}
%    \begin{macro}{\web@toc@part}
%    \begin{macro}{\web@toc@chapter}
%    \begin{macro}{\web@toc@section}
%    \begin{macro}{\web@toc@subsection}
%    \begin{macro}{\web@toc@subsubsection}
% The following determine the formatting commands of the various sections,
% including parts and chapter.
% \changes{v6.1.4}{2019/12/16}{Modified \string\cs{web@toc@chapter} so it is a link}
%    \begin{macrocode}
\def\web@numberline#1{\makebox[0pt]{#1\enspace}}%
\def\web@contentsline#1#2#3#4{%
    \@nameuse{web@#1}{#2}{#3}{#4}}%
\def\web@parse#1#2#3\\{%
    \def\web@title{#3}\def\numberline{#2}}%
\def\web@toc@part#1#2#3{\par\noindent
    {\bfseries\hyperlink{#3}{#1}}\par\smallskip}
\def\web@toc@chapter#1#2#3{\global\let\isChapter\web@YES
    \par\mbox{}{\bfseries
        \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\web@finalDot}\space}\web@title
        \fi}\par\smallskip
}
%\def\web@toc@chapter#1#2#3{\global\let\isChapter\web@YES
%    \par\mbox{}{\bfseries\makebox[0pt][r]{\hyperlink{#3}%
%        {\numberline\web@finalDot}\space}\web@title}\par\smallskip
%}
\def\web@toc@section#1#2#3{\penalty-500\par
        \hspace*{\if\isChapter y\parindent\else0pt\fi}\mbox{}{\bfseries
        \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\web@finalDot}\space}\web@title
        \fi}\endgraf
}%
\def\web@toc@subsection#1#2#3{\par
    \setlength{\@tempdimb}{\ifx\isChapter\web@YES
        \parindent+\@tempdima\else\@tempdima\fi}%
    \penalty-50 \hspace*{\@tempdimb}\mbox{}{\bfseries
    \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@finalDot}}}\web@title
    \fi}\endgraf
}%
\def\web@toc@subsubsection#1#2#3{%
    \def\numberline{\strut$\bullet$}%
    \setlength{\@tempdimb}{\ifx\isChapter\web@YES
        \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
    \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\
}%
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%
%\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
        \xdef\web@template@opt@args{\web@addtotemplateArgs}%
        \else\xdef\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]
{%
    \global\w@csarg\let{eqTmpl#1}\web@YES
    {\toks@=\expandafter{\listAddToTemplates}%
    \xdef\listAddToTemplates{\the\toks@\noexpand\\{#1}}}%
    \ifweb@allowtemplates
    \@AddToTextTemplate{%
        \w@csarg\ifx{eqTmpl#1}\web@YES
            \fboxsep=0pt\setlength{\unitlength}{1pt}%
            \put(\@textX,0){\@nameuse{#1}}%
        \fi
    }%
    \else
        \w@csarg\ifx{#1}\BGColorAndGraphic
            \@AddToTextTemplate{%
                \w@csarg\ifx{eqTmpl#1}\web@YES
                    \fboxsep=0pt\setlength{\unitlength}{1pt}%
                    \put(\@textX,0){\@nameuse{#1}}%
                \fi
            }%
        \fi
        \w@csarg\ifx{#1}\BGColorAndGraphicFullWidth
            \@AddToTextTemplate{%
                \w@csarg\ifx{eqTmpl#1}\web@YES
                    \fboxsep=0pt\setlength{\unitlength}{1pt}%
                    \put(\@textX,0){\@nameuse{#1}}%
                \fi
            }%
        \fi
    \fi
}
%    \end{macrocode}
%    \end{macro}
%    \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}
%\changes{v6.0e}{2015/08/16}{Added the command \cs{placeTemplateInLayer}}
% \DescribeMacro\placeTemplateInLayer is a command that inserts \cs{xBld} and
% \cs{eBld} command pairs of \textsf{aeb\_pro}. The latter package requires
% the \texttt{uselayers} option.
% The parameters are \texttt{[\#1]} the name of the layer to be used as the background
% (the default is \texttt{webTextBG}); \texttt{\#2} are the optional options of \cs{xBld},
% passing the empty argument (\verb~{}~) yields the default for \cs{xBld}.
%    \begin{macrocode}
\newcommand\placeTemplateInLayer[2][webTextBG]{%
    \@ifpackageloaded{aeb_pro}
        {\@ifundefined{xBld}{\PackageWarning{web}
            {The uselayers option
                of aeb_pro is\MessageBreak required with
                \string\placeTemplateInLayer}}
            {\def\b@webTextLayer{\xBld[#2]{#1}}%
             \def\e@webTextLayer{\eBld}}}%
        {\PackageWarning{web}{\string\placeTemplateInLayer\space
            requires the\MessageBreak aeb_pro package}}%
}
\let\b@webTextLayer\@empty \let\e@webTextLayer\@empty
\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}
    \b@webTextLayer\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
        }%
    }\e@webTextLayer
}
%    \end{macrocode}
%    \end{macro}
% Now use \cs{AddToTemplate} to add in the background color and graphic.
%    \begin{macrocode}
\AddToTemplate{BGColorAndGraphic}
%    \end{macrocode}
% \subsubsection{Panel Template}
% These are the commands that help build the (navigation) 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{@AddToPanelTemplate}.  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]
{%
    \global\w@csarg\let{eqPanTmpl#1}\web@YES
    {\toks@=\expandafter{\listAddToPanelTemplates}%
    \xdef\listAddToPanelTemplates{\the\toks@\noexpand\\{#1}}}%
    \ifweb@allowtemplates
    \@AddToPanelTemplate{%
        \w@csarg\ifx{eqPanTmpl#1}\web@YES
        \fboxsep=0pt\setlength{\unitlength}{1pt}%
        \put(\@panelX,0){\@nameuse{#1}}\fi
    }%
    \else
        \w@csarg\ifx{#1}\stdPanelBG
            \@AddToPanelTemplate{%
                \w@csarg\ifx{eqPanTmpl#1}\web@YES
                \fboxsep=0pt\setlength{\unitlength}{1pt}%
                \put(\@panelX,0){\@nameuse{#1}}\fi
            }%
        \fi
        \w@csarg\ifx{#1}\stdbldpanel
            \@AddToPanelTemplate{%
                \w@csarg\ifx{eqPanTmpl#1}\web@YES
                \fboxsep=0pt\setlength{\unitlength}{1pt}%
                \put(\@panelX,0){\@nameuse{#1}}\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]{\bgroup
    \setlength\@tempdima{#1}%
    \xdef\@panelsep{\the\@tempdima}\egroup}
%\def\@panelsep{10bp}
\panelsep{10bp}
\def\panelSep{\@panelsep}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\panelwidth}
% Use this command to set the width of the (navigation) panel. The navigation 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]{%
    \let\web@next\relax
    \iftemplatesforpaper\else\ifnum\@panelconfig>0
%    \end{macrocode}
% (2013/09/13) This command only has effect if there is a panel option and if the \cs{templates\-for\-paper}
% option is not in effect.
%    \begin{macrocode}
        \ifnum\@panelconfig=1 % left panel
%    \end{macrocode}
% (2013/09/13) One of the problems that I've just overcome it with the \cs{panelwidth} command.
% there was always problems about changing the widths of the panel. The solutions is to
% reverse the current effects of the last \cs{InitLayout} before calling \cs{InitLayout}
% with the new panel width. Seems to work. We do this for the left panel and the right panel.
%    \begin{macrocode}
            \ifx\web@layout\web@YES
                \addtolength{\textwidth}{\@panelwidth}%
                \addtolength{\textwidth}{\@Rightmargin}%
            \fi
            \addtolength{\textwidth}{\@panelsep}%
            \addtolength{\oddsidemargin}{-\@panelsep}%
            \addtolength{\evensidemargin}{-\@panelsep}%
            \addtolength{\textscreenwidth}{\@panelwidth}%
        \fi
        \ifnum\@panelconfig=2 % panel right
            \ifx\web@layout\web@YES
                \addtolength{\textwidth}{\@panelwidth}%
                \addtolength{\textwidth}{\@Leftmargin}%
            \fi
            \addtolength{\textwidth}{\@panelsep}%
            \addtolength{\textscreenwidth}{\@panelwidth}%
        \fi
%    \end{macrocode}
% Now record the new panel width and call \cs{InitLayout}
%    \begin{macrocode}
        \setlength{\@panelwidth}{#1}%
        \ifdim\@panelwidth<\web@minpanelwidth
        \setlength{\@panelwidth}{\web@minpanelwidth}\fi
        \def\web@next{\InitLayout}%
    \fi\fi\web@next
}
%    \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\placePanelTemplateInLayer[2][webPanelBG]{%
    \@ifpackageloaded{aeb_pro}
        {\@ifundefined{xBld}{\PackageWarning{web}
            {The uselayers option
                of aeb_pro is\MessageBreak required with
                \string\placePanelTemplateInLayer}}
            {\def\b@webPanelLayer{\xBld[#2]{#1}}%
             \def\e@webPanelLayer{\eBld}}}%
        {\PackageWarning{web}{\string\placePanelTemplateInLayer\space
            requires the\MessageBreak aeb_pro package}}%
}
\let\b@webPanelLayer\@empty \let\e@webPanelLayer\@empty
\newcommand\stdPanelBG
{%
    \b@webPanelLayer\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}}\e@webPanelLayer
}
%    \end{macrocode}
% Enter \cs{stdPanelBG} 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{stdPanelBG}, then say \verb+\let\stdPanelBG=\myBG+
%    \begin{macrocode}
\AddToPanelTemplate{stdPanelBG}
%    \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{stdbldpanel}.
% The \cs{stdbldpanel} is the macro that actually builds the objects on top of the
% background.
%    \begin{macrocode}
\newcommand{\buildpanel}[1]
{%
    \gdef\stdbldpanel
    {%
        \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{stdbldpanel}
%    \begin{macrocode}
\let\stdbldpanel\@empty
%    \end{macrocode}
% Now add this to the panel template.
%    \begin{macrocode}
\AddToPanelTemplate{stdbldpanel}
%    \end{macrocode}
% (2013/01/05)\DescribeMacro{\useStandPanel} is a panel design in three sections:
% top (for logo); middle (for other content); bottom (for navigation panel)
%    \begin{macrocode}
\newcommand{\useStandardPanel}{%
    \buildpanel{%
        \web@panel@top
        \par\vspace{\stretch{1}}%
        \web@panel@middle
        \par\vspace{\stretch{1}}%
        \web@panel@bottom
    }%
}
\newcommand{\panelTop}[1]{\def\web@panel@top{#1}}
\panelTop{}
\newcommand{\panelMiddle}[1]{\def\web@panel@middle{#1}}
\panelMiddle{}
\newcommand{\panelBottom}[1]{\def\web@panel@bottom{#1}}
\panelBottom{\panelNaviGroup}
%    \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\stdbldpanel\@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{stdbldpanel},
% \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{restoreElements}.
%    \begin{macrocode}
\newcommand{\saveElements}[1]
{%
    \begingroup
        \global\w@csarg\let{web@SaveTmpls#1}\@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{stdbldpanel}%
        \web@addtoSaveToks{web@panelBgColor}%
        \web@addtoSaveToks{web@paneltemplate}%
        \w@csarg\xdef{web@SaveTmpls#1}{\the\toks@}%
    \endgroup
}
\newcommand{\saveClearElements}[1]{%
    \saveElements{#1}\ClearAllTemplates\ClearBuildPanel
}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{\restoreElements}
% 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{\global\w@csarg\let{##1}=##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}.
% \changes{v6.0k}{2016/06/14}{Fixed error in def of \string\cs{\string\cs{}}}
%    \begin{macrocode}
\newcommand{\disableScreens}[1]
{%
    \begingroup
    \toks@=\expandafter{\listAddToTemplates}%
    \toks2={}%
    \def\\##1{\w@csarg\ifx{eqTmpl##1}\web@YES
        \disableTemplate{##1}%
        \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
        \toks2=\expandafter{\web@saveAddTo}\fi}%
    \the\toks@
    \endgroup
    \w@csarg\let{web@DisabledTmpls#1}\web@saveAddTo
}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\restoreScreens}
% 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}%
    \toks2 = {}%
    \def\\##1{\w@csarg\ifx{eqPanTmpl##1}\web@YES
        \disablePanelTemplate{##1}%
        \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
        \toks2 =\expandafter{\web@saveAddTo}\fi}%
    \the\toks@
    \endgroup
    \global\w@csarg\let{web@DisabledPanelTmpls#1}\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]{{%
    \global\w@csarg\let{eqTmpl#1}\web@NO}}
\newcommand{\enableTemplate}[1]{{%
    \global\w@csarg\let{eqTmpl#1}\web@YES}}
\newcommand{\disablePanelTemplate}[1]{{%
    \global\w@csarg\let{eqPanTmpl#1}\web@NO}}
\newcommand{\enablePanelTemplate}[1]{{%
    \global\w@csarg\let{eqPanTmpl#1}\web@YES}}
%    \end{macrocode}
% \subsubsection{Support for full-width pages}
% (2013/01/10) When one of the panel options is taken the with of the text screen is reduced.
% Here we provide simple support for creating a full-width page.
%    \begin{macrocode}
\let\fullscreenwidthadj\@empty
\def\web@leftMargAdj{0pt}
\def\web@rightMargAdj{0pt}
%    \end{macrocode}
% We calculate some adjustment values that depend on whether we are left or right panel.
%    \begin{macrocode}
\def\calculatefullwidth{%
    \ifeqforpaper
        \let\fullscreenwidthadj\@empty
    \else
        \ifnum\@panelconfig=1\relax % leftpanel
        \bgroup
        \setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Leftmargin}%
        \xdef\web@leftMargAdj{\the\@tempdima}%
        \setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Rightmargin}%
        \xdef\web@rightMargAdj{\the\@tempdima}%
        \egroup
        \def\fullscreenwidthadj{\hspace{\web@leftMargAdj}}%
        \fi
    \fi
}
%    \end{macrocode}
% \DescribeMacro{\makeFullwidthhead}
% Extend the running header all the way across the full width page;
% positioning depends on left or right panel and value of
% \cs{fullscreenwidthadj}.
%    \begin{macrocode}
\newcommand{\makeFullwidthhead}{%
    \global\let\web@save@oddhead\@oddhead
    \renewcommand{\@oddhead}{\fullscreenwidthadj
        \hbox to\fullscreenwidth{\normalfont\footnotesize
        \web@headerhook\web@lhead\hfil\web@chead\hfil
        \web@rightheader}\hss}%
}
%    \end{macrocode}
% \DescribeMacro{\restoreSavedHead} restores previously saved header
% (saved by \cs{makeFullwidthhead}.
%    \begin{macrocode}
\newcommand{\restoreSavedHead}{%
    \global\let\@oddhead\web@save@oddhead
    \let\web@save@oddhead\@empty
}
%    \end{macrocode}
%    \begin{environment}{Fullwidthtext}
% This is a list environment with parameters set to extend each line
% to the full-width of the page. Note the environment name is initially
% capitalized; this is to avoid clash with a similarly named environment
% in the \textsf{eqexam} package.
%    \begin{macrocode}
\def\webNotPaneledWarning{%
    The Fullwidthtext environment is valid only\MessageBreak
    for a paneled document, ignoring this\MessageBreak
    environment}
\newenvironment{Fullwidthtext}{%
    \ifnum\@panelconfig=0\relax
        \PackageWarning{web}{\webNotPaneledWarning}%
        \let\web@next\relax
    \else
        \def\web@next{%
        \enableTemplate{BGColorAndGraphicFullWidth}%
        \list{}{%
            \setlength{\textwidth}{\fullscreenwidth}%
            \setlength{\linewidth}{\fullscreenwidth}%
            \setlength{\itemindent}{0pt}\setlength{\itemsep}{0pt}%
            \setlength{\topsep}{0pt}\setlength{\parsep}{0pt}%
            \setlength{\listparindent}{\parindent}%
            \setlength{\leftmargin}{\web@leftMargAdj}%
            \setlength{\rightmargin}{-\web@rightMargAdj}%
        }\item\relax}%
    \fi\web@next
}{%
    \ifnum\@panelconfig=0\relax\let\web@next\relax\else
        \def\web@next{\endlist\newpage
        \disableTemplate{BGColorAndGraphicFullWidth}}%
    \fi\web@next
}
%    \end{macrocode}
%    \end{environment}
% \DescribeMacro{\pushToFullWidthPage} sends a paneled document into
% ``full page mode.''
%    \begin{macrocode}
\newcommand{\pushToFullWidthPage}{%
    \ifnum\@panelconfig>0\relax
        \disableScreens{gofullwidth}%
        \disablePanels{gofullwidth}%
        \makeFullwidthhead
        \let\web@save@footwrapper\webfootwrapper
        \def\webfootwrapper{\fullscreenwidthadj
            \makebox[\fullscreenwidth]}%
    \fi
    \begin{Fullwidthtext}
}
\newcommand{\popFromFullWidthPage}{%
    \end{Fullwidthtext}
    \ifnum\@panelconfig>0\relax
        \restoreScreens{gofullwidth}%
        \restorePanels{gofullwidth}%
        \restoreSavedHead
        \let\webfootwrapper\web@save@footwrapper
    \fi
}
%    \end{macrocode}
% \DescribeMacro{\addtofullwidthtemplateArgs}\DescribeMacro{\clearfullwidthtemplateArgs}
% are similar to their template and panel template counterparts.
%    \begin{macrocode}
\def\addtofullwidthtemplateArgs#1{%
    \gdef\web@addtofullwidthtemplateArgs{#1}}
\def\clearfullwidthtemplateArgs{%
    \global\let\web@addtofullwidthtemplateArgs\@empty}
\let\web@addtofullwidthtemplateArgs\@empty
%    \end{macrocode}
% \DescribeMacro{\fullwidthBgColor} sets to background color for
% the full-width page.
%    \begin{macrocode}
\newcommand{\fullwidthBgColor}[1]{\gdef\web@fullwidthBgColor{#1}}
\let\web@fullwidthBgColor\@empty
%    \end{macrocode}
%    \begin{macrocode}
\let\web@fullwidthtemplate\@empty
\newcommand{\fullwidthtemplate}[2][]
{%
    \ifweb@allowtemplates
        \def\web@arg{#1}\ifx\web@argi\@empty
        \xdef\web@fullwidthtemplate@opt@args
            {\web@addtofullwidthtemplateArgs}%
        \else
            \xdef\web@fullwidthtemplate@opt@args
                {\web@addtofullwidthtemplateArgs,#1}%
        \fi\gdef\web@fullwidthtemplate{#2}%
    \fi
}
%    \end{macrocode}
% \DescribeMacro{\B{GColorAndGraphicFullWidth}} handles the full-width page
% when left or right panels are in effect.
%    \begin{macrocode}
\newcommand\BGColorAndGraphicFullWidth
{%
    \put(-\@textX,0){%
        \web@colorbox@w@transparency{\web@fullwidthBgColor}%
        {%
            \parbox[b][\paperheight]{\paperwidth}%
            {%
                \ifx\web@fullwidthtemplate\@empty
                    \hfill\vfill
                \else
                    \hfuzz=1pt\vfuzz=1pt
                    \expandafter\includegraphics\expandafter
                    [\web@fullwidthtemplate@opt@args,%
                    width=\paperwidth,height=\paperheight]%
                    {\web@fullwidthtemplate}%
                \fi
            }%
        }%
    }%
}
%    \end{macrocode}
% Here we ``register'' this template with the ``template handler'', and then
% disable it. It's now ready for use: It will be used when a page goes into
% full-width from a left or right panel option.
%    \begin{macrocode}
\AddToTemplate{BGColorAndGraphicFullWidth}
\disableTemplate{BGColorAndGraphicFullWidth}
%    \end{macrocode}
% \subsubsection{\texorpdfstring{\protect\cs{AddToShipoutPicture}}{\CMD{AddToShipoutPicture}}}
%    \begin{macrocode}
\ifnum\@usetemplates>0
    \ifnum\@panelconfig>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
%    \end{macrocode}
% If the \texttt{pro} or \texttt{extended} option is called, we load this code here.
%    \begin{macrocode}
\ifx\webpro@loaded\web@YES\expandafter\loadwebpro\fi
%</package>
%<*webpro>
%    \end{macrocode}
% \section{The \texttt{pro} or \texttt{extended} option}
% We introduce some commands to make life easier for the user.
%    \begin{macrocode}
\RequirePackage{pifont}
%    \end{macrocode}
% \subsection{\texorpdfstring{\protect\cs{DeclareDocInfo}}{\CMD{DeclareDocInfo}}}
%    \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.
%
%\medskip\noindent Example usage:
%\begin{verbatim}
%\DeclareDocInfo{%
%    title=My First Presentation,
%    author=D. P. Speaker,
%    university=My University,
%    email=dpspeaker@myu.edu,
%    talkdate={Dec.\ 17, \the\year},
%    talksite=The Talking University,
%    subject=The Art of Talking
%}
%\end{verbatim}
%    \begin{macrocode}
\newcommand{\DeclareDocInfo}[1]{\setkeys{aebDocInfo}{#1}%
    \ifx\web@talkdate@value\@empty\else\let\webversion\webtalkdate\fi}
\@onlypreamble\DeclareDocInfo
%    \end{macrocode}
%    \end{macro}
%\paragraph*{Definition of keys for \cs{DeclareDocInfo}.}
% The following keys are recognized by \cs{DeclareDocInfo}:
% \IndexKey{title}^^A
% \IndexKey{author}^^A
% \IndexKey{university}^^A
% \IndexKey{email}^^A
% \IndexKey{talksite}^^A
% \IndexKey{talkdate}\par
% \IndexKey{talkdateLabel}
% \IndexKey{version}
% \IndexKey{versionLabel}
% \IndexKey{subject}\par
% \IndexKey{keywords}
% \IndexKey{copyrightyears}
% \IndexKey{prepared}
% \IndexKey{preparedLabel}
%    \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}}
%    \end{macrocode}
% \subparagraph*{Keys that use \textsf{aebxmp}}
% These keys are supported if the \textsf{aebxmp} package is loaded; otherwise,
% the keys are ignored.
%    \IndexKey{Title}
%    \IndexKey{Authors}
%    \IndexKey{Subject}
%    \IndexKey{Keywords}
%    \IndexKey{lang}\par
%    \IndexKey{copyrightStatus}
%    \IndexKey{copyrightNotice}
%    \IndexKey{copyrightInfoURL}
%    \IndexKey{authortitle}
%    \IndexKey{descriptionwriter}
%    \IndexKey{customProperties}
% \changes{v4.2h}{2012/01/13}{Added new keys for this set}
%    \begin{macrocode}
\define@key{aebDocInfo}{Title}[]%
    {\@ifpackageloaded{aebxmp}{\Title{#1}}{}}
\define@key{aebDocInfo}{authors}[]%
    {\@ifpackageloaded{aebxmp}{\Authors{#1}}{}}
\define@key{aebDocInfo}{Subject}[]%
    {\@ifpackageloaded{aebxmp}{\Subject{#1}}{\subject{#1}}}
\define@key{aebDocInfo}{Keywords}[]%
    {\@ifpackageloaded{aebxmp}{\Keywords{#1}}{\keywords{#1}}}
\define@key{aebDocInfo}{lang}[]%
    {\@ifpackageloaded{aebxmp}{\metaLang{#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}}{}}
\define@key{aebDocInfo}{authortitle}[]%
    {\@ifpackageloaded{aebxmp}{\authortitle{#1}}{}}
\define@key{aebDocInfo}{descriptionwriter}[]%
    {\@ifpackageloaded{aebxmp}{\descriptionwriter{#1}}{}}
\define@key{aebDocInfo}{customProperties}[]%
    {\@ifpackageloaded{aebxmp}{\customProperties{#1}}{}}
%    \end{macrocode}
%
% \subsection{\texorpdfstring{\protect\cs{DeclarePageLayout}}{\CMD{DeclarePageLayout}}}
%
% We develop a command that takes key-value pairs for setting the
% basic page layout parameters
%
%    \begin{macro}{\DeclarePageLayout}
% The \cs{DeclarePageLayout} is used to set the margins, screensize,
% and many other facets of the web page layout. Some settings are
% ignored when the \texttt{forpaper} option is in effect.
%
%\medskip\noindent Example usage:
%\begin{verbatim}
%\DeclarePageLayout
%{%
%    screensizeOf=designv,
%    margins={.75in}{.75in}{.75in}{.75in},
%    topmargin=40pt,
%    webfootskip=30pt
%}
%\end{verbatim}
% This sets the \texttt{\texttt{screensize}} to the same as the
% \texttt{screensize} of \texttt{designv}. We then adjust the
% margins, the \texttt{topmargin} key is used to position the running
% header, and the \texttt{webfootskip} key positions the running
% footer.
%    \begin{macrocode}
\newcommand{\DeclarePageLayout}[1]{\save@prtscr
    \setkeys{web@pl}{topmargin,headheight,marginparsep,%
        marginparwidth,marginparpush,webfootskip}%
%    \setkeys{web@pl}{#1}%
    \protected@edef\web@temp{\noexpand\setkeys{web@pl}{#1}}%
    \web@temp\save@prtscr
%    \setkeys{web@pl}{#1}%
    \ifx\web@pl@screensize\@empty\else
    \expandafter\screensize\web@pl@screensize\fi
    \ifx\web@pl@margins\@empty\else
    \expandafter\margins\web@pl@margins\fi
    \ifeqforpaper\else
        \ifdim\@Leftmargin<\@Rightmargin
            \ifdim\marginparwidth>\@Leftmargin
                \setlength{\marginparwidth}
                    {\@Leftmargin-2\marginparsep}%
            \fi
        \else
            \ifdim\marginparwidth>\@Rightmargin
                \setlength{\marginparwidth}
                    {\@Rightmargin-2\marginparsep}%
            \fi
        \fi
    \fi
    \ifeqforpaper\else
        \ifdim\@Bottommargin<\web@footskip\relax\PackageError{web}{%
            Error in the value of the webfootskip key\MessageBreak
            of the \string\DeclarePageLayout\space command.\MessageBreak
            The bottom margin must be larger then\MessageBreak
            the value of webfootskip}{%
            Increase the size of the bottom margin,\MessageBreak
            or decrease the value of webfootskip.}\else
        \fi
    \fi
  \InitLayout
}
\@onlypreamble\DeclarePageLayout
%    \end{macrocode}
%
%\paragraph*{Definition of keys for \cs{DeclarePageLayout}}
%The \cs{DeclarePageLayout} command takes a number of key-values.
%\IndexKey{screensize}^^A
%\IndexKey{margins}^^A
%\IndexKey{design}^^A
%\IndexKey{headheight}^^A
%    \begin{macrocode}
\define@key{web@pl}{screensize}[]{\def\web@pl@screensize{#1}}
\let\web@pl@screensize\@empty
\define@key{web@pl}{margins}[]{\def\web@pl@margins{#1}}
\let\web@pl@margins\@empty
\define@choicekey+{web@pl}{design}[\val\nr]{designi,designii,%
    designiii,designiv,designv,designvi,designvii,designviii,designix}{%
    \ifcase\nr\relax
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}\or
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}\or
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}\or
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}\or
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}\or
    \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}\or
    \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}\or
    \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}\or
    \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}\fi
    }{\PackageWarning{webpro}{%
    Bad choice for design, use designi--designvix. Try again}}
\define@choicekey+{web@pl}{screensizeOf}[\val\nr]{designi,designii,%
    designiii,designiv,designv,designvi,designvii,designviii,designix}{%
    \ifcase\nr\relax
        \screensize{3.736in}{4.67in}\or
        \screensize{4.5in}{5in}\or
        \screensize{5in}{6in}\or
        \screensize{4in}{5in}\or
        \screensize{4.5in}{6in}\or
        \screensize{4.17in}{4.67in}\or
        \screensize{7.5in}{10in}\or
        \screensize{3.75in}{6.67in}\or
        \screensize{3.75in}{6in}\fi
    }{\PackageWarning{webpro}{%
    Bad choice for screensizeOf, use designi--designvix. Try again}}
\define@key{web@pl}{headheight}[8pt]{\def\websetheadheight{#1}}
%    \end{macrocode}
%Key-values of \cs{DeclarePageLayout} continues.
%\IndexKey{topmargin}
%\IndexKey{textwidth}
%\IndexKey{textheight}
%\IndexKey{oddsidemargin}
%\IndexKey{evensidemargin}
%    \begin{macrocode}
\define@key{web@pl}{topmargin}[\prtscr{\the\topmargin}{8pt}]{%
    \edef\web@argi{#1}\ifx\web@argi\@empty
    \edef\web@argi{\prtscr{\the\topmargin}{8pt}}\fi
    \ifeqforpaper
        \setlength{\topmargin}{\web@argi}%
    \else
        \setlength{\web@Topmargin}{\web@argi}%
    \fi}
\define@key{web@pl}{textwidth}[345pt]{\setlength{\textwidth}{#1}}
\define@key{web@pl}{textheight}[43\baselineskip]%
    {\setlength{\textheight}{#1}}
\define@key{web@pl}{oddsidemargin}[63pt]%
    {\setlength{\oddsidemargin}{#1}}
\define@key{web@pl}{evensidemargin}[63pt]%
    {\setlength{\evensidemargin}{#1}}
%    \end{macrocode}
% More key-values of \cs{DeclarePageLayout}.
%\IndexKey{marginparsep}
%\IndexKey{marginparwidth}
%\IndexKey{marginparpush}
%\IndexKey{webfootskip}
%\IndexKey{footskip}
%\IndexKey{panelwidth}
%\IndexKey{panelsep}
%\IndexKey{additionalheadsep}
%    \begin{macrocode}
\define@key{web@pl}{marginparsep}[\prtscr{\the\marginparsep}{11pt}]{%
    \edef\web@argi{#1}\ifx\web@argi\@empty
    \edef\web@argi{\prtscr{\the\marginparsep}{11pt}}\fi
    \setlength{\marginparsep}{\web@argi}}
\define@key{web@pl}{marginparwidth}%
    [\prtscr{\the\marginparwidth}{.25in}]{%
    \edef\web@argi{#1}\ifx\web@argi\@empty
    \edef\web@argi{\prtscr{\the\marginparwidth}{.25in}}\fi
    \setlength{\marginparwidth}{\web@argi}}
\define@key{web@pl}{marginparpush}[5pt]{%
    \setlength{\marginparpush}{#1}}
\define@key{web@pl}{webfootskip}[4pt]{%
    \def\web@footskip{#1}}
\define@key{web@pl}{footskip}[30pt]{\setlength{\footskip}{#1}}
\define@key{web@pl}{panelwidth}[1in]{\panelwidth{#1}}
\define@key{web@pl}{panelsep}[10pt]{\panelsep{#1}}
\define@key{web@pl}{additionalheadsep}[0pt]%
    {\def\web@additionalheadsep{#1}}
%    \end{macrocode}
%    \end{macro}
%
% \subsection{\texorpdfstring{\protect\cs{maketitle}}{\CMD{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}
{%
    \webtpTrailerWrapper{\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\webtpTrailerWrapper\relax
\let\web@tpTrailerBgColor\@empty
\let\web@tpTrailerBorderColor\@empty
\let\tpTrailer@textcolor\@empty
\let\web@tpTrailer@graphic\@empty
\let\web@tpTrailer@namedgraphic\@empty
\let\web@tpTrailer@formatting\@empty
\def\web@tpTrailer@raise{0pt}
\def\web@tp@linewidth{\linewidth}
%    \end{macrocode}
% Key-values of \cmd{\DesignTitlePageTrailer}
% \IndexKey{ul}
% \IndexKey{ll}
% \IndexKey{ur}
% \IndexKey{lr}
% \IndexKey{textColor}
% \IndexKey{bgColor}
%    \begin{macrocode}
\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}}
%    \end{macrocode}
% Key-values of \cmd{\DesignTitlePageTrailer}
% \IndexKey{borderColor}
% \IndexKey{fboxsep}
% \IndexKey{fboxrule}
% \IndexKey{graphic}
% \IndexKey{namedgraphic}
%    \begin{macrocode}
\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}{namedgraphic}{%
    \def\web@tpTrailer@namedgraphic{#1}}
%    \end{macrocode}
% Key-values of \cmd{\DesignTitlePageTrailer}
% \IndexKey{fontSize}
% \IndexKey{formatting}
% \IndexKey{raise}
%    \begin{macrocode}
\define@key{tpTrailer}{fontSize}{\renewcommand{\trailerFontSize}{#1}}
\define@key{tpTrailer}{formatting}{\def\web@tpTrailer@formatting{#1}}
\define@key{tpTrailer}{raise}{\def\web@tpTrailer@raise{#1}}
\newcommand{\DesignTitlePageTrailer}[1]
{%
    \setkeys{tpTrailer}{fboxsep=3pt,fboxrule=.4pt}%
    \setkeys{tpTrailer}{#1}%
    \setlength{\fboxsep}{\web@tpTrailerfboxsep}%
    \setlength{\fboxrule}{\web@tpTrailerfboxrule}%
    \let\web@tp@graphic\web@NO
    \ifx\web@tpTrailer@graphic\@empty
        \ifx\web@tpTrailer@namedgraphic\@empty\else
            \let\web@tp@graphic\web@YES\fi
    \else\let\web@tp@graphic\web@YES\fi
    \ifx\web@tp@graphic\web@NO\relax
        \ifx\web@tpTrailerBgColor\@empty
            \def\grfbox@spec##1{##1}%
        \else
            \ifx\web@tpTrailerBorderColor\@empty
                \def\web@tp@linewidth{\linewidth-2\fboxsep}%
                \def\grfbox@spec{\colorbox{\web@tpTrailerBgColor}}%
            \else
                \def\web@tp@linewidth{%
                    \linewidth-2\fboxsep-2\fboxrule}%
                \def\grfbox@spec{\fcolorbox{\web@tpTrailerBorderColor}%
                        {\web@tpTrailerBgColor}}%
            \fi
        \fi
        \def\webtpTrailerWrapper##1{\smash{\raisebox
            {\web@tpTrailer@raise}{\grfbox@spec{##1}}}}%
    \else
        \@ifundefined{graphicxbox}{\begingroup
        \gdef\webtpTrailerWrapper##1{%
        \edef\web@tmp@opt{\ifx\web@tpTrailer@namedgraphic\@empty\else
            name=\web@tpTrailer@namedgraphic,\fi}%
            \def\web@tp@linewidth{\linewidth-2\fboxsep}%
            \setbox0=\hbox{##1}%
            \noindent\makebox[0pt][l]{%
                \smash{\raisebox{-\dp0-\fboxsep+\web@tpTrailer@raise}{%
                \expandafter\includegraphics\expandafter[\web@tmp@opt
                 width=\wd0+2\fboxsep,%
                 height=\dp0+\ht0+2\fboxsep]{\web@tpTrailer@graphic}}%
            }}\kern\fboxsep\smash{%
                \raisebox{\web@tpTrailer@raise}{\unhbox0\relax}}%
        }%
        \endgroup}{%
        \xdef\grfbox@spec{%
            \ifx\web@tpTrailerBorderColor\@empty
                \noexpand\graphicxbox\else
            \noexpand\fgraphicxbox{\web@tpTrailerBorderColor}\fi
            \ifx\web@tpTrailer@namedgraphic\@empty\else
                [name=\web@tpTrailer@namedgraphic]\fi}%
        \gdef\webtpTrailerWrapper##1{%
            \edef\web@tp@linewidth{%
            \linewidth-2\fboxsep\ifx\web@tpTrailerBorderColor\@empty
                \else-2\fboxrule\fi}%
            \smash{\raisebox{\web@tpTrailer@raise}{%
                \grfbox@spec{\web@tpTrailer@graphic}{##1}}}}%
        }%
    \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{\web@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}
    \begingroup\par
    \aboveOPMvspace
    \noindent\parbox{\linewidth}{\optionalpagematter}%
    \par\endgroup
    \par\vspace{\stretch{1}}
%    \end{macrocode}
% Insert the directory, as desired.
%    \begin{macrocode}
    \ifx\web@directory@option\web@YES\web@directory@hook\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
}
\let\web@maketitle@save\maketitle
\let\maketitle\web@maketitle
%    \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}
\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}
% We define the options (key-values) for the section headings
% \IndexKey{reset}
%    \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 reset, permissible values
   are font and all. Try again}}
%    \end{macrocode}
% Section headings
% \IndexKey{type}
% \IndexKey{special}
%    \begin{macrocode}
\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,colorboxfitrule,custom,default}%
{%
  \ifcase\nr\relax
     \w@csarg\let{aeb@\aeb@section@type @special}\aeb@shadowHead\or
     \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxHead\or
     \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxHead\or
     \w@csarg\let{aeb@\aeb@section@type @special}\aeb@fcolorboxHead\or
     \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxfitHead\or
     \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxfitHead\or
     \w@csarg\let{aeb@\aeb@section@type @special}
        \aeb@fcolorboxfitHead\or
     \w@csarg\let{aeb@\aeb@section@type @special}
        \aeb@colorboxfitruleHead\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
     \w@csarg\let{aeb@\aeb@section@type @special}\@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{%
    \w@csarg\let{aeb@\@@tmp @special}\@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}
% The command\DescribeMacro{\aeb@frameboxHead} for \texttt{special=framebox}.
%    \begin{macrocode}
\def\aeb@frameboxHead#1{%
    \begingroup
    \@tempdima=\linewidth
    \advance\@tempdima-2\fboxsep
    \advance\@tempdima-2\fboxrule
    \edef\@@aeb@sectionframecolor
        {\@nameuse{aeb@\aeb@section@type framecolor}}%
    \edef\@@aeb@sectioncolor
        {\@nameuse{aeb@\aeb@section@type color}}%
    \setbox0\vbox{\hsize=\@tempdima#1}\color{\@@aeb@sectionframecolor}%
    \framebox{\color{\@@aeb@sectioncolor}\copy0}%
    \endgroup
}
%    \end{macrocode}
% The command\DescribeMacro{\aeb@colorboxHead} for \texttt{special=colorbox}.
%    \begin{macrocode}
\def\aeb@colorboxHead#1{%
    \begingroup
    \@tempdima=\linewidth
    \advance\@tempdima-2\fboxsep
    \setbox0\vbox{\hsize=\@tempdima#1}%
    \edef\@@aeb@sectionbgcolor
        {\@nameuse{aeb@\aeb@section@type bgcolor}}%
    \colorbox{\@@aeb@sectionbgcolor}{\copy0}%
    \endgroup
}
%    \end{macrocode}
% The command\DescribeMacro{\aeb@fcolorboxHead} for \texttt{special=fcolorbox}.
%    \begin{macrocode}
\def\aeb@fcolorboxHead#1{%
    \begingroup
    \@tempdima=\linewidth
    \advance\@tempdima-2\fboxsep
    \advance\@tempdima-2\fboxrule
    \setbox0\vbox{\hsize=\@tempdima#1}%
    \edef\@@aeb@sectionbgcolor
        {\@nameuse{aeb@\aeb@section@type bgcolor}}%
    \fcolorbox{\aeb@sectionframecolor}%
    {\@@aeb@sectionbgcolor}{\copy0}
    \endgroup
}
%    \end{macrocode}
% The command\DescribeMacro{\aeb@frameboxfitHead} for \texttt{special=frameboxfit}.
%    \begin{macrocode}
\def\aeb@frameboxfitHead#1{%
    \begingroup
    \edef\@@aeb@sectionframecolor
        {\@nameuse{aeb@\aeb@section@type framecolor}}%
    \edef\@@aeb@sectioncolor
        {\@nameuse{aeb@\aeb@section@type color}}%
    \vbox{\color{\@@aeb@sectionframecolor}%
    \framebox{\color{\@@aeb@sectioncolor}#1}}%
    \endgroup
}
%    \end{macrocode}
% The command\DescribeMacro{\aeb@colorboxfitHead} for \texttt{special=colorboxfit}.
%    \begin{macrocode}
\def\aeb@colorboxfitHead#1{%
    \begingroup
    \edef\@@aeb@sectioncolor
        {\@nameuse{aeb@\aeb@section@type color}}%
    \edef\@@aeb@sectionbgcolor
        {\@nameuse{aeb@\aeb@section@type bgcolor}}%
    \vbox{\colorbox{\@@aeb@sectionbgcolor}%
    {\color{\@@aeb@sectioncolor}#1}}%
    \endgroup
}
%    \end{macrocode}
% The command\DescribeMacro{\aeb@fcolorboxfitHead} for \texttt{special=fcolorboxfit}.
%    \begin{macrocode}
\def\aeb@fcolorboxfitHead#1{%
    \begingroup
    \edef\@@aeb@sectioncolor
        {\@nameuse{aeb@\aeb@section@type color}}%
    \edef\@@aeb@sectionbgcolor
        {\@nameuse{aeb@\aeb@section@type bgcolor}}%
    \edef\@@aeb@sectionframecolor
        {\@nameuse{aeb@\aeb@section@type framecolor}}%
    \vbox{\fcolorbox{\@@aeb@sectionframecolor}{\@@aeb@sectionbgcolor}%
    {\color{\@@aeb@sectioncolor}#1}}%
    \endgroup
}
%    \end{macrocode}
% Here we define \DescribeMacro{\shadowhoffset}\cs{shadowhoffset} and
% \DescribeMacro{\shadowvoffset}\cs{shadowvoffset} and give their defaults.
% These are the offsets (horizontal and vertical) for creating a shadow effect.
%    \begin{macrocode}
\def\shadowhoffset#1{\def\aeb@shadowhoffset{#1}}
\shadowhoffset{.2ex}
\def\shadowvoffset#1{\def\aeb@shadowvoffset{#1}}
\shadowvoffset{-.2ex}
%    \end{macrocode}
% The command\DescribeMacro{\aeb@shadowHead} for \texttt{special=shadow}.
%    \begin{macrocode}
\def\aeb@shadowHead#1{% dps1
    \begingroup
    \edef\@@aeb@sectionshadowcolor
        {\@nameuse{aeb@\aeb@section@type shadowcolor}}%
    \edef\@@aeb@sectioncolor
        {\@nameuse{aeb@\aeb@section@type color}}%
    \setbox0\vbox{\Shadowtrue\hsize=\linewidth #1}%
    \wd0\z@\dp0\z@\relax\raisebox{\aeb@shadowvoffset}%
    {\hbox to\z@{\kern\aeb@shadowhoffset%
    \Shadowtrue\color{\@@aeb@sectionshadowcolor}
    \box0\hss}}%
    \setbox0\vbox{\Shadowfalse\hsize=\linewidth #1}\box0
    \endgroup
}
%    \end{macrocode}
% \texttt{usefont}\IndexKey{usefont} allows for a custom shift in font for the title.
% it takes four argument, each of which are enclosed in braces:
%\begin{verbatim}
%   {<fontencoding>}{<fontfamily>}{<fontseries>}{<fontshape>}
%       {{<fontsize>}{<skip>}}
%\end{verbatim}
%    \begin{macrocode}
\define@key{aebsection}{usefont}{%
    \w@csarg\def{aeb@\aeb@section@type @usefont}{\aeb@usefont#1}}
\@tfor\@@tmp:={section}{subsection}{subsubsection}
{university}{title}{author}{toc}\do{%
    \w@csarg\let{aeb@\@@tmp @usefont}\@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.\IndexKey{fontfamily}\IndexKey{fontseries}\IndexKey{fontshape}
%    \begin{macrocode}
\define@key{aebsection}{fontfamily}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{rmfamily,sffamily,ttfamily}{%
    \w@csarg\def{aeb@\aeb@section@type @fontfamily}{\@nameuse{#1}}%
}{\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{\w@csarg\let{aeb@\@@tmp @fontfamily}\aeb@defaultfamily}
\define@key{aebsection}{fontseries}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{bfseries,mdseries}{%
    \w@csarg\def{aeb@\aeb@section@type @fontseries}{\@nameuse{#1}}%
}{\PackageWarning{webpro}{Bad choice for fontseries, permissible values
   are bfseries and mdseries. Try again}}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontseries}\bfseries}
\define@key{aebsection}{fontshape}{%
    \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
    \aeb@temp@expand{upshape,itshape,scshape,slshape}{%
    \w@csarg\def{aeb@\aeb@section@type @fontshape}{\@nameuse{#1}}%
}{\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{\w@csarg\let{aeb@\@@tmp @fontshape}\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}{%
    \w@csarg\def{aeb@\aeb@section@type @fontsize}{\@nameuse{#1}}%
}{\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
}
%    \end{macrocode}
% Alignment related keys\IndexKey{halign}
%    \begin{macrocode}
\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
        \w@csarg\let{aeb@\aeb@section@type @halign}\raggedright\or
        \w@csarg\let{aeb@\aeb@section@type @halign}\centering\or
        \w@csarg\let{aeb@\aeb@section@type @halign}\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, rule, and ding related keys\IndexKey{ding}\IndexKey{color}\IndexKey{ruleheight}%
% \IndexKey{ruleheigtht}\IndexKey{numdingcolor}
%    \begin{macrocode}
\define@key{aebsection}{ding}{\if\aeb@use@section@numbers0
    \webtoksi=\expandafter{\expandafter\protect
    \expandafter\web@sel@sec@col\expandafter{\aeb@section@type}#1\ }%
    \w@csarg\edef{aeb@\aeb@section@type Num}##1{\the\webtoksi}%
    \else\PackageWarning{webpro}{The ding key is not available with a
        section numbering system,\MessageBreak
        ignoring request for a ding.}\fi
}
\define@key{aebsection}{color}{%
    \w@csarg\def{aeb@\aeb@section@type color}{#1}}
\define@key{aebsection}{ruleheight}{%
    \w@csarg\def{aeb@\aeb@section@type ruleheight}{#1}}
\define@key{aebsection}{numdingcolor}{%
    \w@csarg\def{aeb@\aeb@section@type numdingcolor}{#1}}
%    \end{macrocode}
% Section color defaults
%    \begin{macrocode}
\def\aeb@sectioncolor{blue}
\def\aeb@subsectioncolor{\aeb@sectioncolor}
\def\aeb@subsubsectioncolor{\aeb@sectioncolor}
%    \end{macrocode}
% Section color for numbers and dings
%    \begin{macrocode}
\def\aeb@sectionnumdingcolor{\aeb@sectioncolor}
\def\aeb@subsectionnumdingcolor{\aeb@sectioncolor}
\def\aeb@subsubsectionnumdingcolor{\aeb@sectioncolor}
%    \end{macrocode}
% Title page default colors
%    \begin{macrocode}
\def\aeb@universitycolor{black}
\def\aeb@universitynumdingcolor{\aeb@universitycolor}
\def\aeb@titlecolor{blue}
%    \end{macrocode}
% Title page default numbers and dings (not used, but need to be defined)
%    \begin{macrocode}
\def\aeb@titlenumdingcolor{\aeb@titlecolor}
\def\aeb@authorcolor{black}
\def\aeb@authornumdingcolor{\aeb@authorcolor}
%    \end{macrocode}
% Table of contents page defaults for colors and numbers
%    \begin{macrocode}
\def\aeb@toccolor{blue}
\def\aeb@tocnumdingcolor{\aeb@toccolor}
%    \end{macrocode}
%Frame and shadow related keys\IndexKey{framecolor}%
% \IndexKey{bgcolor}\IndexKey{shadowcolor}
%    \begin{macrocode}
\define@key{aebsection}{framecolor}{%
    \w@csarg\def{aeb@\aeb@section@type framecolor}{#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}{%
    \w@csarg\def{aeb@\aeb@section@type bgcolor}{#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}{%
    \w@csarg\def{aeb@\aeb@section@type shadowcolor}{#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\IndexKey{indent}
%    \begin{macrocode}
\define@key{aebsection}{indent}[0pt]{%
    \edef\web@argi{#1}\ifx\web@argi\@empty
    \def\web@argi{0pt}\fi
    \w@csarg\edef{aeb@\aeb@section@type @indent}{\web@argi}}
\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@}
%    \end{macrocode}
%Other keys\IndexKey{beforeskip}\IndexKey{afterskip}
%    \begin{macrocode}
\define@key{aebsection}{beforeskip}{%
    \w@csarg\def{aeb@\aeb@section@type @beforeskip}{#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}{%
    \w@csarg\def{aeb@\aeb@section@type @afterskip}{#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 \IndexKey{hproportion}\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}{%
    \w@csarg\def{hproportionweb\aeb@section@type}{#1}}
%    \end{macrocode}
% Some special keys for \cs{titleLayout}, \cs{universityLayout} and \cs{authorLayout}.
% The \IndexKey{xhaligh}\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}{%
        \w@csarg\def{halign\aeb@section@type}{#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}
%Special keys for TOC\IndexKey{tocName}\IndexKey{tocNameCont}
%    \begin{macrocode}
\define@key{aebToc}{tocName}{\tocName{#1}}
\define@key{aebToc}{tocNameCont}{\tocNameCont{#1}}
%    \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.
%    \begin{macrocode}
\renewcommand{\section}{% dps1
   \renewcommand{\@seccntformat}[1]{\aeb@sectionNum{##1}}%
   \@startsection{section}{1}{\aeb@section@indent}%
   {\aeb@section@beforeskip}{\aeb@section@afterskip}%
   {\noindent\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{% dps1
   \renewcommand{\@seccntformat}[1]{\aeb@subsectionNum{##1}}%
   \@startsection{subsection}{2}{\aeb@subsection@indent}%
   {\aeb@subsection@beforeskip}{\aeb@subsection@afterskip}%
   {\noindent\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{% dps1
   \renewcommand{\@seccntformat}[1]{\aeb@subsubsectionNum{##1}}%
   \@startsection{subsubsection}{3}{\aeb@subsubsection@indent}%
   {\aeb@subsubsection@beforeskip}{\aeb@subsubsection@afterskip}%
   {\noindent\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@tocNum{##1}}%
   \@startsection{section}{1}{\aeb@toc@indent}%
   {\aeb@toc@beforeskip}{\aeb@toc@afterskip}%
   {\hypertarget{webtoc}{}%
   \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} pages, these changes are global, if placed
% \textsl{within} an 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}
\def\save@prtscr{\global\let\prtscr@save\prtscr
    \global\let\prtscr\prtscrA}
\def\restore@prtscr{\global\let\prtscr\prtscr@save}
\newcommand{\sectionLayout}[1]{\save@prtscr
    \setkeys{aebsection}{type=section,color=blue,ruleheight=1pt}%
    \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
    \aeb@temp\restore@prtscr}
\newcommand{\subsectionLayout}[1]{\save@prtscr
    \setkeys{aebsection}{type=subsection,color=blue,ruleheight=1pt}%
    \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
    \aeb@temp\restore@prtscr}
\newcommand{\subsubsectionLayout}[1]{\save@prtscr
    \setkeys{aebsection}{type=subsubsection,color=blue,ruleheight=1pt}%
    \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
    \aeb@temp\restore@prtscr}
%    \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]{\save@prtscr
    \setkeys{aebsection}{type=university}%
    \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
    \aeb@temp\restore@prtscr}
\universityLayout{fontsize={\prtscrA{large}{normalsize}}}
\newcommand{\titleLayout}[1]{\save@prtscr
    \setkeys{aebsection}{type=title}%
    \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
    \aeb@temp\restore@prtscr}
\titleLayout{fontsize={\prtscrA{Large}{normalsize}}}
\newcommand{\authorLayout}[1]{\save@prtscr
    \setkeys{aebsection}{type=author}%
    \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
    \aeb@temp\restore@prtscr}
\authorLayout{fontsize={\prtscrA{large}{normalsize}}}
\newcommand{\tocLayout}[1]{\save@prtscr
    \setkeys{aebsection}{type=toc,color=\web@tocColor}%
    \protected@edef\aeb@temp{\noexpand\setkeys{aebsection,aebToc}{#1}}%
    \aeb@temp\restore@prtscr}
\tocLayout{fontsize=Large}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
% \subsection{\texorpdfstring{\cs{useSectionNumbers}}{\textbackslash useSectionNumbers}}
% The switch \DescribeMacro{\ifShadow} is use to control the color to be displayed
% for section titles. The normal state of \cs{ifShadow} is false, and is only turned true
% when in the command \cs{aeb@shadowHead}
%    \begin{macrocode}
\newif\ifShadow \Shadowfalse % dps1
%    \end{macrocode}
% The \cs{web@sel@sec@col} command is used to select the proper color for
% the section labels. It is used in the definition of \cs{useSectionNumbers}
% below, and also in the \texttt{ding} key from the \texttt{aebsection} family.
%    \begin{macrocode}
\def\web@sel@sec@col#1{\ifShadow
    \color{\@nameuse{aeb@#1shadowcolor}}\else
    \color{\@nameuse{aeb@#1numdingcolor}}\fi}
%    \end{macrocode}
%    \begin{macro}{\useSectionNumbers}
%    \begin{macro}{\noSectionNumbers}
% When developing 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}
{% dps1
    \let\aeb@use@section@numbers1\relax
    \def\aeb@sectionNum##1{\protect\web@sel@sec@col{section}%
    \@nameuse{the##1}\web@finalDot\ }%
    \def\aeb@subsectionNum##1{\protect\web@sel@sec@col{subsection}%
        \@nameuse{the##1}\web@finalDot\ }%
    \def\aeb@subsubsectionNum##1{%
        \protect\web@sel@sec@col{subsubsection}%
    \@nameuse{the##1}\if@defaultsubsubding\else\web@finalDot\fi\ }%
    \def\sectionmark##1{\markright{##1}}%
}
\newcommand{\noSectionNumbers}
{%
    \ifx\web@latextoc\web@YES
        \PackageInfo{web}{The nobullets or latextoc option
        taken,\MessageBreak
        ignoring \string\noSectionNumbers}%
    \else
        \let\aeb@use@section@numbers0\relax
        \let\aeb@sectionNum\@gobble
        \let\aeb@subsectionNum\@gobble
        \let\aeb@subsubsectionNum\@gobble
    \fi
}
\useSectionNumbers
%    \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}.
% \IndexKey{universityColor}
% \IndexKey{titleColor}
% \IndexKey{authorColor}
% \IndexKey{textBgColor}
% \IndexKey{panelBgColor}
% \IndexKey{linkColor}
% \IndexKey{fileColor}
% \IndexKey{citeColor}
% \IndexKey{urlColor}
%    \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}{linkColor}{\def\@linkcolor{#1}}
\define@key{aebcolordesign}{fileColor}{\def\@filecolor{#1}}
\define@key{aebcolordesign}{citeColor}{\def\@citecolor{#1}}
\define@key{aebcolordesign}{urlColor}{\def\@urlcolor{#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{AeB} document.
% \IndexKey{dDing}
% \IndexKey{ddDing}
% \IndexKey{dddDing}
% \IndexKey{dDingColor}
% \IndexKey{ddDingColor}
% \IndexKey{dddDingColor}
%    \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
    {\w@csarg\let{\@@tmp}\@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}
%\selectTocDings
%{
%    dDing=\ding{082},
%    ddDing=\ding{079},
%    dddDing=\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}
%</webpro>
%    \end{macrocode}
%\StopEventually{}
%    \begin{macrocode}
%<*docdefs>
%
% Custom doc formatting developed for the AeB packages
% D. P. Story
%
\newcommand{\setupFullwidth}{%
    \setlength{\textwidth}{\paperwidth}%
    \advance\textwidth-2in
    \setlength{\linewidth}{\textwidth}%
    \setlength{\columnseprule}{0pt}%
    \setlength{\oddsidemargin}{0in}%
    \setlength{\evensidemargin}{0in}%
}
\makeatletter
\def\clindx{\ifcodeline@index\expandafter\@firstoftwo\else
    \expandafter\@secondoftwo\fi}
\GlossaryPrologue{\section{Change History}}
\IndexPrologue{\section{Index}\hfuzz\linewidth
  \parbox{\linewidth}{Numbers written in italic
  refer to the page where the corresponding entry is described;
  numbers underlined refer to the
\clindx{code line of the}{}
    definition; numbers in roman refer to the
\clindx{code lines}{pages}
    where the entry is used.}\medskip\par\hfuzz=0.1pt}
\value{IndexColumns}=2
\value{GlossaryColumns}=2
\def\changes@#1#2#3{%
    \protected@edef\@tempa{\noexpand\glossary{#1 (#2)\levelchar
     \ifx\saved@macroname\@empty
       \space
       \actualchar
       \generalname
     \else
       \expandafter\@gobble
       \saved@macroname
       \actualchar
       \string\verb\quotechar*%
       \verbatimchar\saved@macroname
       \verbatimchar
     \fi
     :\levelchar #3}}%
  \@tempa\endgroup\@esphack}
\def\SpecialMainOptIndex#1{\@bsphack\index{%
  #1\actualchar
  {\string\ttfamily\space#1}
     (option)%
  \encapchar usage}%
    \index{options:\levelchar#1\actualchar{%
           \string\ttfamily\space#1}\encapchar
   usage}\@esphack}
\def\SpecialMainKeyIndex#1{\@bsphack\index{%
  #1\actualchar
  {\string\ttfamily\space#1}
     (key)%
  \encapchar usage}%
    \index{keys:\levelchar#1\actualchar{%
           \string\ttfamily\space#1}\encapchar
   usage}\@esphack}
\def\SpecialMainJSIndex#1{\@bsphack\index{%
  #1\actualchar
  {\string\ttfamily\space#1}
     (JS function)%
  \encapchar usage}%
    \index{JS functions:\levelchar#1\actualchar{%
           \string\ttfamily\space#1}\encapchar
   usage}\@esphack}
\makeatother
\newcommand\IndexOpt[2][]{\SpecialMainOptIndex{#1#2}%
    \marginpar{\raggedleft\PrintDescribeMacro{#2}}}
\def\IndexKey#1{\SpecialMainKeyIndex{#1}%
    \marginpar{\raggedleft\PrintDescribeMacro{#1}}}
\def\IndexJS#1{\SpecialMainJSIndex{#1}%
    \marginpar{\raggedleft\PrintDescribeMacro{#1}}}
%</docdefs>
%<dnidefs>% \DoNotIndex{\",\-,\#,\%,\&,\',\),\(,\*,\+,\-,\.,\,,\/,\<,\>,\@}
%<dnidefs>% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let,\catcode}
%<dnidefs>% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi,\advance}
%<dnidefs>% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup,\bgroup,\egroup.\begin,\end}
%<dnidefs>% \DoNotIndex{\newenvironment,\renewenvironment,\newcommand,\renewcommand}
%<dnidefs>% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
%<dnidefs>% \DoNotIndex{\space,\@empty,\special,\arabic,\meaning,\message,\MessageBreak,\medskip,\makebox,\parbox,\noexpand,\expandafter,\noindent,\indent}
%<dnidefs>% \DoNotIndex{\par,\@@par,\@@temp,\@@tmp,\@M,\@esphack,\@for,\@firstoffive,\@firstoftwo,\@fleqnfalse,\@fleqntrue}
%<dnidefs>% \DoNotIndex{\@gobble,\@gobbletwo,\@gobblethree,\@ifnextchar, \@ifpackagelater,\@ifpackageloaded,\@ifstar,\@ifundefined}
%<dnidefs>% \DoNotIndex{\@namedef,\@nameuse,\@ne,\@par,\@temp,\@tempa,\@tempcnta,\@tempcntb,\@tempdima,\@tempdimb,\@tfor}
%<dnidefs>% \DoNotIndex{\@tfor,\@temptokena,\@toodeep,\@whilenum,\@xarraycr,\@xtabularcr,\toks@}
%<dnidefs>% \DoNotIndex{\alph,\bfseries,\count,\count@,\count@ii,\cs,\closein,\closeout,\define@key,\protect}
%<dnidefs>% \DoNotIndex{\if,\i,\ifcase,\ifdimen,\ifnum,\ifinner,\ifnum,\ifodd,\ignorespaces,\immediate,\jobname}
%<dnidefs>% \DoNotIndex{\jsR,\jsT,\leavevmode,\linewidth,\newif,\newlength,\newcounter,\newcount,\newread,\newtoks,\newpage}
%<dnidefs>% \DoNotIndex{\setkeys,\setlength,\settowidth,\typeout,\tw@,\c@page,\z@,\z@skip,\@nil,\@makeatletter,\@makeatother}
%<dnidefs>% \DoNotIndex{\[,\],\{,\},\^,\|}
%<dnidefs>% \DoNotIndex{\\,\0,\1,\2,\3,\8}
%<dnidefs>% \DoNotIndex{\do,\dp,\ht,\wd,\hfill,\hfil,\hoffset,\hfuzz,\hss,\hsize,\hskip,\hspace,\hbox,
%<dnidefs>%       \vfill,\vfuzz,\vglue,\voffset,\vskip,\vspace,\vbox,\vtop}
%<dnidefs>% \DoNotIndex{\ifcase,\or,\value,\addtolength,\settowidth,\val,\nr}
%<dnidefs>% \DoNotIndex{\unskip,\marginpar,\mbox,\quad,\qquad}
%    \end{macrocode}
\endinput
