%% FILE:   ISUDOC in GA$TEX.PUB.STYLELIB
%% AUTHOR: George A. Christensen
%% DATE:   11 Jan 1988
%% DESCR:  Produced from REPORT.STY (version of May 13, 1986).
\typeout{Document Style `ISUDOC' June 1990. (Released 11 January 1988)}
\typeout{ }
\typeout{ }

\input report.sty  % most of this style is base on report

\input isudoc1\@ptsize.sty  % get point size dependent changes

%    ********************************
%    *         Local macros         *
%    ********************************

\input{texabbr.sty}       % input macros for TeX related names
\input{isuabbr.sty}       % input local abbreviations

% HYPHENATION
%
\hyphenation{en-vi-ron-ment para-graph}

% CHAPTERS & SECTIONS
%
% command redefined to be null in this style
%
\def\@chapapp{}

\def\appendix{\par
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \def\thechapter{\Alph{chapter}}
  \addtocontents{toc}{\protect\contentsline{part}{Appendices}{}}}

% \@sect modified to allow final optional argument on 'section' commands, for
% use in header when 'section' title too long.
\def\@sect#1#2#3#4#5#6[#7]#8{\@ifnextchar [
             {\@iisect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}}%
             {\@isect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}}}

\def\@iisect#1#2#3#4#5#6[#7]#8[#9]{\ifnum #2>\c@secnumdepth
     \def\@svsec{}\else
     \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname\hskip 1em }\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@
         \begingroup #6\relax
           \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
         \endgroup
         \csname #1mark\endcsname{#9} % Use last optional argument on
                                      % 'section' command for header
         \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth \else
                      \protect\numberline{\csname the#1\endcsname}\fi #7}
      \else
        \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname {#7}
               \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth \else
                      \protect\numberline{\csname the#1\endcsname}\fi #7}}
      \fi
     \@xsect{#5}}
\def\@isect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
     \def\@svsec{}\else
     \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname\hskip 1em }\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@
         \begingroup #6\relax
           \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
         \endgroup
         \csname #1mark\endcsname{#7} % Use 'section' title for header
         \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth \else
                   \protect\numberline{\csname the#1\endcsname}\fi #7}
      \else
        \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname{#7}
              \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth \else
                     \protect\numberline{\csname the#1\endcsname}\fi #7}}
      \fi
     \@xsect{#5}}

%  PARTS
%
\def\part{\cleardoublepage    % Start new righthand page
  \thispagestyle{empty}       % page style of part page is 'empty'
  \if@twocolumn
     \onecolumn
     \@tempswatrue
  \else
     \@tempswafalse
  \fi
  \hbox{}\vfil                % Add fil glue to center page vertically
%%  \bgroup  \centering       % BEGIN centering %% removed 19 Jan 88
  \secdef\@part\@spart}

\def\@endpart{\vfil\newpage  % End page will 1fil glue for vertical centering
%   \if@twoside               % IF twoside printing
%       \hbox{}               % THEN produce totally blank page
%       \thispagestyle{empty}
%       \newpage
%   \fi                       % FI
   \if@tempswa \twocolumn \fi}

% TABLE OF CONTENTS
%
\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{Contents\@mkboth{Contents}{Contents}}
 \@starttoc{toc}\if@restonecol\twocolumn\fi}

\def\l@part#1#2{\addpenalty{-\@highpenalty}
   \addvspace{2.25em plus 1pt}  % space above part line
   \begingroup
   \@tempdima 3em         % width of box holding part number, used by
     \parindent \z@ \rightskip \@pnumwidth             %% \numberline
     \parfillskip -\@pnumwidth
     {\Large \bf          % set line in \large boldface
     \leavevmode          % TeX command to enter horizontal mode.
     #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
     \nobreak             % Never break after part entry
    \global\@nobreaktrue                        %% Added 24 May 89 as
    \everypar{\global\@nobreakfalse\everypar{}}%% suggested by Jerry Leichter
   \endgroup}

%% First line of l@chapter changed 24 May 89, as suggested by Jerry Leichter.
%%
\def\l@chapter#1#2{\addpenalty{-\@highpenalty}
   \vskip 1.0em plus 1pt  % space above chapter line
   \@tempdima 2.1em       % width of box holding chapter number
   \begingroup
     \parindent \z@ \rightskip \@pnumwidth
     \parfillskip -\@pnumwidth
     \large\bf            % Boldface.
     \leavevmode          % TeX command to enter horizontal mode.
      \advance\leftskip\@tempdima  %% added 5 Feb 88 to conform to
      \hskip -\leftskip            %% 25 Jan 88 change to \numberline
     #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
     \penalty\@highpenalty %% added 24 May 89 as suggested by J. Leichter
   \endgroup}

%\def\l@chapter#1#2{\addpenalty{-\@highpenalty}
%   \vskip 4pt plus 2pt    % space above chapter line
%   {\bf \@dottedtocline{0}{0em}{1.5em}{\@chapapp#1}{#2}}}
\def\l@section{\@dottedtocline{1}{1.5em}{2.7em}}

\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{List of Figures\@mkboth
 {List Of Figures}{List Of Figures}}\@starttoc{lof}\if@restonecol
 \twocolumn\fi}

\def\l@figure{\@dottedtocline{1}{1.5em}{6em}}
\let\l@table\l@figure

\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{List of Tables\@mkboth
 {List Of Tables}{List Of Tables}}\@starttoc{lot}\if@restonecol
 \twocolumn\fi}

% FOOTNOTES
% Don't want footnote number resetting when start new chapter
%
\def\cl@chapter{}
\@addtoreset{section}{chapter}
\@addtoreset{table}{chapter}
\@addtoreset{figure}{chapter}
\@addtoreset{equation}{chapter}

% INDEX
%
\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
    \columnseprule \z@
    \columnsep 35pt
%    \twocolumn[\specialchapt{Index}]
    \specialchapt{Index}
    \@mkboth{INDEX}{INDEX}
    \twocolumn
    \parindent\z@
    \parskip\z@ plus .3pt\relax
    \let\item\@idxitem}

% BIBLIOGRAPHY
%
\def\thebibliography#1{\list
  {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus .07em}
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=1000\relax}

% HEADERS & FOOTERS
%
% Modify headings style to handle \specialchapt command
%\def\chaphd{\if@spechd \relax \else \@chapapp\ \thechapter. \ \fi}

\if@twoside
  \def\ps@headings{\let\@mkboth\markboth%
     \def\@oddfoot{\vbox{\hrule width \textwidth \vskip 3pt %
         \hbox to \textwidth{\hfil\thepage}}}
     \def\@evenfoot{\vbox{\hrule width \textwidth \vskip 3pt %
         \hbox to \textwidth{\thepage\hfil}}}%
     \def\@evenhead{\vbox{\hbox to \textwidth{\leftmark\hfil} \vskip 3pt %
         \hrule width \textwidth}}%
     \def\@oddhead{\vbox{\hbox to \textwidth{\hfil\rightmark} \vskip 3pt %
         \hrule width \textwidth }}%
     \def\chaptermark##1{\markboth {\ifnum \c@secnumdepth >\m@ne%
         \thechapter \ \fi {\sc ##1}}{}}%
     \def\sectionmark##1{\markright {\ifnum \c@secnumdepth >\z@%
         \thesection \ \fi ##1}}}
\else
   \def\ps@headings{\let\@mkboth\markboth%
       \def\@oddfoot{}\def\@evenfoot{}%
       \def\@oddhead{\hbox {}\sl \rightmark \hfil \rm\thepage}%
       \def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\m@ne%
           \thechapter. \ \fi ##1}}}}
\fi

% Definition of plain headings style - just page number in header
%\def\ps@plainheadings{\let\@mkboth\@gobbletwo%
%    \def\@oddhead{\hfil \rm\thepage}%
%    \def\@oddfoot{}\def\@evenfoot{}%
%    \def\@evenhead{\rm \thepage\hfil}%
%    \def\chaptermark##1{}\def\sectionmark##1{}}

\pagestyle{headings}      % headers page style

% SUPERSCRIPTS AND SUBSCRIPTS
% declaration which causes superscripts and subscripts to be output at normal
% text size
\def\bigscript{
  \scriptfont0=\textfont0
  \scriptscriptfont0=\textfont0
  \scriptfont1=\textfont1
  \scriptscriptfont1=\textfont1
  \scriptfont2=\textfont2
  \scriptscriptfont2=\textfont2
  \scriptfont3=\textfont3
  \scriptscriptfont3=\textfont3
  \def\xiipt{\textfont\z@\twlrm
    \scriptfont\z@\twlrm \scriptscriptfont\z@\twlrm
  \textfont\@ne\twlmi \scriptfont\@ne\twlmi \scriptscriptfont\@ne\twlmi
  \textfont\tw@\twlsy \scriptfont\tw@\twlsy \scriptscriptfont\tw@\twlsy
  \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  \def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
            \textfont\@ne\twlmi
            \textfont\tw@\twlsy \textfont\lyfam\twlly
            \@boldfalse}\@boldfalse
  \def\boldmath{\@ifundefined{twlmib}{\global\font\twlmib\@mbi\@magscale1\global
          \font\twlsyb\@mbsy \@magscale1\global\font
           \twllyb\@lasyb\@magscale1\relax\@addfontinfo\@xiipt
                {\def\boldmath{\everymath
                  {\mit}\everydisplay{\mit}\@prtct\@nomathbold
                  \textfont\@ne\twlmib \textfont\tw@\twlsyb
                  \textfont\lyfam\twllyb\@prtct\@boldtrue}}}{}\@xiipt\boldmath}%
  \def\prm{\fam\z@\twlrm}%
  \def\pit{\fam\itfam\twlit}\textfont\itfam\twlit \scriptfont\itfam\egtit
     \scriptscriptfont\itfam\sevit
  \def\psl{\fam\slfam\twlsl}\textfont\slfam\twlsl
       \scriptfont\slfam\tensl \scriptscriptfont\slfam\tensl
  \def\pbf{\fam\bffam\twlbf}\textfont\bffam\twlbf
     \scriptfont\bffam\ninbf \scriptscriptfont\bffam\ninbf
  \def\ptt{\fam\ttfam\twltt}\textfont\ttfam\twltt
     \scriptfont\ttfam\nintt \scriptscriptfont\ttfam\nintt
  \def\psf{\fam\sffam\twlsf}\textfont\sffam\twlsf
      \scriptfont\sffam\tensf \scriptscriptfont\sffam\tensf
  \def\psc{\@getfont\psc\scfam\@xiipt{\@mcsc\@magscale1}}%
  \def\ly{\fam\lyfam\twlly}\textfont\lyfam\twlly
     \scriptfont\lyfam\egtly \scriptscriptfont\lyfam\sixly
   \@setstrut \rm}
} %end bigscript

% SPECIAL CHAPTER COMMAND
% special chapter heading command for outputting a chapter title without
% 'Chapter' and the number. Unlike \chapter* the title is included in the toc.
\def\specialchapt#1{\clearpage \ifodd\c@page \hbox{}\clearpage\fi
  \typeout{#1}
  \thispagestyle{empty}
  \@mkboth{#1}{#1}
  \global\@topnum\z@
  \vspace*{50pt}{\raggedleft \rightskip 0.5in \Huge\bf #1\clearpage}
  \addcontentsline{toc}{chapter}{#1}}

% TABLE AND FIGURE CAPTIONS
\input{isucaptn.sty}

% TITLEPAGE
%  The titlepage environment starts and ends a page, and inhibits page numbers.
%  In two-column style, it still makes a one-column page.
\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
    \else \newpage\fi
    \pagestyle{empty}
    \pagenumbering{roman}}

\def\endtitlepage{\clearpage
       \pagestyle{headings}}   % set page marking style

\def\maketitle{\begin{titlepage}
  \vspace*{60pt}
  \begin{center}
  {\LARGE\bf \@title \par} \vskip 3em {\large\bf \lineskip .75em
  \begin{tabular}[t]{c}\@author
  \end{tabular}\par}
  \vskip 1.5em {\bf\@date \par}
  \end{center}
  \vskip 12 pt
  \vfill
  \hrule height .5pt width 6in
  \vspace{2 ex}
  \centerline{\bf Disclaimer}

  \@disclaim
  \@notice
  \null
  \end{titlepage}
  \setcounter{footnote}{0} \let\thanks\relax
  \gdef\@author{}\gdef\@title{}\let\maketitle\relax}

\newcount\@docnum \@docnum=0
\def\docnum#1{\@docnum=#1}
\def\@disclaim{
  Although an attempt has been made to verify the accuracy
  of the information contained in this document, IESG
  neither guarantees the validity of this information nor
  assumes any liability for results obtained based on this
  information.  }
\def\@notice{\par%
  \smallskip
  \centerline{Copyright \copyright~\number\year~ by U.C. Berkeley, Iowa
     State University}
  \centerline{and Massachusetts Institute of Technology (MIT)}
  \smallskip

  Permission to reproduce all or part of this document for
  noncommercial purposes is granted, provided U.C. Berkeley, Iowa State
  University, and MIT are given credit.
  To copy otherwise requires specific permission.}

% For numbering examples
%\newcount\examnum \examnum=1
%\def\example#1{\par
%   \noindent{\bf Example \thechapter.\arabic{section}.%
%      \number\examnum\ #1}\rm\normalsize \par
%   \advance\examnum by 1}

\def\half{{\tiny $1\over2$}}
\def\quarter{{\tiny $1\over4$}}


% macros for defining doc and urm names

\def\DOC#1#2{\expandafter\gdef\csname doc#1\endcsname{{\it #2\/} (Doc.~#1)}}
\def\doc#1{\@ifundefined{doc#1}{{\it Doc.~#1}}{\csname doc#1\endcsname}}
\def\SDOC#1#2{\expandafter\gdef\csname sdoc#1\endcsname{{\it #2\/} (Doc.~#1)}}
\def\sdoc#1{\@ifundefined{sdoc#1}{{\it Doc.~#1}}{\csname sdoc#1\endcsname}}

\def\URM#1#2{\expandafter\gdef\csname URM#1\endcsname{{\it URM~#1\/} ``#2''}}
\def\urm#1{\@ifundefined{URM#1}{{\it URM~#1}}{\csname URM#1\endcsname}}
\def\surm#1{{\it URM~#1}}

