%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "David M. Jones",
%%%     version         = "2.00",
%%%     date            = "27 October 1993",
%%%     time            = "15:41:13 EDT",
%%%     filename        = "hilbert.sty",
%%%     address         = "MIT Laboratory for Computer Science
%%%                        Room NE43-316
%%%                        545 Technology Square
%%%                        Cambridge, MA 02139
%%%                        USA",
%%%     telephone       = "(617) 253-5936",
%%%     FAX             = "(617) 253-3480",
%%%     checksum        = "36764 2193 6699 71318",
%%%     email           = "dmjones@theory.lcs.mit.edu (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "latex, amslatex, ams-latex",
%%%     supported       = "yes",
%%%     docstring       = "This is the AMS-\LaTeX{} document style
%%%                        used to typeset {\em Hilbert's Tenth
%%%                        Problem\/} by Yuri Matijasevich (MIT Press,
%%%                        1993).  It is based upon the AMS-\LaTeX{}
%%%                        amsbook style (v1.1b), but has been
%%%                        liberally modified to meet MIT Press
%%%                        specifications.  Much of the documentation
%%%                        has been lifted from the \LaTeX{} file
%%%                        book.doc, v. 2.09, (13 November 1989).
%%%
%%%                        In addition to AMS-\LaTeX, this file
%%%                        requires the style file index.sty,
%%%                        available via anonymous ftp from
%%%                        theory.lcs.mit.edu in the directory
%%%                        pub/tex.
%%%
%%%                        {\em Caveat emptor\/}: This style was
%%%                        written for the purpose of typesetting a
%%%                        specific book and, to some extent, is
%%%                        specialized for that book.  For example,
%%%                        parts of the style file have not been
%%%                        brought into conformity with the MIT Press
%%%                        style guidelines because they were
%%%                        unnecessary for typesetting {\em Hilbert's
%%%                        Tenth Problem}.  Some of these problems may
%%%                        be rectified in the future.
%%%
%%%                        This and related files are available via
%%%                        anonymous ftp from theory.lcs.mit.edu in
%%%                        the directory pub/hilbert10.  See the file
%%%                        ``README'' in that directory for a list and
%%%                        description of what is available.
%%%
%%%                        The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%  }
%%% ====================================================================

\expandafter\ifx\csname hilbert.sty\endcsname\relax
  \expandafter\gdef\csname hilbert.sty\endcsname{}
\else \message{already loaded}\endinput\fi

\def\filename{hilbert.sty}

\def\fileversion{2.00}
\def\filedate{14 October 1993}

%%% end of file header

\immediate\write16{%
AMS-LaTeX document style `HILBERT' (\fileversion, \filedate)}
\input amstex.sty

%    ****************************************
%    *             MISCELLANEOUS            *
%    ****************************************
%

\def\@plus{plus}

\def\@string{\expandafter\@gobble\string}

\def\@oparg#1[#2]{\@ifnextchar[{#1}{#1[#2]}}

\long\def\@ifempty#1{%
 \expandafter\ifx\@car#1@\@nil @\@empty
  \expandafter\@leftmark\else\expandafter\@rightmark\fi}

\long\def\@ifnotempty#1{\@ifempty{#1}{}}

\long\def\@leftmark#1#2{#1}

\long\def\@rightmark#1#2{#2}

\def\@ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax
        \expandafter\@leftmark
        \else\expandafter\@rightmark\fi}

\def\uppercasetext@#1{%
   {\spaceskip1.3\fontdimen2\the\font plus1.3\fontdimen3\the\font
    \upchars@\skipmath@#1$\skipmath@$}}

\def\upchars@{\def\ss{SS}\let\i=I\let\j=J\let\ae\AE\let\oe\OE
  \let\o\O\let\aa\AA\let\l\L}

\def\skipmath@#1$#2${\skipmath@b#1\(\skipmath@b\)%
  \ifx\skipmath@#2\else$#2$\expandafter\skipmath@\fi}

\def\skipmath@b#1\(#2\){\uppercase{#1}%
  \ifx\skipmath@b#2\else\(#2\)\expandafter\skipmath@b\fi}

\def\today{\ifcase\month\or
 January\or February\or March\or April\or May\or June\or
 July\or August\or September\or October\or November\or December\fi
 \space\number\day, \number\year}

\def\LaTeX{%
    L\raise.42ex\hbox{\kern-.33em\protect\scriptsize A\kern-.15em}\TeX
}

\def\frenchspacing{\count@ 1001 \sfcode`\.\count@ \sfcode`\?\count@
  \sfcode`\!\count@ \sfcode`\:\count@ \sfcode`\;\count@
  \sfcode`\,\count@}

\def\sloppy{\tolerance9999\relax}

\def\rom#1{\leavevmode\skip@\lastskip\unskip\/%
        \ifdim\skip@=\z@\else\hskip\skip@\fi
   {\normalshape#1}}

\atdef@-{\let\next-%%
  \DN@{\ifx\next-%%
    \def\next-{\setboxz@h{-}\unhbox\z@\FN@\next@}%%
    \expandafter\next \else\nobreak\fi}%%
  \next@-}%%

%% We redefine \cleardoublepage so that any entirely blank pages
%% inserted by \cleardoublepage will not contain any page headers or
%% footers, unless we are in draft mode.

\def\cleardoublepage{%
    \clearpage
    \if@twoside
        \ifodd\c@page\else
            \hbox{}%
            \if@draft\else\thispagestyle{empty}\fi
            \newpage
            \if@twocolumn\hbox{}\newpage\fi
        \fi
    \fi
}

%% \sbreak is used like \break inside of sectioning commands.  When
%% typesetting the table of contents, it's disabled, so it only
%% affects text, not the TOC.  It's an ugly kludge, but it's
%% occasionally useful.

\let\sbreak\break

%          ****************************************
%          *              INDEXING                *
%          ****************************************
%

%% We need multiple indexes, so we'll use index.sty.  index.sty will
%% complain that \indexname isn't defined if we load it here, but
%% that's ok.  The rest of this file assumes that index.sty has been
%% loaded (for example, in addition to using \newindex below, we also
%% use the macro \@nearverbatim in our redefinition of \@sect), so
%% there's no easy way to excise index.sty from this file.
%%
%% Later we'll redefine \@starttoc and \theindex, both of which are
%% redefined by index.sty.

\input index.sty

%          ****************************************
%          *      CROSS REFERENCING MACROS        *
%          ****************************************
%

\def\ref#1{\@ifundefined{r@#1}{{\normalshape\bf ??}\iffirstchoice@
  \@warning{Reference `#1' on page \thepage \space undefined}\fi}%
  {\rom{\expandafter\expandafter\expandafter
    \@car\csname r@#1\endcsname\@nil\null}}}

\def\eqref#1{\rom{\tagform@{\ref{#1}}}}

% CHOOSING THE TYPE SIZE:
%
% MIT Press specifies a 10 pt type size, so we disable the 11pt and 12pt
% style options.

% \def\@ptsize{0}

\@namedef{ds@11pt}{\typeout{Sorry---the `11pt' option
      is not available in the HILBERT documentstyle.}}

\@namedef{ds@12pt}{\typeout{Sorry---the `12pt' option
      is not available in the HILBERT documentstyle.}}

%  Books use two-sided printing.
%
\@twosidetrue     %  Defines twoside option.
\@mparswitchtrue  %  Marginpars go on outside of page.

\@namedef{ds@twoside}{\@empty}

%  draft option
%
% \overfullrule = 0pt       % Default is don't mark overfull hboxes.

\newif\if@draft
\@draftfalse

\def\ds@draft{%
    \@drafttrue       % used in \cleardoublepage
    \overfullrule 5\p@% Causes overfull hboxes to be marked.
}

% The twocolumn and openbib options aren't available.  The fleqn style
% is the default, but is implemented elsewhere.

\@namedef{ds@twocolumn}{\typeout{Sorry---the `twocolumn' option
      is not available in the HILBERT documentstyle.}}

\@namedef{ds@openbib}{\typeout{Sorry---the `openbib' option
      is not available in the HILBERT documentstyle.}}

\@namedef{ds@fleqn}{\typeout{Sorry---the `fleqn' option
      is meaningless in the HILBERT documentstyle.}}

% The \@options command causes the execution of every command \ds@FOO
% which is defined and for which the user typed the FOO option in his
% \documentstyle command.  For every option BAR he typed for which
% \ds@BAR is not defined, the file BAR.sty will be read after the
% present (main) .STY file is executed.

\@options

% We want the righttag and margid (maybe) options in force.

\input{margid.sty}

\input{righttag.sty}

% We can now release the memory held by the documentstyle switches.

\let\ds@twocolumn\relax       \let\ds@openbib\relax
\let\ds@fleqn\relax           \let\ds@draft\relax
\expandafter\let\csname ds@11pt\endcsname\relax
\expandafter\let\csname ds@12pt\endcsname\relax

%  ****************************************
%  *               FONTS                  *
%  ****************************************
%

\font\chapnum=cmr12 at36pt

\def\defaultfont{\family\default@family \series\default@series
  \shape\default@shape \selectfont}

\lineskip=1pt
\normallineskip=1pt
\normallineskiplimit=1pt
\def\baselinestretch{1}

% Each size-changing command \SIZE executes the command
%        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
% where:
%   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual
%                  value will be \baselinestretch * BASELINESKIP.)
%
%  \FONTSIZE     = Name of font-size command.  The currently available
%                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
%                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
%                  \xivpt, \xviipt, \xxpt, \xxvpt.
%  \@FONTSIZE    = The same as the font-size command except with an
%                  '@' in front---e.g., if \FONTSIZE = \xivpt then
%                  \@FONTSIZE = \@xivpt.
%
% For reasons of efficiency that needn't concern the designer, the
% document style defines \@normalsize instead of \normalsize .  This
% is done only for \normalsize, not for any other size-changing
% commands.

\def\@normalsize{\@setsize\normalsize{13pt}\xpt\@xpt
\abovedisplayskip 7pt plus2pt minus2pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip  \abovedisplayskip
\belowdisplayshortskip  \abovedisplayskip
\let\@listi\@listI}   % Setting of \@listi added 9 Jun 87

%% Should \abovedisplayskip change for \small and \footnotesize?

\def\small{\@setsize\small{11pt}\ixpt\@ixpt
\abovedisplayskip 7pt plus2pt minus2pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \abovedisplayskip
\belowdisplayshortskip \abovedisplayskip
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
\itemsep \parsep}}

\def\footnotesize{\@setsize\footnotesize{9pt}\viiipt\@viiipt
\abovedisplayskip 7pt plus2pt minus2pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \abovedisplayskip
\belowdisplayshortskip \abovedisplayskip
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
\itemsep \parsep}}

\def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
\def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
\def\large{\@setsize\large{13pt}\xipt\@xipt}
\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}

\normalsize  % Choose the normalsize font.

%  ****************************************
%  *            PAGE LAYOUT               *
%  ****************************************
%
% All margin dimensions measured from a point one inch from top and side
% of page.

% SIDE MARGINS:
%\oddsidemargin .5in        % Left margin on odd-numbered pages.
%\evensidemargin 1.5in      % Left margin on even-numbered pages.

\marginparwidth 90pt    %   Width of marginal notes.
\marginparsep 11pt      % Horizontal space between outer margin and
                        % marginal note


% VERTICAL SPACING:
                  % Top of page:
\topmargin=4pc    %    Nominal distance from top of page to top of
                  %    box containing running head.
\headheight 9pt   %    Height of box containing running head.
\headsep   4.25pc %    Space between running head and text.
\topskip = 10pt   %    '\baselineskip' for first line of page.
                  % Bottom of page:
\footskip 0pt     %    Distance from baseline of box containing foot
                  %    to baseline of last line of text.  (We
                  %    don't use footers in this style.)

% DIMENSION OF TEXT:
% 24 Jun 86: changed to explicitly compute \textheight to avoid
% roundoff.  The value of the multiplier was calculated as the floor
% of the old \textheight minus \topskip, divided by \baselineskip for
% \normalsize.  The old value of \textheight was 504pt.  \textheight
% is the height of text (including footnotes and figures, excluding
% running head and foot).

\textheight = 36\baselineskip
\advance\textheight by \topskip

\textwidth 30pc          % Width of text line.
                         % For two-column mode:
\columnsep 1pc           %    Space between columns
\columnseprule 0pt       %    Width of rule between columns.

%%  % Now we calculate the values of \oddsidemargin, \evensidemargin and
%%  % \topmargin that will center the image on the paper.
%%
%%  \oddsidemargin=8.5 true in % standard U.S. paper width
%%  \advance\oddsidemargin by -\textwidth
%%  \oddsidemargin=.5\oddsidemargin
%%  \ifdim\oddsidemargin < .5 true in
%%    \oddsidemargin = .5 true in \fi
%%  \advance\oddsidemargin by -1 true in
%%
%%  \evensidemargin=\oddsidemargin

% Now we calculate the values of \oddsidemargin, \evensidemargin and
% \hoffset that will center the image on the paper.

%%  \oddsidemargin=7 true in % width of final page
%%  \advance\oddsidemargin by -\textwidth
%%  \oddsidemargin=.5\oddsidemargin

\dimen@=7 true in
\advance\dimen@ by -\textwidth
\oddsidemargin=.5\dimen@

\evensidemargin=\oddsidemargin

%%  \dimen@ = 8.5 true in
%%  \advance\dimen@ by -\textwidth
%%  \dimen@=.5\dimen@
%%  \advance\dimen@ by -\oddsidemargin
%%  \advance\dimen@ by -1in
%%  \hoffset=\dimen@

%%  \topmargin=11 true in % standard U.S. paper width
%%  \advance\topmargin by -\textheight
%%  \advance\topmargin by -\headheight
%%  \advance\topmargin by -\headsep
%%  \advance\topmargin by -\footheight
%%  \advance\topmargin by -\footskip
%%  \topmargin=.5\topmargin
%%  \ifdim\topmargin<.5 true in
%%    \topmargin=.5 true in \fi
%%  \advance\topmargin by -1 true in

% A \raggedbottom command causes 'ragged bottom' pages: pages set to
% natural height instead of being stretched to exactly \textheight.

% FOOTNOTES:

\setbox0=\hbox{\footnotesize M$^1$}
\footnotesep=\ht0     % Height of strut placed at the beginning of every
                      % footnote = height of normal \footnotesize strut,
                      % so no extra space between footnotes.

\skip\footins=12pt plus11pt     % Space between last line of text and
                                % top of first footnote.

% FLOATS: (a float is something like a figure or table)
%
%  FOR FLOATS ON A TEXT PAGE:
%
%    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:

\floatsep 6pt plus 9pt          % Space between adjacent floats moved
                                % to top or bottom of text page.
\textfloatsep 6pt plus9pt       % Space between main text and floats
                                % at top or bottom of page.
\intextsep 6pt plus9pt          % Space between in-text figures and
                                % text.
\@maxsep 6pt                    % The maximum of \floatsep,
                                % \textfloatsep and \intextsep (minus
                                % the stretch and shrink).

%    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
\dblfloatsep 6pt plus 9pt       % Same as \floatsep for double-column
                                % figures in two-column mode.
\dbltextfloatsep 12pt plus 9pt  % \textfloatsep for double-column
                                % floats.
\@dblmaxsep 12pt                % The maximum of \dblfloatsep and
                                % \dbltexfloatsep.

%  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
%    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
\@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must
                         % be 0pt plus ...)
\@fpsep 8pt plus 2fil    % Space between floats on float page/column.
\@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column.
                         % (Must be 0pt plus ... )

%   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
\@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt
                         % plus ...)
\@dblfpsep 8pt plus 2fil % Space between floats on float page.
\@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
                         % 0pt plus ... )
% MARGINAL NOTES:
%
\marginparpush 5pt       % Minimum vertical separation between two
                         % marginal notes.

%  ****************************************
%  *           PARAGRAPHING               *
%  ****************************************
%
\parskip=0pt                % Extra vertical space between paragraphs.
\newdimen\normalparindent
\normalparindent=1em

\parindent=\normalparindent     % Width of paragraph indentation.

%\topsep 8pt plus 2pt minus 4pt    % Extra vertical space, in addition
                                   % to \parskip, added above and
                                   % below list and paragraphing
                                   % environments.
\partopsep 0pt                     % Extra vertical space, in addition
                                   % to \parskip and \topsep, added
                                   % when user leaves blank line
                                   % before environment.

%\itemsep 4pt plus 2pt minus 1pt   % Extra vertical space, in addition
                                   % to \parskip, added between list
                                   % items.
% See \@listI for values of \topsep and \itemsep
% (Change made 9 Jun 87)

% The following page-breaking penalties are defined

\@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
\@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
\@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]

\@beginparpenalty -\@lowpenalty %Before a list or paragraph environment.
\@endparpenalty   -\@lowpenalty %After a list or paragraph environment.
\@itempenalty     -\@lowpenalty %Between list items.

% \clubpenalty         % 'Club line'  at bottom of page.
% \widowpenalty        % 'Widow line' at top of page.
% \displaywidowpenalty % Math display widow line.
% \predisplaypenalty   % Breaking before a math display.
% \postdisplaypenalty  % Breaking after a math display.
% \interlinepenalty    % Breaking at a line within a paragraph.
% \brokenpenalty       % Breaking after a hyphenated line.

%    ****************************************
%    *        CHAPTERS AND SECTIONS         *
%    ****************************************
%
%
% DEFINE COUNTERS:
%
% \newcounter{NEWCTR}[OLDCTR] : Defines NEWCTR to be a counter, which
%                               is reset to zero when counter OLDCTR
%                               is stepped.  Counter OLDCTR must
%                               already be defined.

\newcounter{part}
\newcounter{chapter}
\newcounter{section}[chapter]
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]

% For any counter CTR, \theCTR is a macro that defines the printed
% version of counter CTR.  It is defined in terms of the following
% macros:
%
%  \arabic{COUNTER} : The value of COUNTER printed as an arabic numeral.
%  \roman{COUNTER}  : Its value printed as a lower-case roman numberal.
%  \Roman{COUNTER}  : Its value printed as an upper-case roman numberal.
%  \alph{COUNTER}   : Value of COUNTER printed as a lower-case letter:
%                         1 = a, 2 = b, etc.
%  \Alph{COUNTER}   : Value of COUNTER printed as an upper-case letter:
%                           1 = A, 2 = B, etc.
%

\def\thepart{\@Roman\c@part}
\def\thechapter{\@arabic\c@chapter}
\def\thesection{\thechapter.\@arabic\c@section}
\def\thesubsection{\thesection.\@arabic\c@subsection}
\def\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}

% \def\p@section{\@arabic\c@chapter.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                        PART                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%  The \part command has NOT been modified to conform to the MIT
%%  Press style.

\def\partname{Part}

\def\part{\cleardoublepage \thispagestyle{empty}%
  \null\vfil  \markboth{}{}\secdef\@part\@spart}

\def\@part[#1]#2{%
  \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}%
    \addcontentsline{toc}{part}{\partname\ \thepart\penalty-\@M#1}%
  \else
    \addcontentsline{toc}{part}{#1}\fi
  \begingroup\centering\defaultfont\bf\large
  \ifnum \c@secnumdepth >-2\relax
       \partname\ \thepart \vskip 20\p@ \fi
  #1\vfil\vfil\endgroup \newpage}

\def\@spart#1{\addcontentsline{toc}{part}{#1}%
  \begingroup\defaultfont\centering\bf\large
  #1\vfil\vfil\endgroup \newpage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                      CHAPTER                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \chaptername is initially defined to be 'Chapter'.  The \appendix
% command redefines it to be 'Appendix'.
%

\def\chaptername{Chapter}

% \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
%

\def\@makechapterhead#1{%
    \@topofpage{%
        \begingroup
            \defaultfont\Large\raggedright
            \parindent=0pt
            \ifnum\c@secnumdepth>\m@ne
                \leavevmode {\chapnum\thechapter}%
                \hskip6pt\relax
            \fi
            \bf#1\par
        \endgroup
    }
}

% \@makeschapterhead {TEXT} : Makes the heading for the \chapter*
% command.

\def\@makeschapterhead#1{%
    \@topofpage{%
        \begingroup
            \defaultfont\Large\raggedright
            \parindent=0pt
            \bf#1\par
        \endgroup
    }
}

% \secdef{UNSTARCMDS}{STARCMDS} :
%    When defining a \chapter or \section command without using
%    \@startsection, you can use \secdef as follows:
%       \def\chapter { ... \secdef \CMDA \CMDB }
%       \def\CMDA[#1]#2{ ... }  % Command to define \chapter[...]{...}
%       \def\CMDB#1{ ... }      % Command to define \chapter*{...}

\def\chapter{%
    \cleardoublepage
    \thispagestyle{empty}%
    \global\@topnum\z@
    \@afterindentfalse
    \secdef\@chapter\@schapter
}

\def\@chapter[#1]#2{%
    \refstepcounter{\@string\chapter}%
    \typeout{\chaptername\space\thechapter}%
    \addcontentsline{toc}{\@string\chapter}{%
        \ifnum \c@secnumdepth >\m@ne \protect\numberline{\thechapter}\fi
        #1%
    }%
    \chaptermark{%
        \ifnum\c@secnumdepth >\m@ne \thechapter\enskip \fi
        \ignorespaces#1\unskip
    }%
    \addtocontents{lof}{\protect\addvspace{10\p@}}%
    \addtocontents{lot}{\protect\addvspace{10\p@}}%
    \@makechapterhead{#2}%
    \@afterheading
}

\def\@schapter#1{%
    \typeout{#1}%
    \addcontentsline{toc}{\@string\chapter}{#1}%
    \chaptermark{\ignorespaces#1\unskip}%
    \addtocontents{lof}{\protect\addvspace{10\p@}}%
    \addtocontents{lot}{\protect\addvspace{10\p@}}%
    \@makeschapterhead{#1}%
    \@afterheading
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                    UNNUMBERED                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% The \unnumbered command is a hybrid of the \chapter* and \section*
%% commands.  In the table of contents, it appears like a section with
%% no section number.  In the text, has much the same effect as a
%% \chapter* command, except that the header is typeset in a smaller
%% font.  It resets all counters subsidiary to \c@chapter.

\def\@xunnumbered#1{\@topofpage{\defaultfont\large\bf\noindent#1}}

\def\unnumbered#1{\cleardoublepage
    \@xunnumbered{#1}%
    \addcontentsline{toc}{section}{\protect\numberline{}#1}%
    \chaptermark{\ignorespaces#1\unskip}%
    {\let\@elt\@stpelt \cl@chapter}%
    \@afterindentfalse
    \@afterheading
}

\def\xunnumbered#1{\clearpage
    \@xunnumbered{#1}%
    \addcontentsline{toc}{section}{\protect\numberline{}#1}%
    \chaptermark{\ignorespaces#1\unskip}%
    {\let\@elt\@stpelt \cl@chapter}%
    \@afterindentfalse
    \@afterheading
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                     SECTIONS                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
%            optional * [ALTHEADING]{HEADING}
%    Generic command to start a section.
%    NAME       : e.g., 'subsection'
%    LEVEL      : a number, denoting depth of section -- e.g.,
%                 chapter=1, section = 2, etc.  A section number will
%                 be printed if and only if LEVEL < or = the value of
%                 the secnumdepth counter.
%    INDENT     : Indentation of heading from left margin
%    BEFORESKIP : Absolute value = skip to leave above the heading.
%                 If negative, then paragraph indent of text following
%                 heading is suppressed.
%    AFTERSKIP  : if positive, then skip to leave below heading,
%                       else - skip to leave to right of run-in heading.
%    STYLE      : commands to set style
%  If '*' missing, then increments the counter.  If it is present, then
%  there should be no [ALTHEADING] argument.  A sectioning command
%  is normally defined to \@startsection + its first six arguments.

\def\section{\@startsection{\@string\section}%
        1\z@{-16\p@\@plus-12\p@}{13\p@}%
        {\large\defaultfont\bf\raggedright}}

\def\subsection{\@startsection{\@string\subsection}%
        2\z@{-7\p@\@plus-9\p@}{7pt}%
        {\normalsize\defaultfont\bf\raggedright}}

\def\subsubsection{\@startsection{\@string\subsubsection}%
        3\z@{7\p@\@plus9\p@}{-\z@}%
        {\normalsize\defaultfont\bf}}

\def\paragraph{\@startsection{\@string\paragraph}%
        4\z@{7\p@\@plus9\p@}{-1em}%
        {\defaultfont\bf}}


\def\@startsection#1#2#3#4#5#6{%
    \if@noskipsec \leavevmode \fi
    \par
    \@tempskipa #4\relax
    \@afterindenttrue
    \ifdim \@tempskipa <\z@
        \@tempskipa -\@tempskipa \@afterindentfalse
    \fi
    \if@nobreak \everypar{}\else
        \addpenalty\@secpenalty
        \addvspace\@tempskipa
    \fi
    \@ifstar{\@dblarg{\@sect{#1}{\@m}{#3}{#4}{#5}{#6}}}%
            {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%
}

\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
    %% Let's have *-commands reset subsidiary counters.
    \ifnum #2=\@m
        {\let\@elt\@stpelt \csname cl@#1\endcsname}%
    \fi
\else
    \refstepcounter{#1}%
    \edef\@svsec{%
        \ifnum#2<\@m
            \@ifundefined{#1name}{}{\csname #1name\endcsname\ }%
        \fi
        \noexpand\rom{\csname the#1\endcsname}\kern1em\relax
    }%
\fi
\@tempskipa #5\relax
\ifdim \@tempskipa>\z@ % then this is not a run-in section heading
    \begingroup
        #6\relax
        \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty\@M #8\par}%
    \endgroup
    \csname #1mark\endcsname{%
        \ifnum \c@secnumdepth >#2\relax
            \csname the#1\endcsname\enskip
        \fi
        #7%
    }%
    \ifnum#2>\@m \else
        % Let's make the decision of whether to add this section title
        % to the Table of Contents here rather than when the TOC is
        % being formatted.
        \def\@tempa{#8}%
        \ifnum#2 > \c@tocdepth \else
            \addcontentsline{toc}{#1}%
                {\protect\numberline{%
                    \ifnum#2<\@m
                        \@ifundefined{#1name}{}%
                            {\csname #1name\endcsname\ }%
                    \fi
                    \ifnum #2>\c@secnumdepth \else
                        \csname the#1\endcsname
                    \fi
                    }%
                \@nearverbatim\@tempa}%
        \fi
    \fi
\else
    \def\@svsechd{#6\hskip #3\@svsec
        \@ifnotempty{#8}{\ignorespaces#8\unskip
            \ifnum\spacefactor<1001.\fi}%
        \ifnum#2>\@m \else
            % Let's make the decision of whether to add this section
            % title to the Table of Contents here rather than when the
            % TOC is being formatted.
            \def\@tempa{#8}%
            \ifnum#2 > \c@tocdepth \else
                \addcontentsline{toc}{#1}%
                    {\ifnum #2>\c@secnumdepth \else
                        \protect\numberline{%
                            \ifnum#2<\@m
                                \@ifundefined{#1name}{}%
                                    {\csname #1name\endcsname\ }
                            \fi
                        \csname the#1\endcsname}%
                    \fi
                    \@nearverbatim\@tempa}%
            \fi
        \fi}%
\fi
\@xsect{#5}}

\def\@xsect#1{%
    \@tempskipa #1\relax
    \ifdim \@tempskipa>\z@ % then this is not a run-in heading
        \par
        \nobreak
        \vskip\@tempskipa
        \@afterheading
    \else % otherwise it IS a run-in heading
        \global\@nobreakfalse
        \global\@noskipsectrue
        \everypar{%
            \if@noskipsec \global\@noskipsecfalse
                \clubpenalty\@M
                \kern-\parindent
                \begingroup
                \@svsechd
                \endgroup
                \hskip -#1\relax
            \else
                \clubpenalty \@clubpenalty
                \everypar{}%
            \fi
        }%
    \fi
    \ignorespaces
}

\def\@afterheading{%
    \global\@nobreaktrue
    \everypar{%
        \if@nobreak
            \global\@nobreakfalse
            \clubpenalty\@M
            \if@afterindent \else {\setbox\z@\lastbox}\fi
        \else
            \clubpenalty\@clubpenalty
            \everypar{}%
        \fi
    }%
}

\def\@hangfrom#1{\setboxz@h{#1}\hangindent\wdz@ \noindent\box\z@}

\let\@ssect\relax % to save memory.  \@ssect not needed in amsart.sty.

% Default initializations of \...mark commands.  (See below for their
% us in defining page styles.
%
\let\chaptermark\@gobble
\let\sectionmark\@gobble
\let\subsectionmark\@gobble
\let\subsubsectionmark\@gobble
% \let\paragraphmark\@gobble

% The value of the counter secnumdepth gives the depth of the
% highest-level sectioning command that is to produce section numbers.
%

\setcounter{secnumdepth}{3}

% FRONTMATTER
%

\def\frontmatter{%
    \pagenumbering{roman}%
    \def\thefigure{\@arabic\c@figure}%
}

\def\endfrontmatter{\pagenumbering{arabic}}


% APPENDIX
%
% The \appendix command must do the following:
%    -- reset the chapter counter to zero
%    -- set \chaptername to Appendix (for messages)
%    -- redefine the chapter counter to produce appendix numbers
%    -- reset the section counter to zero
%    -- redefine the \chapter command if appendix titles and headings
%       are to look different from chapter titles and headings.

\def\appendix{\par
    \c@chapter\z@ \c@section\z@
    \def\chaptername{Appendix}%
    \def\thechapter{\@Alph\c@chapter}%
    \def\thesection{\@arabic\c@section}%
    \def\theequation{\@arabic\c@section.\@arabic\c@equation}%
}

% This is necessary to keep babel.sty from redefining \appendix

\def\appendixname{Appendix}

% HINTS
%
% The \hints command must do the following:
%    -- reset the chapter counter to zero
%    -- set \chaptername to Hints (for messages)
%    -- redefine the chapter counter to produce no numbers
%    -- reset the section counter to zero
%    -- redefine the \chapter command if hints titles and headings are
%       to look different from chapter titles and headings.

\def\hints{\par
    \c@chapter\z@ \c@section\z@ \c@tocdepth=0
    \def\chaptername{Hints}%
    \def\thesection{\@arabic\c@section}%
}

%    ****************************************
%    *                LISTS                 *
%    ****************************************
%

% ENUMERATE
%  Enumeration is done with four counters: enumi, enumii, enumiii
%  and enumiv, where enumN controls the numbering of the Nth level
%  enumeration.  The label is generated by the commands \labelenumi
%  ... \labelenumiv.  The expansion of \p@enumN\theenumN defines the
%  output of a \ref command.

\def\labelenumi{(\@alph\c@enumi)}
\def\theenumi{\@alph\c@enumi}

\def\labelenumii{(\@roman\c@enumii)}
\def\theenumii{\@roman\c@enumii}
\def\p@enumii{\theenumi}

\def\labelenumiii{(\@roman\c@enumiii)}
\def\theenumiii{\@roman\c@enumiii}
\def\p@enumiii{\theenumi(\theenumii)}

\def\labelenumiv{(\@Alph\c@enumiv)}
\def\theenumiv{\@Alph\c@enumiv}
\def\p@enumiv{\p@enumiii\theenumiii}

% ITEMIZE
% Itemization is controlled by four commands: \labelitemi,
% \labelitemii, \labelitemiii, and \labelitemiv, which define the
% labels of the various itemization levels.

\def\labelitemi{$\m@th\bullet$}
\def\labelitemii{\bf --}% \normalshape already done by \itemize
\def\labelitemiii{$\m@th\ast$}
\def\labelitemiv{$\m@th\cdot$}

% The following commands are used to set the default values for the
% list environment's parameters. See the LaTeX manual for an
% explanation of the meanings of the parameters.  Defaults for the
% list environment are set as follows.  First, \rightmargin,
% \listparindent and \itemindent are set to 0pt.  Then, for a Kth
% level list, the command \@listK is called, where 'K' denotes 'i',
% 'ii', ... , 'vi'.  (I.e., \@listiii is called for a third-level
% list.)  By convention, \@listK should set \leftmargin to
% \leftmarginK.
%
% For efficiency, level-one list's values are defined at top level, and
% \@listi is defined to set only \leftmargin.

\settowidth\leftmargini{\labelenumi\hspace*\labelsep}
\advance\leftmargini by 18pt

\settowidth\leftmarginii{\labelenumii\hspace*\labelsep}
\advance\leftmarginii by 15pt

\settowidth\leftmarginiii{\labelenumiii\hspace*\labelsep}
\advance\leftmarginiii by 12pt

\settowidth\leftmarginiv{\labelenumiv\hspace*\labelsep}
\advance\leftmarginiv by 10pt

\leftmarginv=10pt

\leftmarginvi=10pt

\leftmargin=\leftmargini
\labelsep=5pt
\labelwidth=\leftmargini \advance\labelwidth-\labelsep

% \@listI defines top level and \@listi values of
% \leftmargin, \topsep, \parsep, and \itemsep

\def\@listI{\leftmargin\leftmargini \parsep\z@
  \topsep 7\p@\relax \itemsep\z@}

\let\@listi\@listI

\@listi

\def\@listii{\leftmargin\leftmarginii
 \labelwidth\leftmarginii \advance\labelwidth-\labelsep
 \topsep7\p@ \parsep\z@ \itemsep\z@}

\def\@listiii{\leftmargin\leftmarginiii
 \labelwidth\leftmarginiii \advance\labelwidth-\labelsep
 \topsep7\p@ \parsep\z@ \partopsep\z@ \itemsep\z@}

\def\@listiv{\leftmargin\leftmarginiv
 \labelwidth\leftmarginiv \advance\labelwidth-\labelsep}

\def\@listv{\leftmargin\leftmarginv
 \labelwidth\leftmarginv \advance\labelwidth-\labelsep}

\def\@listvi{\leftmargin\leftmarginvi
 \labelwidth\leftmarginvi \advance\labelwidth-\labelsep}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                    %%
%%                          PROBLEMS LIST                             %%
%%                                                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% This was borrowed from an earlier book I worked on, so these macros
%% are more complex than we actually needed for Yuri's book.

\newcounter{problems}
\def\theproblems{\arabic{problems}}
%% \def\labelproblems{\arabic{chapter}.\arabic{problems}.}
\def\labelproblems{\arabic{problems}.}

\def\p@problems{\@arabic\c@chapter.}

% David M. Jones, July 2, 1991 -- Redefined problems environment to
% have a better user interface.  Instead of using \item within the
% problems environment, we use the command \problem, which has the
% following forms:
%
% \problem          The normal case.  Produces an item number of the
%                   form ``2.32'', where 2 is the chapter number and
%                   32 is the number of the problem within the
%                   chapter.
%
% \problem*         Produces a bold item number of the form ``2.32''.
%
% \problem[foo]     Produces an item label of the form ``foo2.32''.
%
% \problem*[foo]    Produces a bold item number of the form
%                   ``foo2.32''.
%
% It would be possible to set things up so that \item worked this way
% inside of the problems environment, but this is undesirable for two
% reasons: (1) it requires being tricky to make sure that lists
% embedded inside the problems environment are handled correctly, and
% (2) it would make the \item command inside the problems environment
% have a very different syntax and semantics than the \item command
% within other lists, which would be undesirable.

%%  \newenvironment{problems}{%
%%      \begin{list}{\labelproblems}%
%%                   {\usecounter{problems}%
%%                    \itemsep=10pt
%%                    \leftmargin=0pt
%%                    \def\makelabel##1{\hss\llap{\normalshape##1}}}%
%%                    }%
%%  {\end{list}}

\newenvironment{problems}{%
    \begin{list}{\labelproblems}%
                 {\usecounter{problems}%
                  \itemsep=10pt
                  \labelwidth=0\p@
                  \leftmargin0\p@
                  \listparindent=\parindent
                  \def\makelabel##1{\hskip\labelsep\normalshape##1}}%
                  }%
{\end{list}}

\newif\if@bolditem

\def\problem{\@ifstar{\@bolditemtrue\@prob}{\@prob}}

\def\@prob{\@ifnextchar [{\@xprob}{\@noitemargtrue \@xprob[]}}

\def\@xprob[#1]{%
    \if@noparitem
        \@donoparitem
    \else
        \if@inlabel \indent \par \fi
        \ifhmode \unskip\unskip \par \fi
        \if@newlist
            \if@nobreak
                \@nbitem
            \else
                \addpenalty\@beginparpenalty
                \addvspace\@topsep
                \addvspace{-\parskip}%
            \fi
        \else
            \addpenalty\@itempenalty
            \addvspace\itemsep
        \fi
        \global\@inlabeltrue
    \fi
    \everypar{%
        \global\@minipagefalse
        \global\@newlistfalse
        \if@inlabel
            \global\@inlabelfalse
            \hskip -\parindent
            \box\@labels
            \penalty\z@
        \fi
        \everypar{}%
    }%
    \global\@nobreakfalse
    \if@nmbrlist \refstepcounter{\@listctr}\fi
    \if@bolditem
        \def\@tempa{\bf#1\@itemlabel}%
        \@bolditemfalse
    \else
        \def\@tempa{#1\@itemlabel}%
    \fi
    \setbox\@tempboxa\hbox{\makelabel{\@tempa}}%
    \global\setbox\@labels\hbox{%
        \unhbox\@labels
        \hskip \itemindent
        \hskip -\labelwidth
        \hskip -\labelsep
        \ifdim \wd\@tempboxa >\labelwidth
            \box\@tempboxa
        \else
            \hbox to\labelwidth {\makelabel{\@tempa}}%
        \fi
        \hskip \labelsep
    }%
    \ignorespaces
}

% VERSE
%   The verse environment is defined by making clever use of the
%   list environment's parameters.  The user types \\ to end a line.
%   This is implemented by \let'in \\ equal \@centercr.
%
\def\verse{\let\\\@centercr
 \list{}{\itemsep\z@ \itemindent -1.5em\listparindent\itemindent
 \rightmargin\leftmargin \advance\leftmargin 1.5em}\item[]}
\let\endverse=\endlist

% QUOTATION
%   Fills lines
%   Indents paragraph
%

\def\quotation{\list{}{\listparindent 1.5em
    \itemindent0pt%\listparindent
    % The following was a kludge to fix a couple of bad linebreaks
    % \advance\leftmargin by -2pt
    \rightmargin\leftmargin \parsep\z@ \@plus\p@}\item[]}
\let\endquotation=\endlist

% QUOTE -- same as quotation except no paragraph indentation,
%
\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
\let\endquote=\endlist

% TRIVLIST -- redefined to put labels in \normalshape

\def\trivlist{\parsep\parskip
  \@trivlist \labelwidth\z@ \leftmargin\z@
  \itemindent\z@ \def\makelabel##1{\normalshape##1}}

% ENUMERATE and ITEMIZE -- redefined to put labels in \normalshape

\def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else
      \advance\@enumdepth \@ne
      \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
      {\csname label\@enumctr\endcsname}{\usecounter
        {\@enumctr}\labelwidth=0\p@\leftmargin=0\p@%
      \def\makelabel##1{\hskip\labelsep{\normalshape##1}}}\fi}

\def\itemize{\ifnum\@itemdepth>3 \@toodeep
  \else \advance\@itemdepth\@ne
  \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
  \list{\csname\@itemitem\endcsname}
  {\labelwidth=0\p@\leftmargin=0\p@%
    \def\makelabel##1{\hskip\labelsep{\normalshape##1}}}\fi}

%%  \def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else
%%        \advance\@enumdepth \@ne
%%        \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
%%        {\csname label\@enumctr\endcsname}{\usecounter
%%        {\@enumctr}\def\makelabel##1{\hss\llap{\normalshape##1}}}\fi}
%%
%%  \def\itemize{\ifnum\@itemdepth>3 \@toodeep
%%    \else \advance\@itemdepth\@ne
%%    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
%%    \list{\csname\@itemitem\endcsname}%
%%    {\def\makelabel##1{\hss\llap{\normalshape##1}}}\fi}

% DESCRIPTION
%
%  To change the formatting of the label, you must redefine
%  \descriptionlabel.

\def\descriptionlabel#1{\hspace\labelsep \normalshape\bf #1:}

\def\description{\list{}{%
\advance\leftmargin6\p@ \itemindent-6\p@
  \labelwidth\z@ \let\makelabel\descriptionlabel}}

\let\enddescription=\endlist

%    ****************************************
%    *         OTHER ENVIRONMENTS           *
%    ****************************************
%

\def\enddocument{%
    \@checkend{document}%
    \par
    \clearpage
    \begingroup
        \if@filesw
            \immediate\closeout\@mainaux
            %% The redefinition of \global here is possibly the most
            %% tasteless thing I've ever seen.  To the best of my
            %% knowledge, the only place where \global\@namedef is put
            %% into an AUX file is by the \@writeckpt macro, so it
            %% would should be possible to avoid redefining \global
            %% by a simple modification of \@writeckpt.  However, I
            %% thought of this too late to implement it in this style
            %% file.
            \def\global\@namedef##1##2{}%
            \def\newlabel{\@testdef r}%
            \def\bibcite{\@testdef b}%
            \@tempswafalse
            \makeatletter
            \input \jobname.aux
            \if@tempswa
                \@warning{Label(s) may have changed.  Rerun to get
                          cross-references right}%
            \fi
        \fi
    \endgroup
    \deadcycles\z@
    \@@end
}

% EQUATION and SPLIT

% The following causes equations to be numbered within sections.

\@addtoreset{equation}{section}

% Equations are labelled with three numbers, the chapter, section, and
% equation numbers.

\def\theequation{%
    \@arabic\c@chapter.\@arabic\c@section.\@arabic\c@equation
}

\ctagsplit@true

% THEOREM
% We use theorem.sty.

\input theorem.sty

\theorembodyfont{}

\def\@begintheorem#1#2[#3]{%
    \item[%
        \hskip\labelsep
        \theorem@headerfont
        \theorem@indent#1\ \rom{#2}\unskip
        \@ifnotempty{#3}{\ \rom(#3\rom)}.%
    ]%
    \ignorespaces
}

\def\@thm#1#2{%
    \refstepcounter{#1}%
    \trivlist
    \@topsep \theorempreskipamount               % used by first \item
    \@topsepadd \theorempostskipamount           % used by \@endparenv
    \@oparg{\@begintheorem{#2}{\csname the#1\endcsname}}[]%
}

\let\@opargbegintheorem\relax
\let\@ythm\relax

\def\th@plain{\rm}

\def\th@definition{%
    \theorempreskipamount6\p@\@plus6\p@
    \theorempostskipamount\theorempreskipamount
    \normalshape
}

\def\th@remark{%
    \theorempreskipamount6\p@\@plus6\p@
    \theorempostskipamount\z@\@plus6\p@
    \normalshape
}

\def\theorem@headerfont{\sc}

\let\theorem@indent\indent

\theorempreskipamount=6pt plus9pt
\theorempostskipamount=\theorempreskipamount
\def\@endtheorem{\endtrivlist\@endpefalse }

% PF -- proofs

\def\pf{%
    \par\topsep6\p@\@plus6\p@
    \trivlist
    \itemindent\normalparindent
    \item[\hskip\labelsep\sc\proofname.]%
    \ignorespaces
}

\def\endpf{\qed\endtrivlist}

\@namedef{pf*}#1{%
    \par
    \toks@\expandafter{\proofname}%
    \edef\restoreproofname{\def\noexpand\proofname{\the\toks@}}%
    \def\proofname{#1}%
    \pf\restoreproofname\ignorespaces
}

\expandafter\let\csname endpf*\endcsname=\endpf

\def\qedsymbol{%
    \RIfM@
        \bgroup
    \else
        $\bgroup\aftergroup$
    \fi
    \vcenter{\hrule\hbox{\vrule\@height.6em\kern.6em\vrule}\hrule}%
    \egroup
}

\def\qed{\RIfM@\else\unskip\nobreak\fi\quad\qedsymbol}

\def\proofname{Proof}

% TITLEPAGE
%  The titlepage environment starts and ends a page, and inhibits page
%  numbers.  It also resets the page number to zero.

\def\titlepage{\newpage\thispagestyle{empty}\c@page\z@}

\def\endtitlepage{\newpage}

% ARRAY AND TABULAR
%
\arraycolsep= 5pt    % Half the space between columns in an array
                     % environment.
\tabcolsep 6pt       % Half the space between columns in a tabular
                     % environment.
\arrayrulewidth .4pt % Width of rules in array and tabular
                     % environment.
\doublerulesep 2pt   % Space between adjacent rules in array or
                     % tabular env.

% TABBING
%
\tabbingsep \labelsep % Space used by the \' command. (See LaTeX
                      % manual.)

% MINIPAGE
%  \@minipagerestore is called upon entry to a minipage environment to
%  set up things that are to be handled differently inside a minipage
%  environment. In the current styles, it does nothing.
%
% \skip\@mpfootins : plays same role for footnotes in a minipage as
%                    \skip\footins does for ordinary footnotes

\skip\@mpfootins=\skip\footins

% FRAMEBOX
%
\fboxsep = 3pt    % Space left between box and text by \fbox and
                  % \framebox.
\fboxrule = .4pt  % Width of rules in box made by \fbox and \framebox.

%    ****************************************
%    *         TABLE OF CONTENTS, ETC.      *
%    ****************************************
%
% A \subsection command writes a
%       \contentsline{subsection}{TITLE}{PAGE}
% command on the .toc file, where TITLE contains the contents of the
% entry and PAGE is the page number.  If subsections are being numbered,
% then TITLE will be of the form
%       \numberline{NUM}{HEADING}
% where NUM is the number produced by \thesubsection.  Other sectioning
% commands work similarly.
%
% A \caption command in a 'figure' environment writes
%    \contentsline{figure}{\numberline{NUM}{CAPTION}}{PAGE}
% on the .lof file, where NUM is the number produced by \thefigure and
% CAPTION is the figure caption.  It works similarly for a 'table'
% environment.
%
% The command \contentsline{NAME} expands to \l@NAME.  So, to specify
% the table of contents, we must define \l@chapter, \l@section,
% \l@subsection, ... ; to specify the list of figures, we must define
% \l@figure; and so on.  Most of these can be defined with the
% \@dottedtocline command, which works as follows.
%
% \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH}{TITLE}{PAGE}
%    LEVEL    : An entry is produced only if LEVEL < or = value of
%               'tocdepth' counter.  Note, \chapter is level 0, \section
%               is level 1, etc.
%    INDENT   : The indentation from the outer left margin of the
%               start of the contents line.
%    NUMWIDTH : The width of a box in which the section number is to go,
%               if TITLE includes a \numberline command.
%
% This command uses the following three parameters, which are set
% with a \def (so em's can be used to make them depend upon the font).
%   \@pnumwidth : The width of a box in which the page number is put.
%   \@tocrmarg  : The right margin for multiple line entries.  One
%                 wants \@tocrmarg > or = \@pnumwidth
%   \@dotsep    : Separation between dots, in mu units.  Should be
%                 \def'd to a number like 2 or 1.7

\def\numberline#1{%
    \setboxz@h{#1\enspace}%
    \ifdim\wdz@>\@tempdima
        \box\z@
    \else
        \hbox to\@tempdima{#1\hfil}%
    \fi
}

%\def\@pnumwidth{1.6em}
\def\@pnumwidth{4em}
\def\@tocrmarg {2.6em}
%\def\@dotsep{4.5}
\setcounter{tocdepth}{1}

\def\@starttoc#1#2{%
    \begingroup
        \@addtoindexfalse
        \let\secdef\@gobbletwo \chapter\@afterindenttrue
        \let\sbreak\relax
        \ifx#2\contentsname \else
            \addcontentsline{toc}{\@string\chapter}#2%
        \fi
        \typeout#2\chaptermark#2\@xunnumbered{#2}\@afterheading
        \makeatletter
        \@input{\jobname.#1}%
        \if@filesw
            \expandafter\newwrite\csname tf@#1\endcsname
            \expandafter\openout\csname tf@#1\endcsname\jobname.#1\relax
        \fi
        \global\@nobreakfalse
    \endgroup
    \newpage
}

% TABLEOFCONTENTS
%  In report style, \tableofcontents, \listoffigures, etc. are always
%  set in single-column style.  @restonecol

\def\contentsname{Contents}

\def\@tocline#1#2#3#4#5{%
    \par
    \addpenalty\@secpenalty\addvspace{#1}%
    \begingroup
        \@tempdima#2\relax % used by \numberline
        \leftskip #2\relax \parindent-\leftskip
        \rightskip\@pnumwidth plus 1fill
        \parfillskip-\rightskip%\@pnumwidth
        \hyphenpenalty\@M
        {#3\leavevmode #4}\hfil \hbox to\@pnumwidth{\hss #5}\par\nobreak
    \endgroup
}

\def\@dottedtocline#1#2#3#4#5{%
    \ifnum #1>\c@tocdepth\else
        \vskip \z@\@plus\p@
        \begingroup
            \leftskip #2\relax
            \rightskip\@tocrmarg
            \parfillskip-\rightskip
            \parindent #2\relax
            \@afterindenttrue
            \interlinepenalty\@M
            \leavevmode
            \@tempdima #3\relax
            \advance\leftskip\@tempdima
            \null
            \hskip-\leftskip #4\nobreak
            \hfill\nobreak
            \ifnum#1<\c@tocdepth\hbox to\@pnumwidth{\hfil#5}\fi
            \null
            \par
        \endgroup
    \fi
}

\def\tableofcontents{\@starttoc{toc}\contentsname}

\def\l@chapter{%
    \goodbreak
    \@tocline{2\medskipamount}{2em}{\large\normalshape\bf}%
}

\def\l@part#1#2{%
    \par
    \addpenalty\@secpenalty
    \medskip
    {\centering#1\par}%
    \nobreak
    \@afterheading
}

\def\l@section{\@tocline\medskipamount{2em}{\normalshape}}

\def\l@subsection{\@dottedtocline\tw@{1.5em}{2.3em}}

\def\l@subsubsection{\@dottedtocline\thr@@{3.8em}{3.2em}}

% \def\l@paragraph{\@dottedtocline4{7em}{4.1em}}

% LIST OF FIGURES
%
\def\listoffigures{\@starttoc{lof}\listfigurename}

\def\listfigurename{List of Figures}

\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}

% LIST OF TABLES
%
\def\listoftables{\@starttoc{lot}\listtablename}

\def\listtablename{List of Tables}

\let\l@table=\l@figure

%    ****************************************
%    *             BIBLIOGRAPHY             *
%    ****************************************
%
% The thebibliography environment executes the following commands:
%
%  \def\newblock{\hskip .11em plus .33em minus .07em} --
%      Defines the `closed' format, where the blocks (major units of
%      information) of an entry run together.
%
%  \sloppy  -- Used because it's rather hard to do line breaks in
%      bibliographies,
%
%  \sfcode`\.=1000\relax --
%      Causes a `.' (period) not toproduce an end-of-sentence space.

\def\bibname{Bibliography}

\def\bibauthor#1{\goodbreak{#1}\par\nobreak}

\def\thebibliography{%
    \sloppy
    \parskip\medskipamount
    \parindent0pt
    \clubpenalty9999 \widowpenalty\clubpenalty  \sfcode`\.\@m
    \small
}

\let\endthebibliography=\relax

\def\paperlist{%
    \list{[???]}%
         {%
            \setbox\@tempboxa=\hbox{\small\normalshape0000a}%
            \labelwidth=\wd\@tempboxa
            \labelsep=1em
            \leftmargin=\labelwidth
            \advance\leftmargin by \labelsep
            \def\makelabel##1{\rlap{\normalshape##1}\hss}%
         }%
}

\let\endpaperlist=\endlist

%%  \newcounter{biblio}
%%
%%  \def\labelbiblio{(\@arabic\c@biblio)}
%%  \def\thebiblio{\@arabic\c@biblio}
%%
%%  \def\thebibliography#1{\unnumbered\bibname
%%    \list{}{%
%%          %\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
%%          %\advance\leftmargin\labelsep
%%          \leftmargin\z@
%%          \usecounter{biblio}%
%%      }\sloppy
%%      \itemsep\medskipamount
%%      \clubpenalty9999 \widowpenalty\clubpenalty  \sfcode`\.\@m
%%      \small}
%%
%%  \let\endthebibliography=\endlist

% \def\@biblabel#1{[#1]\hfill}  % Produces the label for a \bibitem[...]
                                % command.

\def\@cite#1#2{\rom{\mediumseries[{#1\if@tempswa , #2\fi}]}}
            % Produces the output of the \cite command.

\def\bysame{\leavevmode\hbox to3em{\hrulefill}\,}

\def\newblock{}

%    ****************************************
%    *              THE INDEX               *
%    ****************************************
%
% THE THEINDEX ENVIRONMENT
% Produces double column format, with each paragraph a separate entry.
% The user commands \item, \subitem and \subsubitem are used to
% produce the entries, and \indexspace adds an extra vertical space
% that's the right size to put above the first entry with a new letter
% of the alphabet.

\newif\if@restonecol

\def\theindex{%
    \@restonecoltrue
    \if@twocolumn\@restonecolfalse\fi
    \columnseprule\z@ \columnsep 35\p@\twocolumn
    \edef\@indexname{\@nameuse{idx@\@indextype}}%
    \edef\@indexname{\expandafter\@third\@indexname\@nil}%
    \unnumbered{\@indexname}%
    \let\item\@idxitem
    \parindent\z@  \parskip\z@ plus.3\p@\relax
    \frenchspacing
    \small
}

% \indexproofstyle{%
%     \footnotesize\reset@font\tt\hfuzz=10000pt\overfullrule0pt
% }

%% According to the MIT Press, main index entries should always be
%% capitalized, hence the following.  This is a little dangerous, but
%% it's worth a shot.

\def\@idxitem#1{\par\hangindent 1.5em\uppercase{#1}}

\def\subitem{\par\hangindent 1.5em\hspace*{.5em}}
\def\subsubitem{\par\hangindent 1.5em\hspace*{1em}}

\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}

\newskip\@indexspace
\@indexspace=\bigskipamount
\advance\@indexspace by -1.5pt

\def\indexspace{\par\vskip\@indexspace}

% In addition to the regular subject index, we'll also have a Name
% Index and a List of Notation.

\newindex{default}{idx}{ind}{Subject Index}
\newindex{aut}{adx}{and}{Name Index}
\newindex{not}{ndx}{nnd}{List of Notation}

%    ****************************************
%    *             FOOTNOTES                *
%    ****************************************
%
% \footnoterule is a macro to draw the rule separating the footnotes
% from the text.  It should take zero vertical space, so it needs a
% negative skip to compensate for any positive space taken by the
% rule.  (See PLAIN.TEX.)

\def\footnoterule{%
    \kern-.4\p@
    \hrule\@width 5pc
    \kern11\p@
    \kern-\footnotesep
}

% \newcounter{footnote}
\@addtoreset{footnote}{chapter}  % Numbers footnotes within chapters

%   \@makefntext{NOTE} :
%        Must produce the actual footnote, using \@thefnmark as the
%        mark of the footnote and NOTE as the text.  It is called when
%        effectively inside a \parbox of width \columnwidth (i.e.,
%        with \hsize = \columnwidth).
%
%        The following macro indents all lines of the footnote by
%        10pt, and indents the first line of a new paragraph by 1em.
%        To change these dimensions, just substitute the desired value
%        for '10pt' [in both places] or '1em'.  The mark is flushright
%        against the footnote.
%
%         \long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize
%            \advance\@tempdima-10pt\parshape \@ne 10pt \@tempdima}\par
%            \parindent 1em\noindent
%            \hbox to \z@{\hss$^{\@thefnmark}$}#1}
%
%        A simpler macro is used, in which the footnote text is set
%        like an ordinary text paragraph, with no indentation except
%        on the first line of a paragraph, and the first line of the
%        footnote.  Thus, all the macro must do is set \parindent to
%        the appropriate value for succeeding paragraphs and put the
%        proper indentation before mark.

\def\@makefntext{\indent\@makefnmark}

% \@makefnmark : A macro to generate the footnote marker that goes
%    in the text.  Default used.
%

\def\@makefnmark{\hbox{$\m@th^{\@thefnmark}$}}

\long\def\@footnotetext#1{%
    \insert\footins{%
        \defaultfont
        \footnotesize
        \interlinepenalty\interfootnotelinepenalty
        \splittopskip\footnotesep
        \splitmaxdepth \dp\strutbox
        \floatingpenalty\@MM
        \hsize\columnwidth
        \@parboxrestore
        \parindent\normalparindent
        \sloppy
        \edef\@currentlabel{\p@footnote\@thefnmark}%
        \@makefntext{%
            \rule\z@
            \footnotesep
            \ignorespaces#1\unskip
            \strut
            \par
        }%
    }%
}

%    ****************************************
%    *         FIGURES AND TABLES           *
%    ****************************************
%
% Float placement parameters.  See LaTeX manual for their definition.
%
\setcounter{topnumber}{2}
\def\topfraction{.7}
\setcounter{bottomnumber}{1}
\def\bottomfraction{.3}
\setcounter{totalnumber}{3}
\def\textfraction{.2}
\def\floatpagefraction{.5}
\setcounter{dbltopnumber}{2}
\def\dbltopfraction{.7}
\def\dblfloatpagefraction{.5}

% \@makecaption{NUMBER}{TEXT} : Macro to make a figure or table caption.
%      NUMBER : Figure or table number--e.g., 'Figure 3.2'
%      TEXT   : The caption text.
% Macro should be called inside a \parbox of right width, with
% \normalsize.
% changed 25 Jun 86 to fix according to Howard Trickey:
% instead of \unhbox\@tempboxa\par we do #1: #2\par

\long\def\@makecaption#1#2{%
    \setbox\@tempboxa\vbox{%
        \advance\hsize-6pc%
        \noindent
        \footnotesize
        {\bf#1}%
        \expandafter\@ifnotempty\expandafter
            {\@cdr#2\@nil}%
            {.\normalshape\enspace#2}%
        \unskip
        \kern-6pc%
        \par
        \global\setbox\@ne\lastbox
    }%
    \ifhbox\@ne % the normal case
        \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
    \fi
    \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
        \setbox\@ne\hbox to\columnwidth{\hss\kern-6pc\box\@ne\hss}%
    \else % tempboxa contained more than one line (or other vertical
          % mode stuff)
        \setbox\@ne\vbox{%
            \unvbox\@tempboxa
            \parskip\z@skip
            \noindent
            \unhbox\@ne
            \advance\hsize-6pc%
            \par
        }%
    \fi
    \ifnum\@tempcnta<64 % if the float IS a figure...
        \vskip 1pc% was .25pc
        \moveright 3pc\box\@ne
    \else % if the float IS NOT a figure...
        \moveright 3pc\box\@ne
        \vskip 1pc%
    \fi
    \relax
}

% To define a float of type TYPE (e.g., TYPE = figure), the document
% style must define the following.
%
%  \fps@TYPE   : The default placement specifier for floats of type
%                TYPE.
%
%  \ftype@TYPE : The type number for floats of type TYPE.  Each TYPE
%                has associated a unique positive TYPE NUMBER, which
%                is a power of two.  E.g., figures might have type
%                number 1, tables type number 2, programs type number
%                4, etc.
%
%  \ext@TYPE   : The file extension indicating the file on which the
%                contents list for float type TYPE is stored.  For
%                example, \ext@figure = 'lof'.
%
%  \fnum@TYPE  : A macro to generate the figure number for a caption.
%                For example, \fnum@TYPE == Figure \thefigure.
%
%  The actual float-making environment commands--e.g., the commands
%  \figure and \endfigure--are defined in terms of the macros \@float
%  and \end@float, which are described below.
%
%  \@float{TYPE}[PLACEMENT] : Macro to begin a float environment for a
%     single-column float of type TYPE with PLACEMENT as the placement
%     specifier.  The default value of PLACEMENT is defined by
%     \fps@TYPE.  The environment is ended by \end@float.
%     E.g., \figure == \@float{figure}, \endfigure == \end@float.

% FIGURE
\newcounter{figure}[chapter]

\def\thefigure{\thechapter.\@arabic\c@figure}

\def\figurename{Figure}

\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename\ \thefigure}
\def\figure{\@float{\@string\figure}}
\let\endfigure=\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}

% TABLE
%
\newcounter{table}[chapter]

\def\thetable{\thechapter.\@arabic\c@table}

\def\tablename{Table}

\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename\ \thetable}
\def\table{\@float{\@string\table}}
\let\endtable=\end@float
\@namedef{table*}{\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}

%    ****************************************
%    *                TITLE                 *
%    ****************************************

\def\title{\@dblarg\@xtitle}

\def\@title{}

\def\@xtitle[#1]#2{\def\@title{\ignorespaces#2\unskip}}

\def\author{\@dblarg{\@xauthor}}

\def\@authors{}

\def\@xauthor[#1]#2{\expandafter\def\expandafter
  \@authors\expandafter{\@authors#2\and}}

\def\forewordauthor{\def\@forewordaut}

\def\@forewordaut{}

\newtoks\@addresstoks

\def\address{\@oparg\@xaddress[]}

\def\@xaddress[#1]#2{%
  \@addresstoks\expandafter{\the\@addresstoks\address{#1}{#2}{}{}{}{}}}

\def\@setaddress{%
  \par\expandafter\@ifnotempty\expandafter{\the\@addresstoks}{%
  \nobreak \begingroup \small
  \def\\{\unskip, \ignorespaces}%
  \interlinepenalty\@M
  \def\address##1##2##3##4##5##6{%
    \nobreak\bigskip\indent
    \@ifnotempty{##1}{(\ignorespaces##1\unskip) }%
    {\sc\ignorespaces##2}\par
    \@ifnotempty{##4}{\nobreak\indent{\it Current address}%
      \@ifnotempty{##3}{, \ignorespaces##3\unskip}\/:\space
      ##4\par}%
    \@ifnotempty{##6}{\nobreak\indent{\it E-mail address}%
      \@ifnotempty{##5}{, \ignorespaces##5\unskip}\/:\space
      ##6\par}%
  }% End definition of \address.
  \the\@addresstoks
  \endgroup
}% End of \@ifnotempty{\the\@addresstoks}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of \@setaddress

\def\curraddr{\@oparg\@xcurraddr[]}

\def\@xcurraddr[#1]#2{\@address@concat\curraddr{#1}{#2}{##5}{##6}}

\def\email{\@oparg\@xemail[]}

\def\@xemail[#1]#2{\@address@concat\email{##3}{##4}{#1}{#2}}

\def\@address@concat#1#2#3#4#5{%
  \expandafter\@ifempty\expandafter{\the\@addresstoks}%
  {\errmessage{\string#1 can't precede \string\address.}}%
  {\begingroup \global\toks\@ne{}\global\toks\thr@@{}%
    \def\address##1##2##3##4##5##6{\global\toks\thr@@\expandafter{%
      \the\toks\expandafter\thr@@\the\toks\@ne}%
      \global\toks\@ne{\address{##1}{##2}{##3}{##4}{##5}{##6}}}%
    \the\@addresstoks
    \def\address##1##2##3##4##5##6{\global\toks\thr@@\expandafter{%
      \the\toks\thr@@\address{##1}{##2}{#2}{#3}{#4}{#5}}}%
    \the\toks\@ne
    \endgroup \@addresstoks\toks\thr@@
}}

\def\date#1{\def\@date{#1}}

\def\@date{}

\def\thanks#1{\ifx\@empty\@thanks
   \def\@thanks{#1}%
 \else \expandafter\def\expandafter\@thanks\expandafter
   {\@thanks\@@par#1}\fi
}

\def\@thanks{}

\def\dedicatory#1{\def\@dedicatory{#1}}

\def\@dedicatory{}

\def\keywords#1{\def\@keywords{#1}}

\def\@keywords{}

\def\subjclass#1{\def\@subjclass{#1}}

\def\@subjclass{}

\def\translator#1{\def\@translator{#1}}

\def\@translator{}

\def\maketitle{%
    \par
    \@topnum\z@ % to prevent figures from falling at the top of page 1
    \begingroup
        \@maketitle
    \endgroup
    \thispagestyle{plain}%
    \c@footnote\z@
    \def\do##1{\let##1\relax}%
    \do\maketitle   \do\@maketitle
    \do\title       \do\@xtitle         \do\@title
    \do\author      \do\@xauthor        \do\@authors
    \do\dedicatory  \do\thededicatory@  \do\forewordauthor
    \do\thanks      \do\@thanks         \do\@forewordaut
    \do\keywords    \do\@keywords
    \do\subjclass   \do\@subjclass
}

\def\@maketitle{%
    \cleardoublepage
    \pagestyle{empty}% local to group
    \begingroup
        \topskip\z@skip
        \null
        \begingroup
            \@topofpage{%
                \parindent\z@ \Large\bf \openup\medskipamount
                \@title\vfil
            }%
        \endgroup
        \cleardoublepage
        \null
        \begingroup
            \@topofpage{%
                \parindent\z@ \Large\bf \openup\medskipamount
                \@title\par
                \bigskip
                \def\and{\par\bigskip}\mediumseries\@authors
                \ifx\@forewordaut\@empty\else
%                    \bigskip
                    with a foreword by \@forewordaut
                \fi
            }%
        \endgroup
        \vfill
        \begin{flushleft}
            The MIT Press \\
            Cambridge, Massachusetts \\
            London, England
        \end{flushleft}
        \cleardoublepage
    \endgroup
}

%    ****************************************
%    *              ABSTRACT                *
%    ****************************************

\def\abstractname{Abstract}

\def\abstract{%
  \global\let\abstract\relax
  \defaultfont\small  \skip@28\p@ \advance\skip@-\lastskip
  \advance\skip@-\baselineskip \vskip\skip@
  \moveright 3pc\vtop \bgroup
  \advance \hsize -6pc
  \trivlist \labelsep.5em\item[\hskip\labelsep
    {\sc\abstractname}.]\ignorespaces
}

\def\endabstract{\endtrivlist
  \global\let\endabstract\relax
  \global\dimen@i\prevdepth \egroup \prevdepth\dimen@i
  \skip@32\p@\@plus 14\p@ \advance\skip@-\baselineskip
  \vskip\skip@
}

%    ****************************************
%    *            PAGE STYLES               *
%    ****************************************
%
% The page style 'foo' is defined by defining the command \ps@foo.  This
% command should make only local definitions.  There should be no stray
% spaces in the definition, since they could lead to mysterious extra
% spaces in the output.
%
% The \ps@... command defines the macros \@oddhead, \@oddfoot,
% \@evenhead, and \@evenfoot to define the running heads and
% feet---e.g., \@oddhead is the macro to produce the contents of the
% heading box for odd-numbered pages.  It is called inside an \hbox of
% width \textwidth.
%
% To make headings determined by the sectioning commands, the page style
% defines the commands \chaptermark, \sectionmark, ... , where
% \chaptermark{TEXT} is called by \chapter to set a mark, and so on.
% The \...mark commands and the \...head macros are defined with the
% help of the following macros.  (All the \...mark commands should be
% initialized to no-ops.)
%
% MARKING CONVENTIONS:
% LaTeX extends TeX's \mark facility by producing two kinds of marks
% a 'left' and a 'right' mark, using the following commands:
%     \markboth{LEFT}{RIGHT} : Adds both marks.
%     \markright{RIGHT}      : Adds a 'right' mark.
%     \leftmark  : Used in the \@oddhead, \@oddfoot, \@evenhead or
%                  \@evenfoot macro, gets the current 'left'  mark.
%                  Works like TeX's \botmark command.
%     \rightmark : Used in the \@oddhead, \@oddfoot, \@evenhead or
%                  \@evenfoot macro, gets the current 'right'  mark.
%                  Works like TeX's \firstmark command.
% The marking commands work reasonably well for right marks 'numbered
% within' left marks--e.g., the left mark is changed by a \chapter
% command and the right mark is changed by a \section command.
% However, it does produce somewhat anomalous results if two
% \bothmark's occur on the same page.
%
%
% Commands like \tableofcontents that should set the marks in some
% page styles use a \@mkboth command, which is \let by the pagestyle
% command (\ps@...)  to \markboth for setting the heading or
% \@gobbletwo to do nothing.

\mark{{}{}}   % Initializes TeX's marks

% Definition of 'headings' page style
%  Note the use of ##1 for parameter of \def\chaptermark inside the
%  \def\ps@headings.
%

\def\ps@headings{%
    \let\@mkboth\markboth
    \let\@oddfoot\@empty
    \let\@evenfoot\@empty
    \def\@evenhead{%
        \size{9}{9pt}\selectfont \rlap{\thepage}\hfil{\leftmark}%
    }%
    \def\@oddhead{%
        \size{9}{9pt}\selectfont {\rightmark} \hfil \llap{\thepage}%
    }%
    \def\chaptermark##1{\@mkboth{##1}{##1}}
    \let\sectionmark\markright
}

% Definition of 'typepage' page style
%  This is used by the \@topofpage command to put chapter headings at
%  the top of the type page, as required by the MIT Press style

\newtoks\@typepagetoks

\def\@topofpage{\thispagestyle{typepage}%
\global\@typepagetoks=}

\newbox\@tempboxb

\def\ps@typepage{%
    \let\@mkboth\@gobbletwo
    \setbox\@tempboxb\vbox to\headheight{\the\@typepagetoks\par\vss}%
    \dp\@tempboxb\z@
    \def\@oddhead{\box\@tempboxb\hfil}%
    \let\@evenhead\@oddhead
    \let\@oddfoot\@empty
    \let\@evenfoot\@oddfoot
}

% Definition of 'myheadings' page style

\def\ps@myheadings{\let\@mkboth\@gobbletwo
  \def\@oddhead{\small\rightmark \hfil\thepage}\let\@oddfoot\@empty
  \def\@evenhead{\small\thepage\hfil\leftmark}\let\@evenfoot\@empty
  \let\chaptermark\@gobble \let\sectionmark\@gobble}

% Definition of 'plain' page style

\def\ps@plain{\let\@mkboth\@gobbletwo
     \let\@oddhead\@empty \let\@evenhead\@empty
     \def\@oddfoot{\defaultfont\small \hfil\thepage\hfil}%
     \let\@evenfoot\@oddfoot}

%    ****************************************
%    *           INITIALIZATION             *
%    ****************************************
%
% Default initializations

\hfuzz=1pt
\vfuzz=\hfuzz

\ps@headings                % `headings' page style
\pagenumbering{arabic}      % Arabic page numbers
\onecolumn                  % Single-column.

\raggedbottom

%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\endinput
%%
%% End of file `hilbert.sty'.
