% local.sty
% a set of useful common hacks by Sebastian Rahtz, 1988-1993
% add to these for your site
%------------------------------------
\def\filename{local.sty}
\def\filedate{25.2.93}
\ProvidesPackage{local}
%
% redefine bits of article to make it less aggressive
%
\setcounter{secnumdepth}{3}
\def\thepart{\Roman{part}} \def\thesection {\arabic{section}}
\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3ex \@plus -1ex \@minus -.2ex}%
                                   {2ex \@plus.2ex}%
                                   {\reset@font\Large\bfseries\sffamily}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-2.75ex\@plus -1ex \@minus- .2ex}%
                                     {1ex \@plus .2ex}%
                                     {\reset@font\large\sffamily}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-2.75ex\@plus -1ex \@minus -.2ex}%
                                     {1ex \@plus .2ex}%
                                     {\reset@font\normalsize\sffamily}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {2.75ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\reset@font\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                       {2.75ex \@plus1ex \@minus .2ex}%
                                       {-1em}%
                                      {\reset@font\normalsize\bfseries}}

\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
\@tempdima 1.5em \begingroup
 \parindent \z@ \rightskip \@pnumwidth 
 \parfillskip -\@pnumwidth 
 \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
 \endgroup}
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\oddsidemargin=0.47in
\evensidemargin=0.47in
\headsep=14.5mm
\topmargin=-0.35in
\textheight 8.5 true in  % Height of text (including footnotes and figures)
\textwidth 5.35 true in
\def\address#1{\gdef\@address{#1}}
\address{}
\if@twoside
    \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\thepage\hfil\scshape\leftmark}%
      \def\@oddhead{{\scshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
      \def\sectionmark##1{%
        \markboth {\lowercase{\ifnum \c@secnumdepth >\z@
            \thesection.\hskip 1em\relax\fi
            ##1}}{}}%
      \def\subsectionmark##1{%
        \markright {\ifnum \c@secnumdepth >\@ne
            \thesubsection\hskip 1em\relax \fi
            \lowercase{##1}}}}
\else
    \def\ps@headings{%
      \let\@oddfoot\@empty
      \def\@oddhead{{\scshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
      \def\sectionmark##1{%
        \markright {\lowercase{\ifnum \c@secnumdepth >\m@ne
            \thesection\hskip 1em\relax \fi
            ##1}}}}
\fi
\def\@listI{\setlength\leftmargin{\leftmargini}
            \setlength\parsep {2\p@ \@plus1\p@ \@minus1\p@}%
            \setlength\topsep {4\p@ \@plus1\p@ \@minus1\p@}%
            \setlength\itemsep{2\p@ \@plus1\p@ \@minus1\p@}}
\let\@listi\@listI
\@listi

\def\thebibliography#1{\section*{Bibliography\@mkboth
  {{\sc Bibliography}}{{\sc Bibliography}}}\list
  {\arabic{enumi}}{\settowidth\labelwidth{0}\leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumi}}
    \addcontentsline{toc}{section}{Bibliography}
    \def\newblock{\hskip .11em plus .33em minus -.07em}
    \sloppy
    \sfcode`\.=1000\relax}
%
% alltt, from Lamport
\def\docspecials{\do\ \do\$\do\&%
  \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
\def\alltt{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
\leftskip\@totalleftmargin\rightskip\z@
\parindent\z@\parfillskip\@flushglue\parskip\z@
\@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
\obeylines \tt \catcode``=13 \@noligs \let\do\@makeother \docspecials
 \frenchspacing\@vobeyspaces}
\let\endalltt=\endtrivlist
%
% new list environments
%
% catalogue forces the first line to be on a line by itself
\newenvironment{catalogue}{\begin{list}{}%
{\def\makelabel##1{%
                         \hbox to \labelwidth{%
                                \vbox{%
                                    \hbox to 0pt{{\bf ##1}\hss}%
                                    \hbox to 0pt{\hfil}}%
                            \hfil}}}}%
{\end{list}}
%
% description list, with specified width
\newenvironment{tablist}[1]{\begin{list}{}%
{\labelwidth=#1
\leftmargin=#1
\let\makelabel\descriptionlabel}%
}{\end{list}}
%
% wider description list
\newenvironment{widedesc}{\begin{list}{}%
{\labelwidth=1in\leftmargin=1.1in\let\makelabel\descriptionlabel}%
}{\end{list}}

% Names for TeX products
% September 9, 1988:  modified by Ted Nieland, Systems Research Laboratories
%   Now includes definitions for PiCTeX and TeXsis.  Definitions now in /def
%   form rather than in /newcommand.
%
%
\font\mf=logo10
\hyphenchar\mf=-1
% Metafont from the METAFONT Documentation
\def\METAFONT{{\mf METAFONT}}
% BIBTeX from the BiBTeX Documentation
\def\BIBTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
% SliTeX from the SliTeX Documentation
\def\SLiTeX{S\kern-.065em L\kern-.18em\raise.32ex\hbox{i}\kern-.03em\TeX}
% AMSTeX from the AMSTeX Files 
\def\AmSTeX{{$\cal A$\kern-.1667em\lower.5ex\hbox{$\cal M$}\kern-.125em
     $\cal S$-\TeX}}
% PiCTeX Documentation from the PiCTeX Files
\def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
\def\PiCTeX{\PiC\kern-.11em\TeX}
%
\def\pictex{\PiCTeX}
\def\AMSTeX{\AmSTeX}
\def\AMSTEX{\AmSTeX}
\def\amstex{\AmSTeX}
\def\BibTeX{\BIBTeX}
\def\BiBTeX{\BIBTeX}
\def\bibtex{\BIBTeX}
\def\SliTeX{\SLiTeX}
\def\slitex{\SLiTeX}
\def\Metafont{\METAFONT}
\def\metafont{\METAFONT}
\def\MF{\METAFONT}
\def\latex{\LaTeX}
% TeXsis from the TeXsis documentation 
\def\TeXsis{\TeX sis}
\def\PS{{\sc PostScript}}
\def\Unix{{\sc Unix}}
\def\unix{{\sc Unix}}
\def\WEB{{\mf WEB}}

% acronyms
\def\acronym#1#2{\expandafter\def\csname#1\endcsname%
{#2 (#1)\expandafter\def\csname#1\endcsname{#1}}}%

% new environment for a 'screen shot'
% set in cmtt & 'alltt', and inset by 0.5in and boxed
%
% spqr oct 2 88
%
\newcount\screenchars
\newlength\screenwidth
\newlength\letterwidth
\newbox\screenbox
\newenvironment{screen}{%
\sbox{\screenbox}{{\screenfont m}}
\screenwidth=\wd\screenbox
\letterwidth=\screenwidth
\multiply\screenwidth by \screenchars
\advance\screenwidth by 2\letterwidth
\vspace{\topsep}
\setbox\screenbox=\vtop\bgroup
\begin{alltt}\screenfont%
}{%
\end{alltt}
\egroup%
\hspace{\rightmargin}\framebox[\screenwidth][l]{\rule{\letterwidth}{0em}%
\usebox{\screenbox}}%
\vspace{\topsep}%
}
% defaults
\screenchars=80
\font\screenfont cmtt8
%
\newcommand{\Cmd}[1]{{\ttfamily\upshape\char'134#1}}
%
\def\arraybackslash{\let\\=\@arraycr}
%
\RequirePackage{array}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\endinput