home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Tex / Tex29 / StTeXmac.zoo / macros / amsppt.sty < prev    next >
Text File  |  1988-10-16  |  21KB  |  526 lines

  1. % NOTE 1, NOTE 2, ... REFER TO NOTES IN THE FILE AMSPPT.DOC
  2.  
  3. \catcode`\@=11
  4.  
  5. %  PARAMETERS DIFFERENT THAN IN PLAIN
  6.  
  7. \normallineskiplimit=1pt
  8. \parindent 10pt
  9. \hsize 26pc
  10. \vsize 42pc
  11.  
  12.  
  13. % EXTRA FONTS NEEDED
  14.  
  15.  
  16. \font\eightrm=amr8
  17. \font\sixrm=amr6
  18. \font\eighti=ammi8 \skewchar\eighti='177
  19. \font\sixi=ammi6 \skewchar\sixi='177
  20. \font\eightsy=amsy8 \skewchar\eightsy='60
  21. \font\sixsy=amsy6 \skewchar\sixsy='60
  22. \font\eightbf=ambx8
  23. \font\sixbf=ambx6
  24. \font\eightsl=amsl8
  25. \font\eightit=amti8
  26. \font\tensmc=amcsc10
  27.  
  28. % TWO DIFFERENT POINT SIZES
  29.  
  30. \def\tenpoint{\def\pointsize@AmS{t}\normalbaselineskip=12pt            % NOTE 1
  31.  \abovedisplayskip 12pt plus 3pt minus 9pt
  32.  \belowdisplayskip 12pt plus 3pt minus 9pt
  33.  \abovedisplayshortskip 0pt plus 3pt
  34.  \belowdisplayshortskip 7pt plus 3pt minus 4pt
  35.  \def\rm{\fam0\tenrm}%
  36.  \def\it{\fam\itfam\tenit}%
  37.  \def\sl{\fam\slfam\tensl}%
  38.  \def\bf{\fam\bffam\tenbf}%
  39.  \def\smc{\tensmc}%
  40.  \def\mit{\fam 1}%
  41.  \def\cal{\fam 2}%
  42.  \textfont0=\tenrm   \scriptfont0=\sevenrm   \scriptscriptfont0=\fiverm
  43.  \textfont1=\teni    \scriptfont1=\seveni    \scriptscriptfont1=\fivei
  44.  \textfont2=\tensy   \scriptfont2=\sevensy   \scriptscriptfont2=\fivesy
  45.  \textfont3=\tenex   \scriptfont3=\tenex     \scriptscriptfont3=\tenex
  46.  \textfont\itfam=\tenit
  47.  \textfont\slfam=\tensl
  48.  \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
  49.    \scriptscriptfont\bffam=\fivebf
  50. \normalbaselines\rm}
  51.  
  52. \def\eightpoint{\def\pointsize@AmS{8}\normalbaselineskip=10pt
  53.  \abovedisplayskip 10pt plus 2.4pt minus 7.2pt
  54.  \belowdisplayskip 10pt plus 2.4pt minus 7.2pt
  55.  \abovedisplayshortskip 0pt plus 2.4pt
  56.  \belowdisplayshortskip 5.6pt plus 2.4pt minus 3.2pt
  57.  \def\rm{\fam0\eightrm}%
  58.  \def\it{\fam\itfam\eightit}%
  59.  \def\sl{\fam\slfam\eightsl}%
  60.  \def\bf{\fam\bffam\eightbf}%
  61.  \def\mit{\fam 1}%
  62.  \def\cal{\fam 2}%
  63.  \textfont0=\eightrm   \scriptfont0=\sixrm   \scriptscriptfont0=\fiverm
  64.  \textfont1=\eighti    \scriptfont1=\sixi    \scriptscriptfont1=\fivei
  65.  \textfont2=\eightsy   \scriptfont2=\sixsy   \scriptscriptfont2=\fivesy
  66.  \textfont3=\tenex   \scriptfont3=\tenex     \scriptscriptfont3=\tenex
  67.  \textfont\itfam=\eightit
  68.  \textfont\slfam=\eightsl
  69.  \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
  70.    \scriptscriptfont\bffam=\fivebf
  71. \normalbaselines\rm}
  72.  
  73. %  GENERAL FOOTNOTES                                                   % NOTE 2
  74.  
  75. \newcount\footmarkcount@AmS
  76. \footmarkcount@AmS=0
  77. \newcount\foottextcount@AmS
  78. \foottextcount@AmS=0
  79.  
  80. \def\footnotemark{\unskip\futurelet\tok@AmS\footnotemark@AmS}
  81. \def\footnotemark@AmS{\ifx [\tok@AmS \def\next@AmS{\footnotemark@@AmS}\else
  82.    \def\next@AmS{\footnotemark@@@AmS}\fi\next@AmS}
  83. \def\footnotemark@@AmS[#1]{{#1}}
  84. \def\footnotemark@@@AmS{\global\advance\footmarkcount@AmS by 1
  85.  \xdef\thefootmarkcount@AmS{\the\footmarkcount@AmS}$^{\thefootmarkcount@AmS}$}
  86.  
  87. \def\makefootnote@AmS#1#2{\insert\footins{\interlinepenalty100
  88.    \eightpoint
  89.   \splittopskip=6.8pt
  90.   \splitmaxdepth=2.8pt
  91.    \floatingpenalty=20000
  92.    \leftskip = 0pt  \rightskip = 0pt
  93.     \noindent {#1}\footstrut{\ignorespaces#2\unskip}\topsmash{\strut}}}
  94.  
  95. \def\footnotetext{\futurelet\tok@AmS\footnotetext@}
  96. \def\footnotetext@{\ifx [\tok@AmS \def\next@AmS{\footnotetext@@AmS}\else
  97.   \def\next@AmS{\footnotetext@@@AmS}\fi\next@AmS}
  98. \def\footnotetext@@AmS[#1]#2{\makefootnote@AmS{#1}{#2}}
  99. \def\footnotetext@@@AmS#1{\global\advance\foottextcount@AmS by 1
  100.   \xdef\thefoottextcount@AmS{\the\foottextcount@AmS}%
  101. \makefootnote@AmS{$^{\thefoottextcount@AmS}$}{#1}}
  102.  
  103. \def\footnote{\unskip\futurelet\tok@AmS\footnote@AmS}
  104. \def\footnote@AmS{\ifx [\tok@AmS \def\next@AmS{\footnote@@AmS}\else
  105.    \def\next@AmS{\footnote@@@AmS}\fi\next@AmS}
  106. \def\footnote@@AmS[#1]#2{{\edef\sf{\the\spacefactor}%
  107.   {#1}\makefootnote@AmS{#1}{#2}\spacefactor=\sf}}
  108. \def\footnote@@@AmS#1{\ifnum\footmarkcount@AmS=\foottextcount@AmS\else
  109.  \errmessage{AmS-TeX warning: last footnote marker was \the\footmarkcount@AmS,
  110.    last footnote was
  111.    \the\foottextcount@AmS}\footmarkcount@AmS=\foottextcount@AmS\fi
  112.    {\edef\sf{\the\spacefactor}\footnotemark@@@AmS\footnotetext@@@AmS{#1}%
  113.     \spacefactor=\sf}}
  114.  
  115. \def\adjustfootnotemark#1{\advance\footmarkcount@AmS by #1}           % NOTE 3
  116. \def\adjustfootnote#1{\advance\foottextcount@AmS by #1}
  117.  
  118.  
  119. %  TOP MATTER
  120.  
  121. \def\topmatter@AmS{F}                                                 % NOTE 4
  122. \def\topmatter{\def\topmatter@AmS{T}}
  123.  
  124. \def\filhss@AmS{plus 1000pt}                                          % NOTE 5
  125. \def\overlong{\def\filhss@AmS{plus 1000pt minus1000pt}}
  126.  
  127. \newbox\titlebox@AmS
  128.  
  129. \setbox\titlebox@AmS=\vbox{}                                          % NOTE 6
  130.  
  131. \def\title#1\endtitle{{\let\\=\cr                                     % NOTE 7
  132.   \global\setbox\titlebox@AmS=\vbox{\tabskip0pt\filhss@AmS
  133.   \halign to \hsize
  134.     {\tenpoint\bf\hfil\ignorespaces##\unskip\hfil\cr#1\cr}}}\def     % NOTE 7.1
  135.      \filhss@AmSs{plus 1000pt}}
  136.  
  137.  
  138.  
  139. \def\isauthor@AmS{F}                                                % NOTE 8
  140. \newbox\authorbox@AmS
  141.  
  142. \def\author#1\endauthor{\gdef\isauthor@AmS{T}{\let\\=\cr
  143.  \global\setbox\authorbox@AmS=\vbox{\tabskip0pt
  144.  \filhss@AmS\halign to \hsize
  145.    {\tenpoint\smc\hfil\ignorespaces##\unskip\hfil\cr#1\cr}}}\def
  146.       \filhss@AmS{plus 1000pt}}
  147.  
  148.  
  149.  
  150. %  FOR UPPERCASING TITLE AND AUTHOR
  151.  
  152. \def\uctext@AmS#1{\uppercase@AmS#1\gdef                           % NOTE 9
  153.        \uppercase@@AmS{}${\hskip-2\mathsurround}$}
  154. \def\uppercase@AmS#1$#2${\gdef\uppercase@@AmS{\uppercase@AmS}\uppercase
  155.     {#1}${#2}$\uppercase@@AmS}
  156.  
  157.  
  158.  
  159. \newcount\Notes@AmS                                             % NOTE 10
  160.  
  161.  
  162. \def\sfootnote@AmS{\unskip\futurelet\tok@AmS\sfootnote@@AmS}
  163. \def\sfootnote@@AmS{\ifx [\tok@AmS \def\next@AmS{\sfootnote@@@AmS}\else
  164.     \def\next@AmS{\sfootnote@@@@AmS}\fi\next@AmS}
  165. \def\sfootnote@@@AmS[#1]#2{\global\toks@{#2}\advance\Notes@AmS by 1
  166.   \expandafter\xdef\csname Note\romannumeral\Notes@AmS @AmS\endcsname
  167.    {\the\toks@}}
  168. \def\sfootnote@@@@AmS#1{\global\toks@{#1}\global\advance\Notes@AmS by 1
  169.   \expandafter\xdef\csname Note\romannumeral\Notes@AmS @AmS\endcsname
  170.   {\the\toks@}}
  171.  
  172. \def\Sfootnote@AmS{\unskip\futurelet\tok@AmS\Sfootnote@@AmS}
  173. \def\Sfootnote@@AmS{\ifx [\tok@AmS \def\next@AmS{\Sfootnote@@@AmS}\else
  174.     \def\next@AmS{\Sfootnote@@@@AmS}\fi\next@AmS}
  175. \def\Sfootnote@@@AmS[#1]#2{{#1}\advance\Notes@AmS by 1
  176.   {\edef\sf{\the\spacefactor}\makefootnote@AmS{#1}{\csname
  177.      Note\romannumeral\Notes@AmS @AmS\endcsname}\spacefactor=\sf}}
  178. \def\Sfootnote@@@@AmS#1{\ifnum\footmarkcount@AmS=\foottextcount@AmS\else
  179.  \errmessage{AmS-TeX warning: last footnote marker was \the\footmarkcount@AmS,
  180.   last footnote was
  181.    \the\foottextcount@AmS}\footmarkcount@AmS=\foottextcount@AmS\fi
  182.  {\edef\sf{\the\spacefactor}\footnotemark@@@AmS \global\advance\Notes@AmS by 1
  183.     \footnotetext@@@AmS{\csname
  184.       Note\romannumeral\Notes@AmS @AmS\endcsname}\spacefactor=\sf}}
  185.  
  186.  
  187.  
  188. \def\TITLE#1\endTITLE                                           % NOTE 11
  189. {{\Notes@AmS=0 \let\\=\cr\let\footnote=\sfootnote@AmS
  190.    \setbox0=\vbox{\tabskip\centering
  191.   \halign to \hsize{\tenpoint\bf\ignorespaces##\unskip\cr#1\cr}}
  192.  \Notes@AmS=0   \let\footnote=\Sfootnote@AmS
  193.    \global\setbox\titlebox@AmS=\vbox{\tabskip0pt\filhss@AmS
  194. \halign to \hsize{\tenpoint\bf\hfil
  195.  \uctext@AmS{\ignorespaces##\unskip}\hfil\cr
  196.           #1\cr}}}\def\filhss@AmS{plus 1000pt}}
  197.  
  198.  
  199.  
  200. \def\AUTHOR#1\endAUTHOR{\gdef\isauthor@AmS{T}{\Notes@AmS=0 \let\\=\cr
  201.    \let\footnote=\sfootnote@AmS
  202.  \setbox0 =\vbox{\tabskip\centering\halign to \hsize{\tenpoint\smc
  203.    \ignorespaces##\unskip\cr#1\cr}}\Notes@AmS=0
  204.    \let\footnote=\Sfootnote@AmS
  205.   \global\setbox\authorbox@AmS=\vbox{\tabskip0pt\filhss@AmS\halign
  206.   to \hsize{\tenpoint\smc\hfil\uppercase{\ignorespaces
  207.      ##\unskip}\hfil\cr#1\cr}}}\def\filhss@AmS{plus 1000pt}}
  208.  
  209.  
  210.  
  211. % OTHER STUFF BEFORE \endtopmatter
  212.  
  213. \newcount\language@AmS                                            % NOTE 12
  214. \language@AmS=0
  215. \def\german{\language@AmS=1}
  216.  
  217. \def\abstractword@AmS{\ifcase \language@AmS ABSTRACT\or ZUSAMMENFASSUNG\fi}
  218. \def\logoword@AmS{\ifcase \language@AmS Typeset by \fi}
  219. \def\subjclassword@AmS{\ifcase \language@AmS
  220.      1980 Mathematics subject classifications \fi}
  221. \def\keywordsword@AmS{\ifcase \language@AmS  Keywords and phrases\fi}
  222. \def\Referenceword@AmS{\ifcase \language@AmS References\fi}
  223.  
  224.  
  225. \def\isaffil@AmS{F}
  226. \newbox\affilbox@AmS
  227. \def\affil{\gdef\isaffil@AmS{T}\bgroup\let\\=\cr
  228.    \global\setbox\affilbox@AmS
  229.      =\vbox\bgroup\tabskip0pt\filhss@AmS
  230.  \halign to \hsize\bgroup\tenpoint\hfil\ignorespaces##\unskip\hfil\cr}
  231.  
  232. \def\endaffil{\cr\egroup\egroup\egroup\def\filhss@AmS{plus 1000pt}}
  233.  
  234. \newcount\addresscount@AmS                                         % NOTE 13
  235. \addresscount@AmS=0
  236.  
  237. \def\address#1{\global\advance\addresscount@AmS by 1
  238.   \expandafter\gdef\csname address\romannumeral\addresscount@AmS\endcsname
  239.    {\noindent\eightpoint\ignorespaces#1\par}}
  240.  
  241. \def\isdate@AmS{F}                                                 % NOTE 14
  242. \def\date#1{\gdef\isdate@AmS{T}\gdef\date@AmS{\tenpoint\ignorespaces#1\unskip}}
  243.  
  244. \def\isthanks@AmS{F}
  245. \def\thanks#1{\gdef\isthanks@AmS{T}\gdef\thanks@AmS{\eightpoint\ignorespaces
  246.        #1\unskip}}
  247.  
  248. \def\keywords@AmS{}                                                % NOTE 15
  249. \def\keywords#1{\def\keywords@AmS{\noindent \eightpoint \it
  250. \keywordsword@AmS .\enspace \rm\ignorespaces#1\par}}
  251.  
  252. \def\subjclass@AmS{}
  253. \def\subjclass#1{\def\subjclass@AmS{\noindent \eightpoint\it
  254. \subjclassword@AmS
  255. (Amer.\ Math.\ Soc.)\/\rm: \ignorespaces#1\par}}
  256.  
  257. \def\isabstract@AmS{F}
  258. \long\def\abstract#1{\gdef\isabstract@AmS{T}\long\gdef\abstract@AmS
  259.    {\eightpoint \abstractword@AmS\period\ignorespaces #1\par}}        % NOTE 16
  260.  
  261.  
  262. % ALLOW FOR SPECIAL THINGS BEFORE PARTS OF THE TOPMATTER              % NOTE 17
  263.  
  264. \def\pretitle{}
  265. \def\preauthor{}
  266. \def\preaffil{}
  267. \def\predate{}
  268. \def\preabstract{}
  269. \def\prepaper{}
  270.  
  271.  
  272. % \endtopmatter PUTS ALL THE PRELIMINARY STUFF ON THE FIRST PAGE IN PLACE
  273.  
  274. \def\endtopmatter{\if F\topmatter@AmS \errmessage{AmS-TeX warning: You
  275.     forgot the \string\topmatter, but I forgive you.}\fi
  276. \hrule height 0pt \vskip -\topskip                                   % NOTE 18
  277.    \pretitle
  278.    \vskip 24pt plus 12pt minus 12pt
  279.    \unvbox\titlebox@AmS                                              % NOTE 19
  280.    \preauthor
  281.    \if T\isauthor@AmS \vskip 12pt plus 6pt minus 3pt
  282.        \unvbox\authorbox@AmS \else\fi
  283.     \preaffil
  284.    \if T\isaffil@AmS \vskip 10pt plus 5pt minus 2pt
  285.        \unvbox\affilbox@AmS\else\fi
  286.   \predate
  287.    \if T\isdate@AmS \vskip 6pt plus 2pt minus 1pt
  288.   \hbox to \hsize{\hfil\date@AmS\hfil}\else\fi
  289.     \preabstract
  290. \if T\isthanks@AmS
  291.   \makefootnote@AmS{}{\thanks@AmS}\else\fi
  292.    \if T\isabstract@AmS \vskip 15pt plus 12pt minus 12pt
  293.  {\leftskip=16pt\rightskip=16pt
  294.   \noindent \abstract@AmS}\else\fi
  295.    \prepaper
  296.      \vskip 18pt plus 12pt minus 6pt \tenpoint}
  297.  
  298.  
  299. % \enddocument PUTS ALL THE PRELIMINARY STUFF THAT APPEARS AT THE END IN PLACE
  300.  
  301. \newcount\addresnum@AmS                                               % NOTE 20
  302. \def\enddocument{\penalty10000 \sfcode`\.3000\vskip 12pt minus 6pt  % NOTE 20.1
  303. \keywords@AmS                                                         % NOTE 21
  304. \subjclass@AmS
  305. \addresnum@AmS=0
  306.   \loop\ifnum\addresnum@AmS<\addresscount@AmS\advance\addresnum@AmS by 1
  307.   \csname address\romannumeral\addresnum@AmS\endcsname\repeat
  308. \vfill\supereject\end}
  309.  
  310.  
  311.  
  312. % HEADINGS AND SUBHEADINGS
  313.  
  314. \newbox\headingbox@AmS
  315. \outer\def\heading{\medbreak\bgroup\let\\=\cr
  316. \global\setbox\headingbox@AmS=\vbox\bgroup\tabskip0pt\filhss@AmS      % NOTE 22
  317.    \halign to \hsize\bgroup\tenpoint\smc\hfil\ignorespaces
  318.             ##\unskip\hfil\cr}
  319.  
  320. \def\endheading{\cr\egroup\egroup\egroup\unvbox\headingbox@AmS
  321.     \penalty10000 \def\filhss@AmS{plus 1000pt}\medskip}
  322.  
  323. \def\subheading#1{\smallbreak\noindent{\tenpoint\bf\ignorespaces
  324.    #1\unskip.\enspace}\ignorespaces}
  325.  
  326.  
  327. %  PROCLAIM AND DEMO, ETC.
  328.  
  329.  
  330. \outer\def\proclaim#1{\xdef\curfont@AmS{\the\font}\medbreak        % NOTE 23
  331.   \noindent\smc\ignorespaces#1\unskip.\enspace\sl\ignorespaces}
  332.  
  333. \outer\def\proclaimnp#1{\xdef\curfont@AmS{\the\font}\medbreak      % NOTE 24
  334.   \noindent\smc\ignorespaces#1\enspace\sl\ignorespaces}
  335.  
  336. \def\finishproclaim{\par\curfont@AmS\ifdim\lastskip<\medskipamount % NOTE 25
  337.  \removelastskip \penalty 55\medskip\fi}
  338.  
  339. \let\endproclaim=\finishproclaim
  340. \let\finishproclaimnp=\finishproclaim
  341. \let\endproclaimnp=\finishproclaim
  342.  
  343. \outer\def\demo#1{\par\ifdim\lastskip<\smallskipamount
  344.   \removelastskip\smallskip\fi\noindent{\smc\ignorespaces#1\unskip:}\enspace
  345.      \ignorespaces}
  346.  
  347. \outer\def\demonp#1{\ifdim\lastskip<\smallskipamount
  348.   \removelastskip\smallskip\fi\noindent{\smc#1}\enspace\ignorespaces}
  349.  
  350. \def\finishdemo{\par\smallskip}
  351.  
  352. \let\enddemo=\finishdemo
  353. \let\finishdemonp=\finishdemo
  354. \let\enddemonp=\finishdemo
  355.  
  356. \def\novspacechange{\penalty10000 \vskip-100pt                        % NOTE 26
  357.           \penalty10000 \vskip100pt}
  358.  
  359. \def\qed{\hbox{\hskip 1pt \vrule width4pt height 6pt depth 1.5pt \hskip 1pt}}
  360.  
  361. \newif\ifrunin@AmS                                                    % NOTE 27
  362. \runin@AmSfalse
  363. \def\runin{\runin@AmStrue}
  364. \def\conditions{\def\\##1:{\par\noindent                              % NOTE 28
  365.    \hbox to 1.5\parindent{\hss\rm\ignorespaces##1\unskip}%
  366.       \hskip .5\parindent \hangafter1\hangindent2\parindent\ignorespaces}%
  367.     \def\firstcon@AmS##1:{\ifrunin@AmS
  368.      {\rm\ignorespaces##1\unskip}\ \ignorespaces
  369.   \else\par\ifdim\lastskip<\smallskipamount\removelastskip\penalty55
  370.      \smallskip\fi
  371.      \\##1:\fi}\firstcon@AmS}
  372. \def\endconditions{\par\smallbreak\runin@AmSfalse}                    % NOTE 29
  373.  
  374. % STUFF FOR BIBLIOGRAPHY
  375.  
  376. \def\refto#1{\in@AmS,{#1}\if T\cresult@AmS\refto@AmS#1\end@AmS\else   % NOTE 30
  377.     [{\bf#1}]\fi}
  378. \def\refto@AmS#1,#2\end@AmS{[{\bf#1},#2]}
  379.  
  380. \def\Refs{\bigbreak\hbox to \hsize{\hfil\tenpoint
  381.     \smc \Referenceword@AmS\hfil}\penalty 10000
  382.       \bigskip\eightpoint\sfcode`.=1000 }                             % NOTE 31
  383.  
  384. \newbox\nobox@AmS        \newbox\keybox@AmS        \newbox\bybox@AmS  % NOTE 32
  385. \newbox\bysamebox@AmS    \newbox\paperbox@AmS      \newbox\paperinfobox@AmS
  386. \newbox\jourbox@AmS      \newbox\volbox@AmS        \newbox\issuebox@AmS
  387. \newbox\yrbox@AmS        \newbox\pagesbox@AmS      \newbox\bookbox@AmS
  388. \newbox\bookinfobox@AmS  \newbox\publbox@AmS       \newbox\publaddrbox@AmS
  389. \newbox\finalinfobox@AmS
  390.  
  391.  
  392.  
  393. \def\refset@AmS#1{\expandafter\gdef\csname is\expandafter\eat@AmS     % NOTE 33
  394.   \string#1@AmS\endcsname{F}\expandafter
  395.   \setbox\csname \expandafter\eat@AmS\string#1box@AmS\endcsname=\null}
  396.  
  397. \def\ref@AmS{\refset@AmS\no \refset@AmS\key \refset@AmS\by            % NOTE 34
  398. \gdef\isbysame@AmS{F}%                                              % NOTE 35.1
  399.  \refset@AmS\paper
  400.   \refset@AmS\paperinfo \refset@AmS\jour \refset@AmS\vol
  401.   \refset@AmS\issue \refset@AmS\yr
  402.   \gdef\istoappear@AmS{F}%                                          % NOTE 35.2
  403.   \refset@AmS\pages
  404.   \gdef\ispage@AmS{F}%                                              % NOTE 35.3
  405.   \refset@AmS\book
  406.   \gdef\isinbook@AmS{F}%                                            % NOTE 35.4
  407.   \refset@AmS\bookinfo \refset@AmS\publ
  408.   \refset@AmS\publaddr \refset@AmS\finalinfo \bgroup
  409.      \ignorespaces}                                                   % NOTE 36
  410.  
  411. \def\ref{\noindent\hangindent 20pt \hangafter 1 \def\refi@AmS{T}%     % NOTE 37
  412.   \def\refl@AmS{F}\def\\{\egroup\endref@AmS\gdef\refi@AmS{F}\ref@AmS}\ref@AmS}
  413.  
  414. \def\refdef@AmS#1#2{\def#1{\egroup\expandafter                        % NOTE 38
  415.   \gdef\csname is\expandafter\eat@AmS
  416.   \string#1@AmS\endcsname{T}\expandafter\setbox
  417.    \csname \expandafter\eat@AmS\string#1box@AmS\endcsname=\hbox\bgroup#2}}
  418.  
  419. \refdef@AmS\no{} \refdef@AmS\key{} \refdef@AmS\by{}
  420. \def\bysame{\egroup\gdef\isbysame@AmS{T}\bgroup}                    % NOTE 39.1
  421. \refdef@AmS\paper\it
  422. \refdef@AmS\paperinfo{} \refdef@AmS\jour{} \refdef@AmS\vol\bf
  423. \refdef@AmS\issue{} \refdef@AmS\yr{}
  424. \def\toappear{\egroup\gdef\istoappear@AmS{T}\bgroup}                % NOTE 39.2
  425. \refdef@AmS\pages{}
  426. \def\page{\egroup\gdef\ispage@AmS{T}\setbox
  427.                  \pagesbox@AmS=\hbox\bgroup}                        % NOTE 39.3
  428. \refdef@AmS\book{}
  429. \def\inbook{\egroup\gdef\isinbook@AmS{T}\setbox
  430.                                \bookbox@AmS=\hbox\bgroup}           % NOTE 39.4
  431. \refdef@AmS\bookinfo{} \refdef@AmS\publ{}
  432. \refdef@AmS\publaddr{}
  433. \refdef@AmS\finalinfo{}
  434.  
  435.  
  436. \def\setpunct@AmS{\def\prepunct@AmS{, }}                              % NOTE 40
  437. \def\ppunbox@AmS#1{\prepunct@AmS\unhbox#1\unskip}                     % NOTE 41
  438.  
  439. \def\endref@AmS{\def\prepunct@AmS{}%                                  % NOTE 42
  440. \if T\refi@AmS                                                      % NOTE 43.1
  441.   \if F\isno@AmS\hbox to 10pt{}\else                                % NOTE 43.2
  442.      \hbox to 20pt{\hss\unhbox\nobox@AmS\unskip. }\fi               % NOTE 43.3
  443.   \if T\iskey@AmS \unhbox\keybox@AmS\unskip\ \fi                    % NOTE 43.4
  444.   \if T\isby@AmS  \hbox{\unhcopy\bybox@AmS\unskip}\setpunct@AmS     % NOTE 43.5
  445.          \setbox\bysamebox@AmS=\hbox{\unhcopy\bybox@AmS\unskip}\fi  % NOTE 43.6
  446.   \if T\isbysame@AmS                                                % NOTE 43.7
  447.    \hbox to \wd\bysamebox@AmS{\leaders\hrule\hfill}\setpunct@AmS\fi
  448.  \fi                                                                % NOTE 43.8
  449.   \if T\ispaper@AmS\ppunbox@AmS\paperbox@AmS\setpunct@AmS\fi          % NOTE 44
  450.   \if T\ispaperinfo@AmS\ppunbox@AmS\paperinfobox@AmS\setpunct@AmS\fi  % NOTE 45
  451.   \if T\isjour@AmS\ppunbox@AmS\jourbox@AmS\setpunct@AmS               % NOTE 46
  452.      \if T\isvol@AmS \ \unhbox\volbox@AmS\unskip\setpunct@AmS\fi    % NOTE 46.1
  453.      \if T\isissue@AmS \ \unhbox\issuebox@AmS\unskip\setpunct@AmS\fi% NOTE 46.2
  454.      \if T\isyr@AmS \ (\unhbox\yrbox@AmS\unskip)\setpunct@AmS\fi    % NOTE 46.3
  455.      \if T\istoappear@AmS \ (to appear)\setpunct@AmS\fi             % NOTE 46.4
  456.      \if T\ispages@AmS \ppunbox@AmS\pagesbox@AmS\setpunct@AmS\fi    % NOTE 46.5
  457.      \if T\ispage@AmS                                               % NOTE 46.6
  458.            \prepunct@AmS p.\ \unhbox\pagesbox@AmS\unskip\setpunct@AmS\fi
  459.      \fi                                                            % NOTE 46.7
  460.   \if T\isbook@AmS \prepunct@AmS                                      % NOTE 47
  461.                      ``\unhbox\bookbox@AmS\unskip''\setpunct@AmS\fi
  462.   \if T\isinbook@AmS \prepunct@AmS                                    % NOTE 48
  463.     \unskip\ in ``\unhbox\bookbox@AmS\unskip''\setpunct@AmS
  464.        \gdef\isbook@AmS{T}\fi
  465.   \if T\isbookinfo@AmS \ppunbox@AmS\bookinfobox@AmS\setpunct@AmS\fi   % NOTE 49
  466.   \if T\ispubl@AmS \ppunbox@AmS\publbox@AmS\setpunct@AmS\fi           % NOTE 50
  467.   \if T\ispubladdr@AmS \ppunbox@AmS\publaddrbox@AmS\setpunct@AmS\fi   % NOTE 51
  468.  \if T\isbook@AmS                                                     % NOTE 52
  469.   \if T\isyr@AmS \prepunct@AmS \unhbox\yrbox@AmS\unskip             % NOTE 52.1
  470.               \setpunct@AmS\fi
  471.   \if T\istoappear@AmS \ (to appear)\setpunct@AmS\fi                % NOTE 52.2
  472.   \if T\ispages@AmS                                                 % NOTE 52.3
  473.     \prepunct@AmS pp.\ \unhbox\pagesbox@AmS\unskip\setpunct@AmS\fi
  474.   \if T\ispage@AmS                                                  % NOTE 52.4
  475.     \prepunct@AmS p.\ \unhbox\pagesbox@AmS\unskip\setpunct@AmS\fi
  476.  \fi
  477.   \if T\isfinalinfo@AmS \period\unhbox\finalinfobox@AmS\else          % NOTE 53
  478.     \if T\refl@AmS .\else ; \fi\fi}
  479.  
  480. \def\endref{\egroup\gdef\refl@AmS{T}\endref@AmS\par}
  481.  
  482.  
  483. %  OUTPUT
  484.  
  485. \newif\ifguides@AmS
  486. \guides@AmSfalse
  487. \def\guidelines{\guides@AmStrue}
  488. \def\noguidelines{\guides@AmSfalse}
  489. \def\guidelinegap#1{\def\gwidth@AmS{#1}}
  490. \def\gwidth@AmS{24pt}
  491.  
  492. \newif\iflogo@AmS
  493. \def\nologo{\logo@AmSfalse}
  494. \logo@AmStrue
  495.  
  496. \def\output@AmS{\ifnum\count0=1
  497.  \shipout\vbox{\ifguides@AmS\hrule width \hsize \vskip\gwidth@AmS \fi
  498.    \vbox to \vsize{\boxmaxdepth=\maxdepth\pagecontents}\baselineskip2pc
  499. \iflogo@AmS \hbox to \hsize{\hfil\eightpoint \logoword@AmS\AmSTeX}\fi
  500.      \ifguides@AmS \vskip\gwidth@AmS
  501. \hrule width \hsize\fi}\vsize 44pc\else
  502.    \shipout\vbox{\ifguides@AmS \hrule width \hsize \vskip\gwidth@AmS\fi
  503.    \vbox to \vsize{\boxmaxdepth=\maxdepth\pagecontents}\baselineskip2pc\hbox to
  504.   \hsize{\hfil \tenpoint\number\count0\hfil}\ifguides@AmS
  505.     \vskip\gwidth@AmS\hrule width \hsize\fi}\fi\global\advance\count0 by 1
  506.   \global\footmarkcount@AmS=0 \global\foottextcount@AmS=0
  507.  \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
  508.  
  509.  
  510. \def\footnoterule{\vskip-3pt
  511.         \hrule width 2truein \vskip 2.6pt } % the \hrule is .4pt high
  512.  
  513.  
  514. %  INITIAL STUFF
  515.  
  516. \def\document{}
  517.  
  518. \ask@AmS
  519.  
  520. \tenpoint
  521.  
  522. \catcode`\@=13
  523.  
  524.  
  525.  
  526.