%%%%%%%%%%                      amsppt.mor                      %%%%%%%%%%
%%%%%%%%%%                                      last modified:  11 Aug 87

\catcode`\@=11

%  Switches to determine whether or not page numbers are wanted.

\newif\ifP@geNumbers    \P@geNumberstrue
\def\nopagenumbers{\global\P@geNumbersfalse}

%  Switches to determine if running heads are to be used.
%  To select a style with running heads, include the command
%  \userunningheads  in the input file.

\newif\ifR@nHeads       \R@nHeadsfalse
\def\userunningheads{\global\R@nHeadstrue \nopagenumbers}


%  Define an appropriate headline, to be read by PLAIN's \makeheadline .
%  This is based on the headline example in the TeXbook, page 252.
%  Center the headline text and put page numbers at the outside corners.

\headline={\headlinefont\ifodd\pageno\rightheadline \else\leftheadline\fi}
\def\foliofont{\eightrm}
\def\headlinefont{\eightpoint}
\def\leftheadline{\rlap{\foliofont\folio}\hfill\leftheadtext\hfill}
\def\rightheadline{\hfill\rightheadtext\hfill \llap{\foliofont\folio}}
\def\leftheadtext{LEFT RUNNING HEAD}
\def\rightheadtext{RIGHT RUNNING HEAD}


%  Modify the AMSPPT output routine to include (optional) running heads and
%  (optionally) exclude page numbers at the bottom.  Provide and initialize
%  switch, instead of testing for \pageno=1, to determine first page of
%  document, to permit the starting page number to vary.

\newif\ifThisIsFirstPage        \ThisIsFirstPagetrue
\def\output@{%
 \ifThisIsFirstPage\global\ThisIsFirstPagefalse\shipout\vbox{\vbox to\vsize
  {\boxmaxdepth\maxdepth\pagecontents}\baselineskip2pc
  \iflogo@\hbox to\hsize{\hfil\eightpoint Typeset by \AmSTeX}\fi}\else
 \shipout\vbox{\ifR@nHeads\makeheadline\fi \vbox to\vsize
  {\boxmaxdepth\maxdepth\pagecontents}\baselineskip2pc
  \hbox to\hsize{\hfil\ifP@geNumbers\tenpoint\number\pageno\fi\hfil}}%
 \fi
 \global\advance\pageno\@ne
 \ifnum\outputpenalty>-\@MM\else\dosuperejet plus 2fil \@dblfpbot 0pt plus 1fil
\marginparpush 5pt 

\parskip 0pt plus 1pt \parindent 15pt \partopsep 2pt plus 1pt minus 1pt 
\@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 
\@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty
-\@lowpenalty 


\def\@makechapterhead#1{ \vspace*{50pt} { \parindent 0pt \raggedright 
 \ifnum \c@secnumdepth >\m@ne \huge\bf \@chapapp{} \thechapter \par 
 \vskip 20pt \fi \Huge \bf #1\par 
 \nobreak \vskip 40pt } }

\def\@makeschapterhead#1{ \vspace*{50pt} { \parindent 0pt \raggedright 
 \Huge \bf #1\par 
 \nobreak \vskip 40pt } }

\def\chapter{\cleardoublepage \thispagestyle{plain} \global\@topnum\z@
\@afterindentfalse \secdef\@chapter\@schapter} 
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
 \refstepcounter{chapter}
 \typeout{\@chapapp\space\thechapter.}
 \addcontentsline{toc}{chapter}{\protect
 \numberline{\thechapter}#1}\else
 \addcontentsline{toc}{chapter}{#1}\fi
 \chaptermark{#1}
 \addtocontents{lof}{\protect\addvspace{10pt}}
\addtocontents{lot}{\protect\addvspace{10pt}} \if@twocolumn
\@topnewpage[\@makechapterhead{#2}] 
 \else \@makechapterhead{#2}
 \@afterheading \fi} 
\def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
 \else \@makeschapterhead{#1} 
 \@afterheading\fi}

\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
 -.2ex}{2.3ex plus .2ex}{\Large\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
 -.2ex}{1.5ex plus .2ex}{\large\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
-1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
\def\paragraph{\@startsection
 {paragraph