home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 December / VPR9612A.ISO / WINTEX / AMS / AMSTEX / DOC / AMSPPT.DOC < prev    next >
Text File  |  1993-02-25  |  131KB  |  3,009 lines

  1. %% @texfile{
  2. %%     filename="amsppt.sty",
  3. \def\filename{amsppt.sty}
  4. %      filename="amsppt.doc",
  5. %%     version="2.1c",
  6. \def\fileversion{2.1c}
  7. %%     date="11-Dec-1992",
  8. \def\filedate{11-Dec-1992}
  9. %%     filetype="AMS-TeX: documentstyle",
  10. %%     copyright="Copyright (C) American Mathematical Society,
  11. %%            all rights reserved.  Copying of this file is
  12. %%            authorized only if either:
  13. %%            (1) you make absolutely no changes to your copy
  14. %%                including name; OR
  15. %%            (2) if you do make changes, you first rename it to some
  16. %%                other name.",
  17. %%     author="American Mathematical Society",
  18. %%     address="American Mathematical Society,
  19. %%            Technical Support Department,
  20. %%            P. O. Box 6248,
  21. %%            Providence, RI 02940,
  22. %%            USA",
  23. %%     telephone="401-455-4080 or (in the USA) 800-321-4AMS",
  24. %%     email="Internet: Tech-Support@Math.AMS.org",
  25. %%     codetable="ISO/ASCII",
  26. %%     checksum = "33694 3008 15390 127718",
  27. %%     keywords="amstex, ams-tex, tex",
  28. %%     abstract="This file is a documentstyle for use with
  29. %%       AMS-TeX 2.1. It exists in two forms: amsppt.doc, which
  30. %%       is the full form containing all technical documentation,
  31. %%       and amsppt.sty, which is identical except that all lines
  32. %%       beginning with a single percent sign are removed, to
  33. %%       make the file more rapid-loading when processed by
  34. %%       TeX."
  35. %%     }
  36. %
  37. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  38. %       -0- CONTENTS
  39. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  40. %       -0- Contents
  41. %       -1- Preliminary
  42. %       -2- Utility definitions
  43. %       -3- Fonts
  44. %       -4- Page dimensions and other global settings
  45. %       -5- Top matter definitions
  46. %       -6- Section headings
  47. %       -7- Theorem environments and similar structures
  48. %       -8- Rosters
  49. %       -9- Footnotes
  50. %      -10- Tables
  51. %      -11- Figure spaces and captions
  52. %      -12- Miscellaneous formatting macros
  53. %      -13- References/Bibliography
  54. %      -14- End of document
  55. %      -15- Output routine
  56. %      -16- Hyphenation exceptions
  57. %      -17- Notes
  58. %      -18- Appendix: Notes on version 2.1
  59. %      -19- Appendix: Notes on version 2.1a
  60. %
  61. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  62. %       -1- PRELIMINARY
  63. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  64. %
  65. %      AMSPPT.DOC contains all the code for AMSPPT.STY, with
  66. %      additional comments. AMSPPT.STY is produced by removing from
  67. %      AMSPPT.DOC all blank lines and lines beginning with a percent
  68. %      sign.  This is done to allow it to be loaded faster by TeX.
  69. %
  70. %      For the most part the internals of AMSPPT.STY aren't closely
  71. %      related to AMSTEX.TEX: AMSTEX.TEX handles mathematics,
  72. %      AMSPPT.STY handles visual design and overall structure of
  73. %      documents.  But some parts of AMSTEX.DOC are relevant, e.g.,
  74. %      the standard abbreviations \DN@, \RIfM@, etc., the description
  75. %      of "compressed format", the remarks about the "K-method", and
  76. %      the allocation of scratch registers and variables such as
  77. %      \toks@@.
  78. %
  79. %      The style produced by AMSPPT.STY is based on the style of the
  80. %      Journal of the American Mathematical Society (as of December
  81. %      1990), but is not intended to reproduce it exactly.  For one
  82. %      thing, most users of AMSPPT.STY will probably have Computer
  83. %      Modern fonts, while the Journal of the AMS uses Times Roman
  84. %      fonts licensed from Autologic, Inc.  This means that line
  85. %      breaks and page breaks are sure to change when a paper is
  86. %      submitted to the AMS.  For another thing, preprints naturally
  87. %      differ in some respects from articles in final published form:
  88. %      published articles generally have the journal name, volume and
  89. %      year of publication somewhere on the first page, a ``received
  90. %      by the editors'' date, subject classification numbers, perhaps
  91. %      key words and phrases, and an abstract, none of which are
  92. %      necessary in a preprint (though the last few are sometimes
  93. %      present).  In addition, the Journal of the AMS has a few
  94. %      idiosyncrasies such as placement of the abstract at the end of
  95. %      an article rather than at the beginning, and a non-zero value
  96. %      of \mathsurround, which were deemed inappropriate for inclusion
  97. %      in the preprint style (in particular, a non-zero \mathsurround
  98. %      would require the user to do extra work in certain situations
  99. %      to cancel unwanted side effects).  Since we are not matching
  100. %      the style of the Journal of the AMS exactly, we sometimes have
  101. %      rounded off measurements in AMSPPT.STY to convenient amounts
  102. %      such as \bigskipamount and \medskipamount or the nearest whole
  103. %      or half pica.  For example \belowheadskip is 7pt in the Journal
  104. %      of the AMS, but AMSPPT.STY uses 6pt (half a pica).
  105. %
  106. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  107. %
  108. %     Bug in amsppt.sty version 2.1 left \amsppt.sty = \endinput
  109. %     after the file was loaded. This will fix it if amsppt.sty
  110. %     was put in the format file.
  111. %
  112. \expandafter\ifx\csname amsppt.sty\endcsname\endinput
  113.   \expandafter\def\csname amsppt.sty\endcsname{2.1 (1-JUL-1991)}\fi
  114. %
  115. %    Check to see if this file was previously loaded and, if so,
  116. %    if the version numbers agree.
  117. %
  118. \xdef\fileversiontest{\fileversion\space(\filedate)}
  119. \expandafter\ifx\csname\filename\endcsname\fileversiontest
  120. %    Then file is already loaded, and versions agree. Quit here.
  121. %    \endinput and \fi MUST be on the same line:
  122.   \message{[already loaded]}\endinput\fi
  123. %
  124. %    If the file versions disagree, we generate an error message,
  125. %    but we don't do an \endinput: maybe the user will want to
  126. %    continue, inputting the new version, and see what happens.
  127. %
  128. \expandafter\ifx\csname\filename\endcsname\relax % file not yet loaded
  129.   \else\errmessage{Discrepancy in `\filename' file versions:
  130.      version \csname\filename\endcsname\space already loaded, trying
  131.      now to load version \fileversiontest}\fi
  132. %
  133. %    Since we are about to change the catcode of @, we define
  134. %    \csname\filename\endcsname to set the catcode back to its previous
  135. %    value. Furthermore, it then redefines itself to record the file
  136. %    version number for future reference (e.g., the test above).
  137. %
  138. \expandafter\xdef\csname\filename\endcsname{%
  139.   \catcode`\noexpand\@=\the\catcode`\@
  140.   \expandafter\gdef\csname\filename\endcsname{%
  141.      \fileversion\space(\filedate)}}
  142. %
  143. %    Enable the use of @ as letter in `private' control sequence names.
  144. %    Cf. TeXbook, p. 344 (above the \mathcode table).
  145. %
  146. \catcode`\@=11
  147. %
  148. %    Besides putting the file version on screen, this message also
  149. %    records it in the transcript/log file (which is useful for
  150. %    troubleshooting). The file name was already given on screen and in
  151. %    the transcript file by TeX, as part of the automatic processing
  152. %    surrounding file input.
  153. %
  154. \message{version \fileversion\space(\filedate):}
  155. %
  156. %    If another documentstyle inputs amsppt.sty, it should define
  157. %    \styname and \styversion appropriately. We use an `ifundefined'
  158. %    test to avoid overriding the definitions, in that case.
  159. \expandafter\ifx\csname styname\endcsname\relax
  160.   \def\styname{AMSPPT}\def\styversion{2.1a}
  161. \fi
  162. %
  163. %      In AMSPPT.STY we follow the convention in amstex.tex of
  164. %      appending @ signs at the end of control sequences, rather than
  165. %      substituting @ signs for vowels as is frequently done in
  166. %      plain.tex.
  167. %
  168. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  169. %      -2- UTILITY DEFINITIONS
  170. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  171. \message{Loading utility definitions,}
  172. %
  173. %      For several macros, e.g., \title, we want to allow the user the
  174. %      following two options:
  175. %
  176. %      \title xxx\endtitle
  177. %      \title\nofrills xxx\endtitle
  178. %
  179. %      In the first case, we want the text of the title to be stored
  180. %      in a box for later use.  In the second case, we want certain
  181. %      parts of the typesetting to be omitted when constructing the
  182. %      box.  Internally this is done by prefixing them with \frills@,
  183. %      which in the normal cases is simply an identity function
  184. %      (\let\frills@\identity@), whereas in the nofrills case it
  185. %      gobbles its argument (\let\frills@\eat@).
  186. %
  187. %      In order to test for \nofrills we have to use \futurelet
  188. %      (because if \nofrills is absent, we don't want to do anything
  189. %      that might affect the actual text of the title, such as
  190. %      stripping braces or adding an unwanted extra pair around the
  191. %      first token or group).
  192. %
  193. \def\identity@#1{#1}
  194. %
  195. \def\nofrills@@#1{%
  196. %      This extra step in defining \next@ is a precaution in case #1
  197. %      might be more than one token.
  198.  \DN@{#1}%
  199.  \ifx\next\nofrills \let\frills@\eat@
  200.    \expandafter\expandafter\expandafter\next@\expandafter\eat@
  201.   \else \let\frills@\identity@\expandafter\next@\fi}
  202. %
  203. \def\nofrillscheck#1{\def\nofrills@{\nofrills@@{#1}}%
  204.   \futurelet\next\nofrills@}
  205. %
  206. %      Typical use: if we want to execute a macro called \title, but
  207. %      check to see if \nofrills is coming up next, we do this:
  208. %
  209. %      ... \nofrillscheck\title
  210. %
  211. %      If indeed the next thing is \nofrills, then we will execute
  212. %      \nofrills@@ before calling \title again.  This involves some
  213. %      shuffling around in order for us to get back the ``real''
  214. %      definition of \title afterwards and yet still be able to use a
  215. %      control sequence named \title to read the argument. This is
  216. %      important in giving the user a useful error message if they
  217. %      accidentally omit or misspell the matching \endtitle or
  218. %      whatever. We could use instead the trick used with \align of
  219. %      adding a space onto the \csname with which we read the
  220. %      argument, but that would increase the use of hash size.
  221. %
  222. %      We define \usualspace to give a warning message if used in
  223. %      a place where it's not intended to be used:
  224. %
  225. \Invalid@\usualspace
  226. %
  227. %      Facility for adding to a token list, providing it was named
  228. %      with the particular naming convention that we require: an
  229. %      additional @ sign at the end of the control sequence name.
  230. %      Usage: \addto\tenpoint{...}
  231. %
  232. \def\addto#1#2{\csname \expandafter\eat@\string#1@\endcsname
  233.   \expandafter{\the\csname \expandafter\eat@\string#1@\endcsname#2}}
  234. %
  235. %      Fix Plain's \big, \Big, etc. macros so that they can scale with
  236. %      size changes.  The relations in \tenpoint are:
  237. %
  238. %             total    height above
  239. %             height   baseline
  240. %      --------------------------------------------------------------
  241. %      \big:   12pt    8.5   (12/2 = 6, + 2.5 (height of math axis))
  242. %      \Big:   18pt    11.5  (18/2 = 9, + 2.5 (height of math axis))
  243. %      \bigg:  24pt    14.5  (24/2 = 12, + 2.5 (height of math axis))
  244. %      \Bigg:  30pt    17.5  (30/2 = 15, + 2.5 (height of math axis))
  245. %
  246. %      In \tenpoint \bigsize@ will be set to 12pt, the height of an
  247. %      ordinary parenthesis in the roman font, x 1.2
  248. \newdimen\bigsize@
  249. %
  250. %      Using \vcenter automatically factors the height of the math
  251. %      axis into our sizing.  We set \nulldelimiterspace to zero,
  252. %      since we only want the delimiterspace from the \left delimiter.
  253. %
  254. \def\big@#1#2{{\hbox{$\left#2\vcenter to#1\bigsize@{}%
  255.   \right.\nulldelimiterspace\z@\m@th$}}}
  256. \def\big{\big@\@ne}
  257. \def\Big{\big@{1.5}}
  258. \def\bigg{\big@\tw@}
  259. \def\Bigg{\big@{2.5}}
  260. %
  261. %      Definition almost verbatim from TeXbook p. 317.  This is used
  262. %      in several places, currently (28-DEC-1989) including \head,
  263. %      \title, \author, \dedicatory, \affil, and \topcaption.
  264. %
  265. \def\raggedcenter@{\leftskip\z@ plus.4\hsize \rightskip\leftskip
  266.  \parfillskip\z@ \parindent\z@ \spaceskip.3333em \xspaceskip.5em
  267.  \pretolerance9999\tolerance9999 \exhyphenpenalty\@M
  268.  \hyphenpenalty\@M \let\\\linebreak}
  269. %
  270. %      We now define a version of \uppercase that sidesteps any math,
  271. %      to prevent uppercasing math variables.  In order to be handled
  272. %      properly the $..$ must be on the outer level (not enclosed in
  273. %      braces) but this is the usual case in our applications of
  274. %      \uppercasetext@. Also we increase inter-word space in the
  275. %      uppercase text. Footnotes are not handled by
  276. %      \uppercasetext@---a footnote within a \title would have to be
  277. %      done by using \footnotemark within the title and \footnotetext
  278. %      after. In most cases footnotes within a title are something for
  279. %      which the author should use \thanks or \affil or \address
  280. %      instead.
  281. %
  282. %      One other little problem: uppercasing of a few special
  283. %      characters like the German "ss" and the undotted i and j (\i
  284. %      and \j), used sometimes with accents.  We do some reassignments
  285. %      here to handle these.  We don't worry about restoring the
  286. %      lowercase special characters within math embedded in the text
  287. %      being uppercased---it's conceivable that someone might want to
  288. %      use them there, but too unlikely to need providing for.
  289. %      (Undotted i and j in math would be typed as \imath and \jmath,
  290. %      not as \i and \j.)
  291. %
  292. %      This is what plain.tex has for the special characters:
  293. %
  294. % \chardef\ss="19 \chardef\ae="1A \chardef\oe="1B \chardef\o="1C
  295. % \chardef\AE="1D \chardef\OE="1E \chardef\O="1F
  296. % \chardef\i="10 \chardef\j="11 % dotless letters
  297. % \def\aa{\accent23a}
  298. % \def\AA{\leavevmode\setbox0\hbox{h}\dimen@\ht0\advance\dimen@-1ex%
  299. %   \rlap{\raise.67\dimen@\hbox{\char'27}}A}
  300. % \def\l{\char32l}
  301. % \def\L{\leavevmode\setbox0\hbox{L}\hbox to\wd0{\hss\char32L}}
  302. %
  303. \def\uppercasetext@#1{%
  304.    {\spaceskip1.3\fontdimen2\the\font plus1.3\fontdimen3\the\font
  305.     \def\ss{SS}\let\i=I\let\j=J\let\ae\AE\let\oe\OE
  306.     \let\o\O\let\aa\AA\let\l\L
  307.     \skipmath@#1$\skipmath@$}}
  308. %
  309. \def\skipmath@#1$#2${\uppercase{#1}%
  310.   \ifx\skipmath@#2\else$#2$\expandafter\skipmath@\fi}
  311. %
  312. %      Macro to check for missing \endsomething.
  313. \def\add@missing#1{\expandafter\ifx\envir@end#1%
  314.   \Err@{You seem to have a missing or misspelled
  315.   \expandafter\string\envir@end ...}%
  316. %      It is useful to supply the necessary missing piece, especially
  317. %      in the case of \endref.
  318.   \envir@end
  319. \fi}
  320. %
  321. %      \revert@ and \envir@stack are for use by any environments that
  322. %      don't enclose their text in a group, e.g., \proclaim,
  323. %      \definition, \roster.
  324. %
  325. \newtoks\revert@
  326. %
  327. \def\envir@stack#1{\toks@\expandafter{\envir@end}%
  328.   \edef\next@{\def\noexpand\envir@end{\the\toks@}%
  329.     \revert@{\the\revert@}}%
  330.   \revert@\expandafter{\next@}%
  331.   \def\envir@end{#1}}
  332. %
  333. %      Some special trickery is necessary to get around the outerness
  334. %      of \enddocument
  335. \begingroup
  336. \catcode`\ =11
  337. \gdef\revert@envir#1{\expandafter\ifx\envir@end#1%
  338. %      restore previous \envir@end:
  339. \the\revert@%
  340. %      The space after \enddocument is significant:
  341. \else\ifx\envir@end\enddocument \Err@{Extra \string#1}%
  342. \else\expandafter\add@missing\envir@end\revert@envir#1%
  343. \fi\fi}
  344. %      This definition can be made here because \enddocument  has not
  345. %      yet been declared \outer.
  346. %      The space at the end of \enddocument is necessary:
  347. \xdef\enddocument {\string\enddocument}%
  348. %      The space at the end of \enddocument is necessary here also:
  349. \global\let\envir@end\enddocument %%%%%% don't remove the final space!
  350. \endgroup\relax
  351. %
  352. \def\first@#1#2\end{#1}
  353. \def\true@{TT}
  354. \def\false@{TF}
  355. \def\empty@{}
  356. %
  357. %      Test to see whether a given argument is empty or not.  If the
  358. %      argument = a single space, it will test the same as empty,
  359. %      which is in fact what we want.
  360. %
  361. \begingroup  \catcode`\-=3
  362. \long\gdef\notempty#1{%
  363. %      \empty@ is needed if we want the case #1 = {} to work properly:
  364.   \expandafter\ifx\first@#1-\end-\empty@ \false@\else \true@\fi}
  365. \endgroup
  366. %
  367. %
  368. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  369. %      -3- FONTS
  370. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  371. \message{more fonts,}
  372. %      Load some fonts that are not loaded in plain.tex, or only
  373. %      preloaded (which means that the font information is in TeX's
  374. %      memory but a control sequence name for the font still needs to
  375. %      be assigned). plain.tex only loads cmex10, because originally
  376. %      that was the only size available.  So we load cmex7 and later
  377. %      cmex8, but we don't load any smaller sizes, in order to
  378. %      conserve font memory; a need for the extension font in sizes
  379. %      smaller than 7-point is most unusual.  For subscript sums or
  380. %      other extension symbols in eightpoint text we will use cmex7
  381. %      rather than cmex6, to allow us to get away without loading
  382. %      cmex6.
  383. %
  384. %      We use \font@, not simply \font, so that these fonts will be
  385. %      handled properly by AMS-TeX's syntax check.
  386. %
  387. %      Postscript versions by Blue Sky Research of the math fonts from
  388. %      the AMSFonts package come only in sizes 10, 7 and 5, i.e. sizes
  389. %      8 and 6 are not included. Therefore we include a switch that
  390. %      can be set to determine which tfm files are used when loading
  391. %      the 8 and 6-point size fonts.
  392. %
  393. %%\def\PSAMSFonts{TT}%  Blue Sky PS AMS fonts: True
  394. \def\PSAMSFonts{TF}% Blue Sky PS AMS fonts: False
  395. %
  396. \font@\tensmc=cmcsc10 \relax
  397. \if\PSAMSFonts
  398.   \font@\sevenex=cmex10 at 7pt
  399. \else
  400.   \font@\sevenex=cmex7 \relax
  401. \fi
  402. %
  403. %      We need cmti7 in case \italic is used in a subscript or
  404. %      superscript. Once again we will conserve font space by not
  405. %      loading cmti6 or cmti5, and declare the \scriptfont in
  406. %      \eightpoint to be cmti7 rather than cmti6.  At least until we
  407. %      know that users actually are using \italic in sub-subscript
  408. %      size.
  409. %
  410. \font@\sevenit=cmti7 \relax
  411. %
  412. %      We have to load a lot of other fonts for eight-point text
  413. %      (footnotes, abstracts, bibliography).  Note that cmti and cmsl
  414. %      in sizes 5, 6 don't get loaded, since they may not exist (cmti7
  415. %      is one of the standard 75 Computer Modern fonts, but cmti5 and
  416. %      cmti6 aren't, nor are any of cmsl5, cmsl6, cmsl7).  AMSPPT
  417. %      provides for ten-point and eight-point font sets;
  418. %
  419. \font@\eightrm=cmr8 \relax % preloaded in plain.tex
  420. \font@\sixrm=cmr6 \relax % preloaded in plain.tex
  421. \font@\eighti=cmmi8 \relax     \skewchar\eighti='177 % preloaded
  422. \font@\sixi=cmmi6 \relax       \skewchar\sixi='177   % preloaded
  423. \font@\eightsy=cmsy8 \relax    \skewchar\eightsy='60 % preloaded
  424. \font@\sixsy=cmsy6 \relax      \skewchar\sixsy='60   % preloaded
  425. \if\PSAMSFonts
  426.   \font@\eightex=cmex10 at 8pt
  427. \else
  428.   \font@\eightex=cmex8 \relax
  429. \fi
  430. \font@\eightbf=cmbx8 \relax % preloaded in plain.tex
  431. \font@\sixbf=cmbx6 \relax   % preloaded in plain.tex
  432. \font@\eightit=cmti8 \relax % preloaded in plain.tex
  433. \font@\eightsl=cmsl8 \relax % preloaded in plain.tex
  434. \if\PSAMSFonts
  435.   \font@\eightsmc=cmcsc10 at 8pt
  436. \else
  437.   \font@\eightsmc=cmcsc8 \relax
  438. \fi
  439. \font@\eighttt=cmtt8 \relax % preloaded in plain.tex
  440. %
  441. %      NOTE THE DOUBLE PERCENT SIGNS:
  442. %% Nine-point fonts are not needed but are included here, commented
  443. %% out, to make it easier for a user to add them if they are needed.
  444. %
  445. %%\font@\ninerm=cmr9 \relax
  446. %%\font@\ninei=cmmi9 \relax   \skewchar\ninei='177
  447. %%\font@\ninesy=cmsy9 \relax  \skewchar\ninesy='60
  448. %%\if\PSAMSFONTS
  449. %%  \font@\nineex=cmex10 at9pt % non-AMSfonts substitute
  450. %%\else
  451. %%  \font@\nineex=cmex9 \relax
  452. %%\fi
  453. %%\font@\ninebf=cmbx9 \relax
  454. %%\font@\nineit=cmti9 \relax
  455. %%\font@\ninesl=cmsl9 \relax
  456. %%\font@\ninesmc=cmcsc9 \relax
  457. %%
  458. %%\font@\ninemsa=msam9 \relax
  459. %%\font@\ninemsb=msbm9 \relax
  460. %%\font@\nineeufm=eufm9 \relax
  461. %
  462. %      \UseAMSsymbols calls \loadmsam and \loadmsbm, then inputs the
  463. %      file amssym.tex, which defines all the symbol names of the extra
  464. %      math symbols in msam and msbm, as well as defining \frak and
  465. %      \goth for eufm. Exception: if version 2.1 or later of amsppt.sty
  466. %      is used together with amstex 2.0, \UseAMSsymbols doesn't
  467. %      automatically load the MSAM and MSBM fonts. Therefore we
  468. %      call \loadmsam and \loadmsbm in any case, since in version 2.1
  469. %      the redundant calls inside \UseAMSsymbols are harmless (note
  470. %      that in version 2.0 redundant calls of \loadxxx macros
  471. %      wastefully advanced the \newfam allocation counter).
  472. %
  473. %      If memory space is tight for control sequence names, the first
  474. %      thing to do is comment out the line containing "\UseAMSsymbols",
  475. %      and load special symbols only as needed, with \newsymbol.
  476. %
  477. %%     To use amsppt.sty without AMSFonts, comment out the following
  478. %%     two lines (and refer to the lines above that begin with double
  479. %%     percent signs); to load extra math symbols only on demand (with
  480. %%     \newsymbol) comment out the second line.
  481. \loadeufm \loadmsam \loadmsbm
  482. \message{symbol names}\UseAMSsymbols\message{,}
  483. %
  484. %      Now we define \tenpoint and \eightpoint for regular text and
  485. %      footnotes, similarly to the TeXbook, p. 414.  We not only
  486. %      change the \baselineskip, but also change the glue above and
  487. %      below displayed formulas, in case an abstract or footnote
  488. %      happens to have them.  We also need to set not only \strutbox,
  489. %      but also \strutbox@. The height of \strutbox@ is the height of
  490. %      \strutbox, minus the value of \normallineskiplimit.  And we
  491. %      will set \ex@ in each case (for \tenpoint it is supposed to be
  492. %      equivalent to 1pt, while for \eightpoint it will then
  493. %      presumably be equivalent to .8pt).
  494. %
  495. %      When \ifsyntax@ is true, so that we are checking syntax, then
  496. %      we won't bother specifying fonts (since we would only change
  497. %      them all to \dummyft@ anyway), and we simply let \big and its
  498. %      variants gobble up things with the proper syntax, instead of
  499. %      worrying about getting the right sizes.
  500. %
  501. %      \tenpoint@ is a hook where new material can be added.
  502. %      \topmatter makes use of this.  Note that to change the
  503. %      baselineskip to say 14pt, one should say
  504. %
  505. %      \addto\tenpoint{\normalbaselineskip14pt\normalbaselines}
  506. %
  507. %      rather than just \addto\tenpoint{\baselineskip14pt}
  508. %
  509. \newtoks\tenpoint@
  510. %
  511. \def\tenpoint{\normalbaselineskip12\p@
  512.  \abovedisplayskip12\p@ plus3\p@ minus9\p@
  513.  \belowdisplayskip\abovedisplayskip
  514.  \abovedisplayshortskip\z@ plus3\p@
  515.  \belowdisplayshortskip7\p@ plus3\p@ minus4\p@
  516.  \textonlyfont@\rm\tenrm \textonlyfont@\it\tenit
  517.  \textonlyfont@\sl\tensl \textonlyfont@\bf\tenbf
  518.  \textonlyfont@\smc\tensmc \textonlyfont@\tt\tentt
  519.  \ifsyntax@ \def\big##1{{\hbox{$\left##1\right.$}}}%
  520.   \let\Big\big \let\bigg\big \let\Bigg\big
  521.  \else
  522.    \textfont\z@\tenrm  \scriptfont\z@\sevenrm
  523.        \scriptscriptfont\z@\fiverm
  524.    \textfont\@ne\teni  \scriptfont\@ne\seveni
  525.        \scriptscriptfont\@ne\fivei
  526.    \textfont\tw@\tensy \scriptfont\tw@\sevensy
  527.        \scriptscriptfont\tw@\fivesy
  528.    \textfont\thr@@\tenex \scriptfont\thr@@\sevenex
  529.         \scriptscriptfont\thr@@\sevenex
  530.    \textfont\itfam\tenit \scriptfont\itfam\sevenit
  531.         \scriptscriptfont\itfam\sevenit
  532.    \textfont\bffam\tenbf \scriptfont\bffam\sevenbf
  533.         \scriptscriptfont\bffam\fivebf
  534.    \setbox\strutbox\hbox{\vrule height8.5\p@ depth3.5\p@ width\z@}%
  535. %      The height of \strutbox@ is supposed to be the height of
  536. %      \strutbox minus \normallineskip.  We take half from the top and
  537. %      half from the bottom.
  538.    \setbox\strutbox@\hbox{\lower.5\normallineskiplimit\vbox{%
  539.         \kern-\normallineskiplimit\copy\strutbox}}%
  540. %      We set \bigsize@ to the height of a parenthesis, times 1.2.
  541. %      \bigsize@ controls the height of \big, \Big, \bigg and \Bigg
  542. %      delimiters.
  543.    \setbox\z@\vbox{\hbox{$($}\kern\z@}\bigsize@1.2\ht\z@
  544.   \fi
  545. %      \ex@ is supposed to come out to 1pt; multiplication factor may
  546. %      need to be changed if Computer Modern is not being used. \jot,
  547. %      a dimen register usually used for extra spacing between lines
  548. %      of a multi-line displayed equation or similar structure, is
  549. %      reset to 3\ex@ (in plain.tex it is always 3pt, but in AMSPPT it
  550. %      may be reduced by \eightpoint).
  551.   \normalbaselines\rm\dotsspace@1.5mu\ex@.2326ex\jot3\ex@
  552.   \the\tenpoint@}
  553. %
  554. %      Like \tenpoint@, \eightpoint@ is a hook where extra material
  555. %      can be added to the definition of \eightpoint.
  556. %
  557. \newtoks\eightpoint@
  558. %
  559. \def\eightpoint{\normalbaselineskip10\p@
  560.  \abovedisplayskip10\p@ plus2.4\p@ minus7.2\p@
  561.  \belowdisplayskip\abovedisplayskip
  562.  \abovedisplayshortskip\z@ plus2.4\p@
  563.  \belowdisplayshortskip5.6\p@ plus2.4\p@ minus3.2\p@
  564.  \textonlyfont@\rm\eightrm \textonlyfont@\it\eightit
  565.  \textonlyfont@\sl\eightsl \textonlyfont@\bf\eightbf
  566.  \textonlyfont@\smc\eightsmc \textonlyfont@\tt\eighttt
  567.  \ifsyntax@\def\big##1{{\hbox{$\left##1\right.$}}}%
  568.   \let\Big\big \let\bigg\big \let\Bigg\big
  569.  \else
  570.   \textfont\z@\eightrm \scriptfont\z@\sixrm
  571.        \scriptscriptfont\z@\fiverm
  572.   \textfont\@ne\eighti \scriptfont\@ne\sixi
  573.        \scriptscriptfont\@ne\fivei
  574.   \textfont\tw@\eightsy \scriptfont\tw@\sixsy
  575.        \scriptscriptfont\tw@\fivesy
  576. %      The smallest size of the extension font currently available is
  577. %      7-point.
  578.   \textfont\thr@@\eightex \scriptfont\thr@@\sevenex
  579.    \scriptscriptfont\thr@@\sevenex
  580.   \textfont\itfam\eightit \scriptfont\itfam\sevenit
  581.    \scriptscriptfont\itfam\sevenit
  582.   \textfont\bffam\eightbf \scriptfont\bffam\sixbf
  583.    \scriptscriptfont\bffam\fivebf
  584.  \setbox\strutbox\hbox{\vrule height7\p@ depth3\p@ width\z@}%
  585. %      The height of \strutbox@ is supposed to be the height of
  586. %      \strutbox minus \normallineskip.  We take half from the top and
  587. %      half from the bottom.
  588.  \setbox\strutbox@\hbox{\raise.5\normallineskiplimit\vbox{%
  589.    \kern-\normallineskiplimit\copy\strutbox}}%
  590. %      We set \bigsize@ to the height of a parenthesis, times 1.2.
  591. %      \bigsize@ controls the height of \big, \Big, \bigg and \Bigg
  592. %      delimiters.
  593.  \setbox\z@\vbox{\hbox{$($}\kern\z@}\bigsize@1.2\ht\z@
  594.  \fi
  595. %      \ex@ is supposed to come out to .8pt; multiplication factor may
  596. %      need to be changed if Computer Modern is not being used. \jot,
  597. %      a dimen register usually used for extra spacing between lines
  598. %      of a multi-line displayed equation or similar structure, is
  599. %      reset to 3\ex@ (in plain.tex it is 3pt).
  600.  \normalbaselines\eightrm\dotsspace@1.5mu\ex@.2326ex\jot3\ex@
  601.  \the\eightpoint@}
  602. %
  603. %      \linespacing command to introduce a factor by which
  604. %      \normalbaselineskip will be multiplied. Multiplying by the
  605. %      factor will cause any stretch or shrink to be lost; normally
  606. %      that's not a problem.
  607. \def\linespacing#1{%
  608.   \addto\tenpoint{\normalbaselineskip=#1\normalbaselineskip
  609.     \normalbaselines
  610. %      Reset the strut boxes.
  611.     \setbox\strutbox=\hbox{\vrule height.7\normalbaselineskip
  612.       depth.3\normalbaselineskip}%
  613.     \setbox\strutbox@\hbox{\raise.5\normallineskiplimit
  614.       \vbox{\kern-\normallineskiplimit\copy\strutbox}}%
  615.   }%
  616.   \addto\eightpoint{\normalbaselineskip=#1\normalbaselineskip
  617.     \normalbaselines
  618. %      Reset the strut boxes.
  619.     \setbox\strutbox=\hbox{\vrule height.7\normalbaselineskip
  620.       depth.3\normalbaselineskip}%
  621.     \setbox\strutbox@\hbox{\raise.5\normallineskiplimit
  622.       \vbox{\kern-\normallineskiplimit\copy\strutbox}}%
  623.   }%
  624. }
  625. %
  626. \if\PSAMSFonts
  627.   \def\extrafont@#1#2#3{%
  628.     \font#1=#2%
  629. %    Concatenate the proper size spec to the preceding letters
  630.       \ifnum#3=9 10 at9pt%
  631.       \else\ifnum#3=8 10 at8pt%
  632.       \else\ifnum#3=6 7 at6pt%
  633. %      Sizes other than 9, 8 or 6 are not expected, so this branch might
  634. %      generate an error:
  635.               \else #3\fi\fi\fi\relax}
  636. \else
  637.   \def\extrafont@#1#2#3{\font#1=#2#3\relax}
  638. \fi
  639. %
  640. %      If the user has specified \loadeufb, \loadbold, \loadeusm,
  641. %      \loadeusm, \loadeurm, \loadeurb, we need to add eightpoint
  642. %      fonts.  We do this in \topmatter, and the user documentation
  643. %      instructs the user to include any \load... command between
  644. %      \documentstyle and \topmatter.
  645. %
  646. \def\loadextrasizes@#1#2#3#4#5#6#7{%
  647.  \ifx\undefined#1%
  648.  \else \extrafont@{#4}{#2}{8}\extrafont@{#6}{#2}{6}%
  649.    \ifsyntax@
  650.    \else
  651.      \addto\tenpoint{\textfont#1#3\scriptfont#1#5%
  652.        \scriptscriptfont#1#7}%
  653.     \addto\eightpoint{\textfont#1#4\scriptfont#1#6%
  654.        \scriptscriptfont#1#7}%
  655.    \fi
  656.  \fi
  657. }
  658. %
  659. \def\loadextrafonts@{%
  660.   \loadextrasizes@\msafam{msam}%
  661.     \tenmsa\eightmsa\sevenmsa\sixmsa\fivemsa
  662.   \loadextrasizes@\msbfam{msbm}%
  663.     \tenmsb\eightmsb\sevenmsb\sixmsb\fivemsb
  664.   \loadextrasizes@\eufmfam{eufm}%
  665.     \teneufm\eighteufm\seveneufm\sixeufm\fiveeufm
  666.   \loadextrasizes@\eufbfam{eufb}%
  667.     \teneufb\eighteufb\seveneufb\sixeufb\fiveeufb
  668.   \loadextrasizes@\eusmfam{eusm}%
  669.     \teneusm\eighteusm\seveneusm\sixeusm\fiveeusm
  670.   \loadextrasizes@\eusbfam{eusb}%
  671.     \teneusb\eighteusb\seveneusb\sixeusb\fiveeusb
  672.   \loadextrasizes@\eurmfam{eurm}%
  673.     \teneurm\eighteurm\seveneurm\sixeurm\fiveeurm
  674.   \loadextrasizes@\eurbfam{eurb}%
  675.     \teneurb\eighteurb\seveneurb\sixeurb\fiveeurb
  676.   \loadextrasizes@\cmmibfam{cmmib}%
  677.     \tencmmib\eightcmmib\sevencmmib\sixcmmib\fivecmmib
  678.   \loadextrasizes@\cmbsyfam{cmbsy}%
  679.     \tencmbsy\eightcmbsy\sevencmbsy\sixcmbsy\fivecmbsy
  680.   \let\loadextrafonts@\empty@
  681. }
  682. %
  683. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  684. %      -4- PAGE DIMENSIONS AND OTHER GLOBAL SETTINGS
  685. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  686. \message{page dimension settings,}
  687. %      First we set up some basic parameters, which are different than
  688. %      in plain.  These values are the ones currently in use (November
  689. %      1989) in the Journal of the AMS.
  690. %
  691. \parindent1pc
  692. \newdimen\normalparindent \normalparindent\parindent
  693. \normallineskiplimit\p@
  694. %
  695. %      We use a common indent value for setting left and right margins
  696. %      for abstract, table of contents, figure captions, and block
  697. %      environments. The name is chosen as if we are going to have
  698. %      several levels of indent, called \indenti, \indentii, ...; such
  699. %      names can be constructed using \csname and \romannumeral with a
  700. %      count register, which might be useful some time.
  701. %
  702. \newdimen\indenti \indenti=2pc
  703. %
  704. %      Provide a way to change the page height and width; changing the
  705. %      page width automatically adjusts the caption width as well.
  706. %      \pagewidth is in AMSTEX.TEX but it sets the caption width to a
  707. %      different value than the one we want.
  708. %
  709. \def\pageheight#1{\vsize#1\relax}
  710. \def\pagewidth#1{\hsize#1%
  711.    \captionwidth@\hsize \advance\captionwidth@-2\indenti}
  712. %
  713. %      The height we use here is the height of the ``text block'', not
  714. %      including the running heads, rather than the the height of the
  715. %      ``type block'', the total type area on the page. Thus from the
  716. %      Journal of the AMS type block measurement of 49pc  we subtract
  717. %      22.5pt for the running head  (see the plain.tex definition of
  718. %      \makeheadline)  and round to the nearest pica.
  719. %
  720. \pagewidth{30pc} \pageheight{47pc}
  721. %
  722. %      Change \magnification (from plain.tex) so that it doesn't reset the
  723. %      page dimensions to 6.5 x 9 true inches.
  724. \let\magnification=\mag
  725. %
  726. %
  727. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  728. %      -5- TOP MATTER DEFINITIONS
  729. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  730. \message{top matter,}
  731. %      After it's first called, since
  732. %      we do not need \topmatter any longer, we define it to be empty,
  733. %      to release the memory that the definition takes up.
  734. %
  735. \def\topmatter{\loadextrafonts@ \let\topmatter\relax}
  736. %
  737. %      \chapter is used within \title...\endtitle to produce something
  738. %      such as "CHAPTER II", centered above the main text of the
  739. %      chapter title. We do a little trickery with \afterassignment so
  740. %      that the user can remove not only the word "CHAPTER" but also
  741. %      the uppercasing and romannumeralizing by \nofrills.   Note that
  742. %      we can't use \ignorespaces after \chapter@ in the usual way
  743. %      because it would get in the way of the \count@ assignment.  In
  744. %      fact spaces will be ignored by the assignment operation, the
  745. %      only problem would be when \nofrills is used.
  746. %
  747. \def\chapterno@{\uppercase\expandafter{\romannumeral\chaptercount@}}
  748. %
  749. \newcount\chaptercount@
  750. %
  751. %      In order to avoid interfering with \topskip, we put the
  752. %      \chapter material in the first line of the title, and do some
  753. %      box and glue tricks to get it in position.
  754. %
  755. %      Perhaps need a test to make sure #1 is a number---if the user
  756. %      does \chapter{IV} instead of \chapter{4} they may not
  757. %      understand the error message they get.
  758. %
  759. %      \chaptercount@ assignment needs to be global because we are
  760. %      working from inside the first line of \title.
  761. %
  762. \def\chapter{\let\savedef@\chapter
  763.   \def\chapter##1{\let\chapter\savedef@
  764.   \leavevmode\hskip-\leftskip
  765. %      Put the \chapter stuff in an \rlap so it doesn't affect
  766. %      centering of the title, and in an "uplap" so it is placed above
  767. %      where we want it.
  768.    \rlap{\vbox to\z@{\vss\centerline{\eightpoint
  769. %      We do a baselineskip of 2pc from the base of the "CHAPTER"
  770. %      banner to the base of the first title line.  (The baseline of
  771. %      the \null will coincide with the baseline of the first title
  772. %      line.)
  773.    \frills@{CHAPTER\space\afterassignment\chapterno@
  774.        \global\chaptercount@=}%
  775.    ##1\unskip}\baselineskip2pc\null}}\hskip\leftskip}%
  776.  \nofrillscheck\chapter}
  777. %
  778. %      We store the title in a box using a \setbox.  It could also be
  779. %      done by defining \thetitle@.  One advantage of \setbox is that
  780. %      syntax errors within the title (say for math) are reported
  781. %      immediately instead of during the processing of \endtopmatter.
  782. %      The title box is always put on the page by \endtopmatter, even
  783. %      if it's empty. (With other pieces of the topmatter we check
  784. %      first to see whether there's any text to typeset and skip to
  785. %      the next item if not.) The text of the title is stored up for
  786. %      the running heads, unless \rightheadtoks is nonempty---then
  787. %      presumably the user has already used \rightheadtext to set the
  788. %      right-hand running head, in which case we leave it unchanged.
  789. %
  790. %      The default for titles is uppercasing.  From a design
  791. %      standpoint it might be preferable to do titles in 14-point text
  792. %      with initial caps, but since titles may potentially contain any
  793. %      kind of math, doing this would require a full-fledged
  794. %      \fourteenpoint analogous to \tenpoint.  So to give the title
  795. %      extra prominence we use uppercasing instead.  The uppercasing
  796. %      can be removed by \nofrills.
  797. %
  798. \newbox\titlebox@
  799. %
  800. \def\title{\let\savedef@\title
  801. %      We use a \vtop here because we want to know the height of the
  802. %      first line of the title when we start typesetting the
  803. %      topmatter.  In order to get the correct sinkage from the top of
  804. %      the page.
  805.  \def\title##1\endtitle{\let\title\savedef@
  806.    \global\setbox\titlebox@\vtop{\tenpoint\bf
  807.    \raggedcenter@
  808. %      Increased \baselineskip is because of the uppercasing.  We do
  809. %      it like this instead of putting it inside the \uppercasetext@
  810. %      macro, because it only applies where an entire paragraph is
  811. %      made up of uppercase text.
  812.    \baselineskip1.3\baselineskip
  813.    \frills@\uppercasetext@{##1}\endgraf}%
  814. %      Check to see if right and left hand running heads have been
  815. %      already assigned by the user---if so, don't override.
  816.  \ifmonograph@ \edef\next{\the\leftheadtoks}%
  817.     \ifx\next\empty@
  818.     \leftheadtext{##1}\fi
  819.  \fi
  820.  \edef\next{\the\rightheadtoks}\ifx\next\empty@ \rightheadtext{##1}\fi
  821.  }%
  822.  \nofrillscheck\title}
  823. %
  824. %      Currently \author has no need for a \nofrills option, unlike
  825. %      \title, since uppercasing is not done.
  826. %
  827. \newbox\authorbox@
  828. \def\author#1\endauthor{\global\setbox\authorbox@
  829.  \vbox{\tenpoint\smc\raggedcenter@
  830.  #1\endgraf}\relaxnext@ \edef\next{\the\leftheadtoks}%
  831.  \ifx\next\empty@\leftheadtext{#1}\fi}
  832. %
  833. \newbox\affilbox@
  834. \def\affil#1\endaffil{\global\setbox\affilbox@
  835.  \vbox{\tenpoint\raggedcenter@#1\endgraf}}
  836. %
  837. %      Since \address can be used any number of times, we have to
  838. %      store the different addresses in control sequences that we
  839. %      manufacture as needed. We use \addresscount@ to store the
  840. %      number of times \address is used.
  841. %
  842. \newcount\addresscount@
  843. \addresscount@\z@
  844. \def\address#1\endaddress{\global\advance\addresscount@\@ne
  845. %      The first address is `\address1', the next is `\address2', etc.
  846.   \expandafter\gdef\csname address\number\addresscount@\endcsname
  847. %      The unusually large shrinkability in the vskip before the
  848. %      address is there because we don't want the addresses to fall on
  849. %      a separate page at the end of a paper, and extra shrinkability
  850. %      may help them to fit on the previous page in borderline cases.
  851.   {\nobreak\vskip12\p@ minus6\p@\indent\eightpoint\smc#1\par}}
  852. %
  853. %      \curraddr was added in version 2.1.  It uses the address count
  854. %      without advancing it, to add to the most recent address macro.
  855. %
  856. \def\curraddr{\let\savedef@\curraddr
  857.   \def\curraddr##1\endcurraddr{\let\curraddr\savedef@
  858.   \toks@\expandafter\expandafter\expandafter{%
  859.        \csname address\number\addresscount@\endcsname}%
  860.   \toks@@{##1}%
  861.   \expandafter\xdef\csname address\number\addresscount@\endcsname
  862.   {\the\toks@\endgraf\noexpand\nobreak
  863.     \indent{\noexpand\rm
  864.     \frills@{{\noexpand\it Current address\noexpand\/}:\space}%
  865.     \def\noexpand\usualspace{\space}\the\toks@@\unskip}}}%
  866.   \nofrillscheck\curraddr}
  867. %
  868. %      \email uses the same counter as \address, since they should
  869. %      pair up.
  870. %
  871. \def\email{\let\savedef@\email
  872.   \def\email##1\endemail{\let\email\savedef@
  873.   \toks@{\def\usualspace{{\it\enspace}}\endgraf\indent\eightpoint}%
  874.   \toks@@{##1\par}%
  875.   \expandafter\xdef\csname email\number\addresscount@\endcsname
  876.   {\the\toks@\frills@{{\noexpand\it E-mail address\noexpand\/}:%
  877.      \noexpand\enspace}\the\toks@@}}%
  878.   \nofrillscheck\email}
  879. %
  880. \def\thedate@{}
  881. \def\date#1\enddate{\gdef\thedate@{\tenpoint#1\unskip}}
  882. %
  883. \def\thethanks@{}
  884. \def\thanks#1\endthanks{%
  885.   \ifx\thethanks@\empty@ \gdef\thethanks@{\eightpoint#1}%
  886.   \else
  887.     \expandafter\gdef\expandafter\thethanks@\expandafter{%
  888.      \thethanks@\endgraf#1}%
  889.   \fi}
  890. %
  891. \def\thekeywords@{}
  892. \def\keywords{\let\savedef@\keywords
  893.   \def\keywords##1\endkeywords{\let\keywords\savedef@
  894.   \toks@{\def\usualspace{{\it\enspace}}\eightpoint}%
  895.   \toks@@{##1\unskip.}%
  896.   \edef\thekeywords@{\the\toks@\frills@{{\noexpand\it
  897.     Key words and phrases.\noexpand\enspace}}\the\toks@@}}%
  898.  \nofrillscheck\keywords}
  899. %
  900. %      \subjclass is exactly analogous.
  901. %
  902. \def\thesubjclass@{}
  903. \def\subjclass{\let\savedef@\subjclass
  904.  \def\subjclass##1\endsubjclass{\let\subjclass\savedef@
  905.    \toks@{\def\usualspace{{\rm\enspace}}\eightpoint}%
  906.    \toks@@{##1\unskip.}%
  907.    \edef\thesubjclass@{\the\toks@
  908.      \frills@{{\noexpand\rm1991 {\noexpand\it Mathematics Subject
  909.        Classification}.\noexpand\enspace}}%
  910.      \the\toks@@}}%
  911.   \nofrillscheck\subjclass}
  912. %
  913. %      Put the abstract in a box with margins at each side equal to
  914. %      \indenti, obtained by reducing \hsize within a vbox centered by
  915. %      $$...$$.  Notice that the \noindent is not erased by \nofrills
  916. %      and that's what we want.
  917. %
  918. \newbox\abstractbox@
  919. \def\abstract{\let\savedef@\abstract
  920.  \def\abstract{\let\abstract\savedef@
  921.   \setbox\abstractbox@\vbox\bgroup\noindent$$\vbox\bgroup
  922.   \def\envir@end{\endabstract}\advance\hsize-2\indenti
  923.   \def\usualspace{\enspace}\eightpoint \noindent
  924.   \frills@{{\smc Abstract.\enspace}}}%
  925.  \nofrillscheck\abstract}
  926. %
  927. %      Finish the box.  The \unskip is here in case the abstract ends
  928. %      with something that adds vertical space, such as a \proclaim.
  929. %
  930. \def\endabstract{\par\unskip\egroup$$\egroup}
  931. %
  932. %      \widestnumber used to reset hanging indention in a table of
  933. %      contents or bibliography.  Other applications may also be added
  934. %      later.
  935. %
  936. %      The outerness of the heading macros causes problems. Therefore
  937. %      we process \widestnumber in two stages: first, inside a group,
  938. %      removing the outerness by letting the macros = \relax.  Then,
  939. %      using an \expandafter\endgroup trick, we read the arguments
  940. %      while the macros are still nonouter, but process the arguments
  941. %      after we have exited from the group.
  942. %
  943. \def\widestnumber{\begingroup \let\head\relax\let\subhead\relax
  944.   \let\subsubhead\relax \expandafter\endgroup\setwidest@}
  945. %
  946. \def\setwidest@#1#2{%
  947.    \ifx#1\head\setbox\tocheadbox@\hbox{#2.\enspace}%
  948.    \else\ifx#1\subhead\setbox\tocsubheadbox@\hbox{#2.\enspace}%
  949.    \else\ifx#1\subsubhead\setbox\tocsubheadbox@\hbox{#2.\enspace}%
  950.    \else\ifx#1\key\refstyle A%
  951.        \setboxz@h{\refsfont@\keyformat{#2}}%
  952.        \refindentwd\wd\z@
  953.    \else\ifx#1\no\refstyle C%
  954.        \setboxz@h{\refsfont@\keyformat{#2}}%
  955.        \refindentwd\wd\z@
  956.    \else\ifx#1\page\setbox\z@\hbox{\quad\bf#2}%
  957.        \pagenumwd\wd\z@
  958. %      We assume the default form for \item numbers rather than trying
  959. %      to handle all the variations such as "..."
  960.    \else\ifx#1\item
  961.        \setboxz@h{(#2)}\rosteritemwd\wdz@
  962.    \else\message{\string\widestnumber\space not defined for this
  963.       option (\string#1)}%
  964. \fi\fi\fi\fi\fi\fi\fi}
  965. %
  966. %      \Monograph is capitalized by analogy with \NoRunningHeads and
  967. %      \UseAMSsymbols because of its global scope.  We don't use
  968. %      \global's because if the user puts \Monograph in the preamble
  969. %      area as instructed it will automatically have global effect,
  970. %      and in some special applications (e.g. documentation) it may be
  971. %      nice to be able to localize the effect. \Monograph changes
  972. %      paragraph indention from none to normal for certain structures
  973. %      (subhead, proclaim, definition, ...) via \varindent@; it also
  974. %      changes fonts for \head, \proclaim, \definition, \example,
  975. %      \demo, and \remark.
  976. %
  977. %      The \ifmonograph@ test is used to decide whether to save a \toc
  978. %      in a box or typeset it immediately, as well as whether to
  979. %      typeset \thanks, \subjclass, and \keywords footnotes .
  980. %
  981. \newif\ifmonograph@
  982. %
  983. \def\Monograph{\monograph@true \let\headmark\rightheadtext
  984.   \let\varindent@\indent \def\headfont@{\bf}\def\proclaimheadfont@{\smc}%
  985.   \def\remarkheadfont@{\smc}}
  986. %
  987. \let\varindent@\noindent
  988. %
  989. \newbox\tocheadbox@    \newbox\tocsubheadbox@
  990. \newbox\tocbox@
  991. %
  992. %      Allocate a dimen register for the width of the page number
  993. %      column in table of contents. The true value of \pagenumwd
  994. %    is not assigned until \toc is actually called, to avoid
  995. %    initialization complications.
  996. \newdimen\pagenumwd
  997. %
  998. \def\toc{\toc@{Contents}}
  999. %
  1000. %      We make a separate macro that just redefines \title, \chapter,
  1001. %      \specialhead, \head, \subhead, \subsubhead, to simplify the
  1002. %      code of \toc.  This also makes it a little easier to work
  1003. %      around the outerness that most of them have.
  1004. %
  1005. \def\newtocdefs{%
  1006. %      The space after "\def" in these redefinitions is a convenience
  1007. %      for someone who wants to look for the main definitions---if
  1008. %      they search for "\def\title" the search will pass over "\def
  1009. %      \title" and find the main definition further down.
  1010.    \def \title##1\endtitle
  1011.        {\penaltyandskip@\z@\smallskipamount
  1012.         \hangindent\wd\tocheadbox@\noindent{\bf##1}}%
  1013.    \def \chapter##1{%
  1014.         Chapter \uppercase\expandafter{%
  1015.               \romannumeral##1.\unskip}\enspace}%
  1016.    \def \specialhead##1\endspecialhead
  1017.        {\par\hangindent\wd\tocheadbox@ \noindent##1\par}%
  1018.    \def \head##1 ##2\endhead
  1019.        {\par\hangindent\wd\tocheadbox@ \noindent
  1020.         \if\notempty{##1}\hbox to\wd\tocheadbox@{\hfil##1\enspace}\fi
  1021.         ##2\par}%
  1022. %      Since \subhead and \subsubhead change the \leftskip, we need to
  1023. %      do a \par before closing the group that localizes the change.
  1024. %      Unlike \head, we do not try to right-align the numbers.
  1025. %
  1026.    \def \subhead##1 ##2\endsubhead
  1027.        {\par\vskip-\parskip {\normalbaselines
  1028.         \advance\leftskip\wd\tocheadbox@
  1029.         \hangindent\wd\tocsubheadbox@ \noindent
  1030.         \if\notempty{##1}%
  1031.               \hbox to\wd\tocsubheadbox@{##1\unskip\hfil}\fi
  1032.          ##2\par}}%
  1033.    \def \subsubhead##1 ##2\endsubsubhead
  1034.        {\par\vskip-\parskip {\normalbaselines
  1035.         \advance\leftskip\wd\tocheadbox@
  1036.         \hangindent\wd\tocsubheadbox@ \noindent
  1037.         \if\notempty{##1}%
  1038.               \hbox to\wd\tocsubheadbox@{##1\unskip\hfil}\fi
  1039.         ##2\par}}}
  1040. %
  1041. \def\toc@#1{\relaxnext@
  1042.  \DN@{\ifx\next\nofrills\DN@\nofrills{\nextii@}%
  1043.       \else\DN@{\nextii@{{#1}}}\fi
  1044.       \next@}%
  1045.  \DNii@##1{%
  1046. %      If we're doing a book table of contents, we avoid setting the
  1047. %      whole thing in a box because if it's several pages long we
  1048. %      might run out of memory.
  1049. \ifmonograph@\bgroup\else\setbox\tocbox@\vbox\bgroup
  1050.    \centerline{\headfont@\ignorespaces##1\unskip}\nobreak
  1051.    \vskip\belowheadskip \fi
  1052. %    Redefine \page (it has another definition normally, for use in
  1053. %    references). The \hfilneg at the end is to cancel the
  1054. %    \parfillskip; the \penalty is to keep the \hfilneg from being
  1055. %    removed (normal processing at the end of a paragraph removes the
  1056. %    last skip).
  1057.    \def\page####1%
  1058.        {\unskip\penalty\z@\null\hfil
  1059.         \rlap{\hbox to\pagenumwd{\quad\hfil####1}}%
  1060.               \hfilneg\penalty\@M}%
  1061.    \setbox\tocheadbox@\hbox{0.\enspace}%
  1062.    \setbox\tocsubheadbox@\hbox{0.0.\enspace}%
  1063.    \leftskip\indenti \rightskip\leftskip
  1064. %      Increase \rightskip to move in the right margin to leave room
  1065. %      for page numbers (which will hang over into the "right margin").
  1066. %      The \bf is for taking into account page numbers for chapter titles,
  1067. %      which are bold.  A little extra width shouldn't hurt for toc's
  1068. %      without chapter titles.
  1069.    \setboxz@h{\bf\quad000}\pagenumwd\wd\z@
  1070.    \advance\rightskip\pagenumwd
  1071. %      Redefine all the heading macros to be their table-of-contents
  1072. %      versions.
  1073.    \newtocdefs
  1074.  }%
  1075.  \FN@\next@}
  1076. %
  1077. %      The \egroup closes the \vbox; or if we're in a monograph, just
  1078. %      matches the beginning \bgroup.
  1079. %
  1080. \def\endtoc{\par\egroup}
  1081. %
  1082. %      \pretitle, ..., \prepaper are entry points between the other
  1083. %      parts of the \topmatter so that users can insert things if
  1084. %      necessary.  If \pretitle is used to put any kind of box on the
  1085. %      page, it will throw off the sinkage of the title and everything
  1086. %      will have to be recalculated.
  1087. %
  1088. \let\pretitle\relax
  1089. \let\preauthor\relax
  1090. \let\preaffil\relax
  1091. \let\predate\relax
  1092. \let\preabstract\relax
  1093. \let\prepaper\relax
  1094. %
  1095. %      Now \dedicatory shows how to make use of the \pre... entry
  1096. %      points defined above.
  1097. %
  1098. \def\dedicatory #1\enddedicatory{\def\preabstract{{\medskip
  1099.   \eightpoint\it \raggedcenter@#1\endgraf}}}
  1100. %
  1101. %      A hook is provided for a translator name, for translations.
  1102. %      \eightpoint is used instead of just \eightrm, to be on the safe
  1103. %      side.  For instance, in transliteration some Russian names have
  1104. %      a ``prime'' symbol to represent the Russian ``soft sign''.  If
  1105. %      we didn't use \eightpoint we'd get a 10-point prime symbol.
  1106. %
  1107. \def\thetranslator@{}
  1108. \def\translator{%
  1109.   \let\savedef@\translator
  1110.   \def\translator##1\endtranslator{\let\translator\savedef@
  1111.     \edef\thetranslator@{\noexpand\nobreak\noexpand\medskip
  1112.       \noexpand\line{\noexpand\eightpoint\hfil
  1113.       \frills@{Translated by \uppercase}{##1}\qquad\qquad}%
  1114.        \noexpand\nobreak}}%
  1115.   \nofrillscheck\translator}
  1116. %
  1117. %      \endtopmatter now puts all of these things together on the
  1118. %      page. We start by checking to see if the left-hand running head
  1119. %      has been defined; if not, presumably it's because \author has
  1120. %      not been used, and presumably that means we are in a book
  1121. %      chapter rather than in an article. So we define it to be the
  1122. %      same as the right-hand running head, which will usually be the
  1123. %      text of the title.
  1124. %
  1125. %      When doing chapters in a book, \subjclass, \keywords and
  1126. %      \thanks should not print at the bottom of the page.
  1127. %
  1128. %      The baseline of the title should always fall at a fixed
  1129. %      distance from the top of the page, so we do the spacing with
  1130. %      \topskip instead of \vskip.
  1131. %
  1132. %      The spacing between elements of the topmatter in AMSPPT is
  1133. %      intended to be the same as in the Journal of the AMS; however
  1134. %      the actual spacing currently used in the latter is the rather
  1135. %      idiosyncratic result of a couple of years of piecemeal changes,
  1136. %      so that rather than follow it blindly we have opted to come as
  1137. %      close as possible by choosing whole or half-pica amounts.  The
  1138. %      situation is further complicated by the fact that the
  1139. %      documentstyle for the Journal of the AMS uses a different
  1140. %      method for putting running heads on the page, so that we cannot
  1141. %      measure distance from the top of the page in the same way; and
  1142. %      the date, affiliation, and abstract are handled differently as
  1143. %      well.
  1144. %
  1145. %      In this diagram the first measurement is from the top of the
  1146. %      type block to the baseline of the first line of the title.  In
  1147. %      the Journal of the AMS the value is 5.5pc rather than 4pc,
  1148. %      because it's measured to the top of the running head (which
  1149. %      extends above the text block). The rest of the measurements are
  1150. %      approximate visual space, done in \endtopmatter by \vskip's;
  1151. %      the effective base-to-base distance is approximately half a
  1152. %      pica more than the amount of the \vskip.
  1153. %
  1154. %      ______________________________ top of type area
  1155. %        |                            (according to \pageheight)
  1156. %        | 4pc baselineskip
  1157. %        |   |----------------------|
  1158. %      __|___|_______ TITLE ________|__
  1159. %            | WHICH MAY BE SEVERAL |
  1160. %            |      LINES LONG      |
  1161. %            |----------------------|
  1162. %                      2.5pc
  1163. %                   |--------|
  1164. %                   | AUTHOR |
  1165. %                   |--------|
  1166. %                       1pc
  1167. %                   |--------|
  1168. %                   | AFFIL  |
  1169. %                   |--------|
  1170. %                       1pc
  1171. %                    |------|
  1172. %                    | DATE |
  1173. %                    |------|
  1174. %                       1pc
  1175. %                 |------------|
  1176. %                 | DEDICATORY |
  1177. %                 |------------|
  1178. %                      1.5pc
  1179. %        |------------------------------|
  1180. %        |           ABSTRACT           |
  1181. %        |------------------------------|
  1182. %                      1.5pc
  1183. %        |------------------------------|
  1184. %        |       TABLE OF CONTENTS      |
  1185. %        |------------------------------|
  1186. %                       2pc
  1187. %      |-----------------------------------|
  1188. %      |           START OF TEXT           |
  1189. %      |                                   |
  1190. %
  1191. %
  1192. %      Make this \outer to catch missing or misspelled \end... in the
  1193. %      topmatter.  It doesn't work with \abstract though because that
  1194. %      uses the \setbox\vbox\bgroup ... \egroup mechanism, so we use
  1195. %      \add@missing to catch missing \endabstract's.
  1196. %
  1197. \outer\def\endtopmatter{\add@missing\endabstract
  1198.  \edef\next{\the\leftheadtoks}\ifx\next\empty@
  1199.   \expandafter\leftheadtext\expandafter{\the\rightheadtoks}\fi
  1200.  \ifmonograph@\else
  1201.    \ifx\thesubjclass@\empty@\else \makefootnote@{}{\thesubjclass@}\fi
  1202.    \ifx\thekeywords@\empty@\else \makefootnote@{}{\thekeywords@}\fi
  1203. %      If \thanks given, treat it as a footnote text (with no footnote
  1204. %      mark).
  1205.    \ifx\thethanks@\empty@\else \makefootnote@{}{\thethanks@}\fi
  1206.  \fi
  1207. %      We want a sinkage of 4pc from the top of the page (= the top of
  1208. %      the text area, not including the running heads) for articles,
  1209. %      and 7pc for monograph chapters.
  1210.   \pretitle
  1211.   \begingroup % to localize variant topskip
  1212.   \ifmonograph@ \topskip7pc \else \topskip4pc \fi
  1213. %      We don't unvbox the titlebox because we don't expect footnotes
  1214. %      to ever appear in the title, so we don't need to worry about
  1215. %      allowing them to migrate to the outer level.  (Some journals
  1216. %      use footnotes in titles to give acknowledgments of research
  1217. %      support; in AMSPPT this is an unnumbered footnote, done with
  1218. %      \thanks, outside of the title.)
  1219.   \box\titlebox@
  1220.   \endgroup
  1221.   \preauthor
  1222.   \ifvoid\authorbox@\else \vskip2.5pcplus1pc\unvbox\authorbox@\fi
  1223.   \preaffil
  1224.   \ifvoid\affilbox@\else \vskip1pcplus.5pc\unvbox\affilbox@\fi
  1225.   \predate
  1226.   \ifx\thedate@\empty@\else
  1227.        \vskip1pcplus.5pc\line{\hfil\thedate@\hfil}\fi
  1228.   \preabstract
  1229.   \ifvoid\abstractbox@\else
  1230.        \vskip1.5pcplus.5pc\unvbox\abstractbox@ \fi
  1231.   \ifvoid\tocbox@\else\vskip1.5pcplus.5pc\unvbox\tocbox@\fi
  1232.   \prepaper
  1233.   \vskip2pcplus1pc\relax
  1234. }
  1235. %
  1236. \def\document{%
  1237. %    We call \loadextrafonts@ here as well as in \topmatter; this is
  1238. %    to allow use of the extra sizes of the fonts in e.g. test documents
  1239. %    that don't include a full topmatter section. If \topmatter was
  1240. %    executed, \loadextrafonts@ will now be a harmless no-op.
  1241.   \loadextrafonts@
  1242.   \let\fontlist@\relax\let\alloclist@\relax
  1243. %      Start out in \tenpoint
  1244.   \tenpoint}
  1245. %
  1246. %
  1247. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1248. %      -6- SECTION HEADINGS
  1249. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1250. \message{section heads,}
  1251. %      In accordance with conventional design principles, the space
  1252. %      below headings is not given any stretchability or
  1253. %      shrinkability.
  1254. %
  1255. \newskip\aboveheadskip       \aboveheadskip\bigskipamount
  1256. \newdimen\belowheadskip      \belowheadskip6\p@
  1257. \def\headfont@{\smc}
  1258. %
  1259. %      Since we often want to do a penalty and vskip, and since there
  1260. %      are extra complications involved if there is a preceding vskip
  1261. %      from something else, we define a macro to do it.  Normally it
  1262. %      is used while we're working on the main vertical list, so we
  1263. %      have to use \removelastskip (which does a negative skip) rather
  1264. %      than \unskip (which REALLY removes the last skip).  If the last
  1265. %      thing on the main vertical list is anything other than a vskip,
  1266. %      say a penalty from \pagebreak, the value returned by \lastskip
  1267. %      will be 0, but the potential complications are a whole other
  1268. %      subject.  This macro handles the straightforward cases.
  1269. %
  1270. %      In some cases we may not want to put a penalty at all.
  1271. %      We refrain from doing any penalty if the first argument of
  1272. %      \penaltyandskip@ is 0; the essential effect of an explicit
  1273. %      \penalty0 can be gotten by doing a penalty of 1 instead.
  1274. %
  1275. %      We use \penalty@ instead of \penalty, so that we can redefine
  1276. %      \penalty@ in \nobreak, to prevent page breaks between certain
  1277. %      pairs such as \head \subhead or \head \proclaim or \nopagebreak
  1278. %      \proclaim ---for example, in
  1279. %
  1280. %      "... which leads to this theorem:
  1281. %      \proclaim{Theorem 8.2} ..."
  1282. %
  1283. %      a page break after the colon would be bad, and a user might
  1284. %      want to be able to add a \nopagebreak.
  1285. %
  1286. %      The sequence
  1287. %
  1288. %           \subhead Text...\endsubhead
  1289. %           \subsubhead Text...\endsubsubhead
  1290. %
  1291. %      will still have the weakness of allowing a pagebreak between
  1292. %      the two headings, because \endsubhead doesn't do a \nobreak
  1293. %      (since it's a run-in heading.
  1294. %
  1295. \def\penaltyandskip@#1#2{\par\skip@#2\relax
  1296.   \ifdim\lastskip<\skip@\relax\removelastskip
  1297.       \ifnum#1=\z@\else\penalty@#1\relax\fi\vskip\skip@
  1298.   \else\ifnum#1=\z@\else\penalty@#1\relax\fi\fi}
  1299. %
  1300. \def\nobreak{\penalty\@M
  1301. %      Change the definition of \penalty@ so that the following number
  1302. %      will be gobbled (by assigning it to the scratch register
  1303. %      \count@@@).
  1304.   \ifvmode\gdef\penalty@{\global\let\penalty@\penalty\count@@@}%
  1305. %      If the next piece of the document after \nobreak is something
  1306. %      like \subhead or \proclaim that calls \penaltyandskip@, then
  1307. %      \penalty@ will reset itself in the way that we want.  But if
  1308. %      not, then we still want to reset \penalty@; so we use
  1309. %      \everypar.  There are probably some unusual cases that will
  1310. %      still have problems, but at the moment this is the best
  1311. %      solution we have.
  1312.   \everypar{\global\let\penalty@\penalty\everypar{}}\fi}
  1313. %
  1314. \let\penalty@\penalty
  1315. %
  1316. %      We equate the old form of the headings to the new form, for
  1317. %      backward compatibility.  It's easier to do this now rather than
  1318. %      later because \head and \subhead are going to be outer.
  1319. %
  1320. \def\heading#1\endheading{\head#1\endhead}
  1321. \def\subheading{\DN@{\ifx\next\nofrills
  1322.     \expandafter\subheading@
  1323.   \else \expandafter\subheading@\expandafter\empty@
  1324.   \fi}%
  1325.   \FN@\next@
  1326. }
  1327. \def\subheading@#1#2{\subhead#1#2\endsubhead}
  1328. %
  1329. %      One more heading level, for occasional use.  This is the next
  1330. %      level ABOVE \head.  The default style is ragged right;
  1331. %      otherwise it's the same as \head.
  1332. %
  1333. \def\specialheadfont@{\bf}
  1334. \outer\def\specialhead{%
  1335.   \add@missing\endroster \add@missing\enddefinition
  1336.   \add@missing\enddemo \add@missing\endexample
  1337.   \add@missing\endproclaim
  1338.   \penaltyandskip@{-200}\aboveheadskip
  1339.   \begingroup\interlinepenalty\@M\rightskip\z@ plus\hsize
  1340.   \let\\\linebreak
  1341.   \specialheadfont@\noindent}
  1342. \def\endspecialhead{\par\endgroup\nobreak\vskip\belowheadskip}
  1343. %
  1344. %      penalty-200 is the penalty amount used by plain.tex's
  1345. %      \bigbreak.
  1346. %
  1347. \outer\def\head#1\endhead{%
  1348.   \add@missing\endroster \add@missing\enddefinition
  1349.   \add@missing\enddemo \add@missing\endexample
  1350.   \add@missing\endproclaim
  1351.   \penaltyandskip@{-200}\aboveheadskip
  1352.   {\headfont@\raggedcenter@\interlinepenalty\@M
  1353.   #1\endgraf}\headmark{#1}%
  1354.   \nobreak
  1355.   \vskip\belowheadskip}
  1356. %
  1357. %      \headmark will be redefined to be \rightheadtext by \Monograph.
  1358. %
  1359. \let\headmark\eat@
  1360. %
  1361. %      The purpose of \restoredef@ is to work around problems caused
  1362. %      by the outerness of things like \subhead. \relax at the
  1363. %      beginning prevents the \savedef@ (which may be \outer) from
  1364. %      being read prematurely in certain kinds of expansion.
  1365. %
  1366. \def\restoredef@#1{\relax\let#1\savedef@\let\savedef@\relax}
  1367. %
  1368. %      \subhead and \subsubhead are simpler, though they allow
  1369. %      \nofrills. (\head, being centered, does not have automatic
  1370. %      punctuation put in at the end and so \nofrills doesn't have
  1371. %      anything to do.) The syntax of \subhead is changed from
  1372. %      \subheading{...} (version 1) to \subhead...\endsubhead (version
  1373. %      2). This was done for the following reasons: (1) to be
  1374. %      consistent with \head...\endhead (we could have changed \head
  1375. %      instead of \subhead, but the \x...\endx syntax is the one
  1376. %      currently in  use in AMS production); (2) if someone (perhaps
  1377. %      us) ever wants to do something tricky with the headings, having
  1378. %      the \end... may help them avoid technical complications.
  1379. %
  1380. \newskip\subheadskip       \subheadskip\medskipamount
  1381. \def\subheadfont@{\bf}
  1382. \outer\def\subhead{%
  1383.   \add@missing\endroster \add@missing\enddefinition
  1384.   \add@missing\enddemo \add@missing\endexample
  1385.   \add@missing\endproclaim
  1386.   \let\savedef@\subhead \let\subhead\relax
  1387.   \def\subhead##1\endsubhead{\restoredef@\subhead
  1388.     \penaltyandskip@{-100}\subheadskip
  1389.     \varindent@{\def\usualspace{{\subheadfont@\enspace}}%
  1390.     \subheadfont@\ignorespaces##1\unskip\frills@{.\enspace}}%
  1391.     \ignorespaces}%
  1392.   \nofrillscheck\subhead}
  1393. %
  1394. %      In version 2.0 of amsppt.sty we also add a third level of
  1395. %      heading, \subsubhead.
  1396. %
  1397. \newskip\subsubheadskip       \subsubheadskip\medskipamount
  1398. \def\subsubheadfont@{\it}
  1399. \outer\def\subsubhead{%
  1400.   \add@missing\endroster \add@missing\enddefinition
  1401.   \add@missing\enddemo
  1402.   \add@missing\endexample \add@missing\endproclaim
  1403.   \let\savedef@\subsubhead \let\subsubhead\relax
  1404.   \def\subsubhead##1\endsubsubhead{\restoredef@\subsubhead
  1405.     \penaltyandskip@{-50}\subsubheadskip
  1406. %      Add italic correction in \usualspace, because \subheadfont@ is
  1407. %      italic, in case the substituted punctuation is something tall
  1408. %      like a question mark or exclamation point.
  1409.       {\def\usualspace{\/{\it\enspace}}%
  1410.     \subsubheadfont@##1\unskip\frills@{.\enspace}}}%
  1411.   \nofrillscheck\subsubhead}
  1412. %
  1413. %
  1414. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1415. %      -7- THEOREM ENVIRONMENTS AND SIMILAR STRUCTURES
  1416. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1417. \message{theorems/proofs/definitions/remarks,}
  1418. %
  1419. \def\proclaimheadfont@{\bf}
  1420. %      Make \proclaimfont a non-private control sequence, so that
  1421. %      users can change it back to \sl if desired without
  1422. %      complications.
  1423. \def\proclaimfont{\it}
  1424. %
  1425. \outer\def\proclaim{%
  1426.   \let\savedef@\proclaim \let\proclaim\relax
  1427.   \add@missing\endroster \add@missing\enddefinition
  1428.   \add@missing\endproclaim \envir@stack\endproclaim
  1429. %      penalty-100 is the penalty amount used by plain.tex's
  1430. %      \medbreak.
  1431.  \def\proclaim##1{\restoredef@\proclaim
  1432.    \penaltyandskip@{-100}\medskipamount\varindent@
  1433.    \def\usualspace{{\proclaimheadfont@\enspace}}\proclaimheadfont@
  1434.    \ignorespaces##1\unskip\frills@{.\enspace}%
  1435.   \proclaimfont\ignorespaces}%
  1436.  \nofrillscheck\proclaim}
  1437. %
  1438. %      \endproclaim ends the paragraph, switches back to \rm and adds
  1439. %      spacing. (This means that if, for some strange reason, a whole
  1440. %      section of text happens to be in italics, then the user must
  1441. %      type \it again after each \endproclaim, but that seems too
  1442. %      special a case to need providing for.)  The penalty of 55 is
  1443. %      just the plain.tex penalty for \endproclaim, carried over
  1444. %      without change. Version 2.1 change: removed \outer prefix, to
  1445. %      simplify some programming related to \add@missing and
  1446. %      \revert@envir.
  1447. %
  1448. \def\endproclaim{\revert@envir\endproclaim \par\rm
  1449.   \penaltyandskip@{55}\medskipamount}
  1450. %
  1451. %      In \remark, we take the opportunity again to issue an error
  1452. %      message if a previous \proclaim has no matching \endproclaim.
  1453. %
  1454. \def\remarkheadfont@{\it}
  1455. \def\remark{\let\savedef@\remark \let\remark\relax
  1456.   \add@missing\endroster \add@missing\endproclaim
  1457.   \envir@stack\endremark
  1458.   \def\remark##1{\restoredef@\remark
  1459.     \penaltyandskip@\z@\medskipamount
  1460.   {\def\usualspace{{\remarkheadfont@\enspace}}%
  1461.   \varindent@\remarkheadfont@\ignorespaces##1\unskip%
  1462.   \frills@{.\enspace}}\rm
  1463.   \ignorespaces}\nofrillscheck\remark}
  1464. %
  1465. %      \endremark is easy.
  1466. %
  1467. \def\endremark{\par\revert@envir\endremark}
  1468. %
  1469. \ifx\undefined\square
  1470.   \def\square{\vrule width.6em height.5em depth.1em\relax}\fi
  1471. \def\qed{\ifhmode\unskip\nobreak\fi\quad
  1472.   \ifmmode\square\else$\m@th\square$\fi}
  1473. %
  1474. %      Proofs are the same as Remarks, except there is an additional
  1475. %      \medskip after a Proof.  We don't have a runaway demo or remark
  1476. %      check until \enddocument because proofs within proofs (and
  1477. %      perhaps remarks within remarks) are possible.
  1478. %
  1479. \def\demo{\DN@{\ifx\next\nofrills
  1480.     \DN@####1####2{\remark####1{####2}\envir@stack\enddemo
  1481.       \ignorespaces}%
  1482.   \else
  1483.     \DN@####1{\remark{####1}\envir@stack\enddemo\ignorespaces}%
  1484.   \fi
  1485.   \next@}%
  1486. \FN@\next@}
  1487.  
  1488. \def\enddemo{\par\revert@envir\enddemo \endremark\medskip}
  1489. %
  1490. %      \definition uses \proclaimheadfont@ because normally the two
  1491. %      use the same font for the head font, with \definition using \rm
  1492. %      for the text as opposed to the \it used for \proclaim.
  1493. %
  1494. \def\definition{\let\savedef@\definition \let\definition\relax
  1495.   \add@missing\endproclaim \add@missing\endroster
  1496.   \add@missing\enddefinition \envir@stack\enddefinition
  1497. %      \proclaimheadfont@ comes after the period here because
  1498. %      sometimes we want the period to be roman rather than bold, e.g.
  1499. %      when the preceding thing is a math formula or a citation, set
  1500. %      in roman type.
  1501.    \def\definition##1{\restoredef@\definition
  1502.      \penaltyandskip@{-100}\medskipamount
  1503.         {\def\usualspace{{\proclaimheadfont@\enspace}}%
  1504.         \varindent@\proclaimheadfont@\ignorespaces##1\unskip
  1505.         \frills@{.\proclaimheadfont@\enspace}}%
  1506.         \rm \ignorespaces}%
  1507.   \nofrillscheck\definition}
  1508. \def\enddefinition{\revert@envir\enddefinition
  1509.   \par\medskip}
  1510. %
  1511. \def\example{\DN@{\ifx\next\nofrills
  1512.     \DN@####1####2{\definition####1{####2}\envir@stack\endexample
  1513.       \ignorespaces}%
  1514.   \else
  1515.     \DN@####1{\definition{####1}\envir@stack\endexample\ignorespaces}%
  1516.   \fi
  1517.   \next@}%
  1518. \FN@\next@}
  1519. \def\endexample{\revert@envir\endexample \enddefinition }
  1520. %
  1521. %
  1522. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1523. %      -8- ROSTERS
  1524. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1525. \message{rosters,}
  1526. %      In version 2 of amsppt we provide a more convenient way of
  1527. %      changing the indention of roster items.
  1528. %
  1529. \newdimen\rosteritemwd
  1530. \rosteritemwd16pt % approximately the width of (iii) in 10 point text
  1531. %
  1532. %      \roster uses \rostercount@ to store the \item number. The first
  1533. %      item is treated specially, because of the extra space before
  1534. %      it, so we need a flag \iffirstitem@ to identify it.
  1535. %
  1536. \newcount\rostercount@
  1537. \newif\iffirstitem@
  1538. %
  1539. %      Since \item in \roster differs from in \plain, we store plain's
  1540. %      \item in \plainitem@, so that we can restore the definition
  1541. %      after the \roster is over.
  1542. %
  1543. \let\plainitem@\item
  1544. %
  1545. %      In order for our \roster's to work, we will also have to be
  1546. %      sure that \everypar is {}.  Just in case \everypar already has
  1547. %      a value, as it might in some format, we store those values in
  1548. %      the token list \everypartoks@, so that we can restore them at
  1549. %      the end.  \par@ does this storing, and sets \everypar{}.
  1550. %
  1551. \newtoks\everypartoks@
  1552. \def\par@{\everypartoks@\expandafter{\the\everypar}\everypar{}}
  1553. %
  1554. \def\leftskip@{}
  1555. %
  1556. \def\roster{%
  1557.   \envir@stack\endroster
  1558. %      We also have to store the \leftskip, since it will be changed.
  1559.  \edef\leftskip@{\leftskip\the\leftskip}%
  1560.  \relaxnext@
  1561.  \rostercount@\z@% Initialize \rostercount@ to 0.
  1562.  \def\item{\FN@\rosteritem@}%      \item, now redefined, has
  1563. %      to look ahead for [ and ", since we allow optional and literal
  1564. %      arguments. \rosteritem@ itself is defined below.  The following
  1565. %      \next@ (in \DN@) is the one called at the very end of this
  1566. %      \def.
  1567.  \DN@{\ifx\next\runinitem\let\next@\nextii@\else
  1568.   \let\next@\nextiii@\fi\next@}%
  1569. %      First we look to see whether \roster is followed by \runinitem,
  1570. %      since this requires different processing.
  1571.  \DNii@\runinitem% If \runinitem occurs, \nextii@ must kill it off.
  1572.   {\unskip% This unskips any space before the original \roster.
  1573. %      Our definition of \nextii@\runinitem itself uses compressed
  1574. %      format and a \futurelet\next\next@, because we still have to
  1575. %      allow [ or " to come next.
  1576.    \DN@{\ifx\next[\let\next@\nextii@\else
  1577.     \ifx\next"\let\next@\nextiii@\else\let\next@\nextiv@\fi\fi\next@}%
  1578. %      The following \nextii@ is the one created by
  1579. %      \nextii@\runinitem; there is no conflict of names, since the
  1580. %      first calls the second.
  1581.    \DNii@[####1]{\rostercount@####1\relax
  1582.     \enspace\therosteritem{\number\rostercount@}~\ignorespaces}%
  1583. %      If [...] comes next, we use (...) but we explicitly do this by
  1584. %      setting \rostercount@ equal to ... so that succeeding \item's
  1585. %      will have the right numbers (use of something other than a
  1586. %      number will give an error message).
  1587.    \def\nextiii@"####1"{\enspace{\rm####1}~\ignorespaces}%
  1588. %      If "..." comes next, we use ... exactly as typed.
  1589.    \def\nextiv@{\enspace\therosteritem1\rostercount@\@ne~}%
  1590. %      Otherwise just use (1).
  1591.    \par@\firstitem@false% Before doing any of this we still change
  1592. %      \everypar, if necessary, which is normally done elsewhere, and
  1593. %      set \firstitem@false, since this \runinitem counts as the
  1594. %      first.
  1595.    \FN@\next@}%      End of definition of \nextii@\runinitem.
  1596. %      The following \nextiii@ will be used if we didn't have
  1597. %      \runinitem.
  1598.  \def\nextiii@{\par\par@% End the present paragraph, change \everypar
  1599. %      if necessary, prohibit a break, add a small skip, but add
  1600. %      something to offset any \parskip, if there is any, which would
  1601. %      be contributed when the next paragraph is begun by the next
  1602. %      \item.
  1603.   \penalty\@m\smallskip\vskip-\parskip
  1604. %      And set \firstitem@true for use with \item.
  1605.   \firstitem@true}
  1606.  \FN@\next@}
  1607. %
  1608. %      Remember that \rosteritem@ is called by
  1609. %      \futurelet\next\rosteritem@.
  1610. %
  1611. \def\rosteritem@{\iffirstitem@\firstitem@false
  1612.   \else\par\vskip-\parskip\fi
  1613. %      Except at the first \item, we end the paragraph (consisting of
  1614. %      the previous \item), and subtract any space that might be added
  1615. %      by the next \item.
  1616.  \leftskip\rosteritemwd \advance\leftskip\normalparindent
  1617.  \advance\leftskip.5em \noindent
  1618.  \DNii@[##1]{\rostercount@##1\relax\itembox@}%
  1619. %      If [...] follows \item, we use ... as the number, again by
  1620. %      setting \rostercount@, so that succeeding \items will have the
  1621. %      right number.
  1622.  \def\nextiii@"##1"{\def\therosteritem@{\rm##1}\itembox@}%
  1623. %      If "..." follows  \item, we use ... exactly as typed.
  1624.  \def\nextiv@{\advance\rostercount@\@ne\itembox@}%
  1625. %      Otherwise we print the \rostercount@ in parentheses.
  1626.  \def\therosteritem@{\therosteritem{\number\rostercount@}}%
  1627.  \ifx\next[\let\next@\nextii@\else\ifx\next"\let\next@\nextiii@\else
  1628.   \let\next@\nextiv@\fi\fi\next@}
  1629. %
  1630. \def\itembox@{\llap{\hbox to\rosteritemwd{\hss
  1631.   \kern\z@ % kern to thwart \unskip in \rom
  1632.   \therosteritem@}\enspace}\ignorespaces}
  1633. %
  1634. %      \therosteritem is just a convenience for the user.
  1635. %
  1636. \def\therosteritem#1{\rom{(\ignorespaces#1\unskip)}}
  1637. %
  1638. %      We want to save \Runinitem for last, but it is relevant even to
  1639. %      the definition of \endroster, since we have to worry whether
  1640. %      \endroster is followed by another \Runinitem.  We will use a
  1641. %      flag \ifnextRunin@ to tell us.
  1642. %
  1643. \newif\ifnextRunin@
  1644. %
  1645. \def\endroster{\relaxnext@
  1646.  \revert@envir\endroster % restore \envir@end
  1647.  \par\leftskip@% End the paragraph, and restore the \leftskip.
  1648.  \global\rosteritemwd16\p@ % restore default value
  1649.  \penalty-50 \vskip-\parskip\smallskip% Add a good break and
  1650. %      subtract any space that will be started by next paragraph, but
  1651. %      add a \smallskip.
  1652.  \DN@{\ifx\next\Runinitem\let\next@\relax
  1653. %      Don't do anything else if \Runinitem comes next.
  1654.   \else\nextRunin@false\let\item\plainitem@% Otherwise, set
  1655. %      \nextRunin@false, and restore \item to its definition in plain;
  1656.    \ifx\next\par% moreover, if \endroster is followed by \par,
  1657.     \DN@\par{\everypar\expandafter{\the\everypartoks@}}%
  1658. %      delete that instruction (since we've already put in a \par),
  1659. %      and restore \everypar,
  1660.    \else% but if the \endroster isn't followed by a new paragraph,
  1661.     \DN@{\noindent\everypar\expandafter{\the\everypartoks@}}%
  1662. %      start the next paragraph unindented, and restore \everypar.
  1663.   \fi\fi\next@}%
  1664.  \FN@\next@}
  1665. %
  1666. %      Finally, for \Runinitem ... \roster\runinitem we have the usual
  1667. %      junk for worrying about [ or " coming next, and then more
  1668. %      interesting things:  We have to find out how many lines of text
  1669. %      we had before the \roster; we will store this in
  1670. %      \rosterhangafter@.
  1671. %
  1672. \newcount\rosterhangafter@
  1673. \def\Runinitem#1\roster\runinitem{\relaxnext@
  1674.   \envir@stack\endroster
  1675. %      Initialize \rostercount@ to 0.
  1676.  \rostercount@\z@
  1677. %      Define \item as before.
  1678.  \def\item{\FN@\rosteritem@}%
  1679. %      Store everything up to the roster in \runinitem@.
  1680.  \def\runinitem@{#1}%
  1681.  \DN@{\ifx\next[\let\next\nextii@\else\ifx\next"\let\next\nextiii@
  1682.   \else\let\next\nextiv@\fi\fi\next}%
  1683.  \DNii@[##1]{\rostercount@##1\relax
  1684. %      If [...] follows \runinitem, we proceed as before, except we
  1685. %      call this first instance \item@, and we let \nextv@, defined
  1686. %      below, take care of everything.
  1687.   \def\item@{\therosteritem{\number\rostercount@}}\nextv@}%
  1688. %      If "..." follows \runinitem, we define \item@ to use it.
  1689.  \def\nextiii@"##1"{\def\item@{{\rm##1}}\nextv@}%
  1690.  \def\nextiv@{\advance\rostercount@\@ne
  1691. %      Otherwise, we use the proper \rostercount@. Now comes \nextv@,
  1692. %      which has to properly typeset things.
  1693.   \def\item@{\therosteritem{\number\rostercount@}}\nextv@}%
  1694. %      First store things in \box0 .
  1695.  \def\nextv@{\setbox\z@\vbox
  1696. %      Start unindented if we have \ifnextRunin@true.  This will
  1697. %      happen only if we had \Runinitem...\endroster right before.
  1698.   {\ifnextRunin@\noindent\fi
  1699. %      Add the stored things in \runinitem@, and then \item@.
  1700.   \runinitem@\unskip\enspace\item@~\par
  1701. %      This sets \rosterhangafter@ to the number of lines in \box0 ,
  1702. %      i.e., of the material so far; see the TeXbook, p. 103. We need
  1703. %      to say \global since this is set  within \box0. Now we're done
  1704. %      with \box0 !
  1705.   \global\rosterhangafter@\prevgraf}%
  1706.   \firstitem@false% Set \firstitem@false for future \item's.
  1707. %      End previous paragraph unless we had \Runinitem ...\endroster
  1708. %      right before. Now comes the good part: we
  1709. %      \hangindent3\parindent, as before, but we do it for
  1710. %      \rosterhangafter@ lines, the number that already appeared in
  1711. %      the material we set in \box0 .
  1712.   \ifnextRunin@\else\par\fi
  1713.   \hangafter\rosterhangafter@\hangindent3\normalparindent
  1714. %      Start unindented if we had a \Runinitem ... \endroster right
  1715. %      before.
  1716.   \ifnextRunin@\noindent\fi
  1717.   \runinitem@\unskip\enspace%  Put in all the stored stuff
  1718.   \item@~\ifnextRunin@\else\par@\fi% and the \item@, and
  1719. %      end the paragraph, unless we had a \Runinitem ... \endroster
  1720. %      before.
  1721.   \nextRunin@true\ignorespaces}%% Here's where we set \nextRunin@true.
  1722.  \FN@\next@}
  1723. %
  1724. %
  1725. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1726. %      -9- FOOTNOTES
  1727. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1728. \message{footnotes,}
  1729. %      \footmarkform@ tells how to treat a general type of footnote
  1730. %      marker.  And \thefootnotemark is for the user, analogous to
  1731. %      \thetag in AMSTEX.TEX.
  1732. %
  1733. \def\footmarkform@#1{$\m@th^{#1}$}
  1734. \let\thefootnotemark\footmarkform@
  1735. %
  1736. %      \makefootnote@ takes care of the general problem of creating a
  1737. %      footnote whose marker is #1 and whose text is #2, so that we
  1738. %      can concentrate separately on the problem of how the marker is
  1739. %      determined.  It is essentially \vfootnote from the TeXbook, p.
  1740. %      363, except that we don't do fancy things to worry about
  1741. %      category code changes, and instead of adding a \strut at the
  1742. %      end, we will just add the lower part of the strut.
  1743. %
  1744. \def\makefootnote@#1#2{\insert\footins
  1745.  {\interlinepenalty\interfootnotelinepenalty
  1746.  \eightpoint\splittopskip\ht\strutbox\splitmaxdepth\dp\strutbox
  1747.  \floatingpenalty\@MM\leftskip\z@skip\rightskip\z@skip
  1748.  \spaceskip\z@skip\xspaceskip\z@skip
  1749.  \leavevmode{#1}\footstrut\ignorespaces#2\unskip\lower\dp\strutbox
  1750.  \vbox to\dp\strutbox{}}}
  1751. %
  1752. %      Before version 2.0 \footmarkcount@ was declared in amstex.tex.
  1753. %
  1754. \newcount\footmarkcount@
  1755. \footmarkcount@\z@
  1756. %
  1757. %      \footnotemark basically just advances \footmarkcount@ by 1 and
  1758. %      then uses \footmarkform@{\number\footmarkcount@}---we still
  1759. %      have to worry about the space factor as in the definition of
  1760. %      \footnote in the TeXbook, p. 363.  However, we are allowing
  1761. %      both an `optional' argument [#1], where we instead use
  1762. %      \footmarkform@{#1}, and a `literal' argument "#1", where we
  1763. %      instead use #1 exactly as typed, so we need to use a \futurelet
  1764. %      to look at the next symbol. Compressed format is used.
  1765. %
  1766. \def\footnotemark{\let\@sf\empty@\relaxnext@
  1767.  \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
  1768.  \DN@{\ifx[\next\let\next@\nextii@\else
  1769.   \ifx"\next\let\next@\nextiii@\else
  1770.   \let\next@\nextiv@\fi\fi\next@}%
  1771.  \DNii@[##1]{\footmarkform@{##1}\@sf}%
  1772.  \def\nextiii@"##1"{{##1}\@sf}%
  1773.  \def\nextiv@{\iffirstchoice@\global\advance\footmarkcount@\@ne\fi
  1774.   \footmarkform@{\number\footmarkcount@}\@sf}%
  1775.  \FN@\next@}
  1776. %
  1777. %      \footnotetext essentially applies \makefootnote@ to the next
  1778. %      group, using \footmarkcount@ for the marker that goes before
  1779. %      the footnote text. However, we once again allow optional and
  1780. %      literal arguments.  Compressed format is used.
  1781. %
  1782. \def\footnotetext{\relaxnext@
  1783.  \DN@{\ifx[\next\let\next@\nextii@\else
  1784.   \ifx"\next\let\next@\nextiii@\else
  1785.   \let\next@\nextiv@\fi\fi\next@}%
  1786.  \DNii@[##1]##2{\makefootnote@{\footmarkform@{##1}}{##2}}%
  1787.  \def\nextiii@"##1"##2{\makefootnote@{##1}{##2}}%
  1788.  \def\nextiv@##1{\makefootnote@{\footmarkform@%
  1789.   {\number\footmarkcount@}}{##1}}%
  1790.  \FN@\next@}
  1791. %
  1792. %      Finally, \footnote is basically \footnotemark\footnote, but we
  1793. %      can't write it directly that way because it, too, can take
  1794. %      optional and literal arguments.  Compressed format again.
  1795. %
  1796. \def\footnote{\let\@sf\empty@\relaxnext@
  1797.  \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
  1798.  \DN@{\ifx[\next\let\next@\nextii@\else
  1799.   \ifx"\next\let\next@\nextiii@\else
  1800.   \let\next@\nextiv@\fi\fi\next@}%
  1801.  \DNii@[##1]##2{\footnotemark[##1]\footnotetext[##1]{##2}}%
  1802.  \def\nextiii@"##1"##2{\footnotemark"##1"\footnotetext"##1"{##2}}%
  1803.  \def\nextiv@##1{\footnotemark\footnotetext{##1}}%
  1804.  \FN@\next@}
  1805. %
  1806. %      \adjustfootnotemark just allows the user to change
  1807. %      \footmarkcount@.
  1808. %
  1809. \def\adjustfootnotemark#1{\advance\footmarkcount@#1\relax}
  1810. %
  1811. %      We use the definition of \footnoterule provided by plain, but
  1812. %      change its width from 2 truein to 5pc.
  1813. %
  1814. \def\footnoterule{\kern-3\p@
  1815.   \hrule width5pc\kern 2.6\p@}%      the \hrule is .4pt high
  1816. %
  1817. %
  1818. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1819. %      -10- TABLES
  1820. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1821. %
  1822. %      At the present time no table macros are provided.  Captions can
  1823. %      be gotten using \topcaption or \botcaption.
  1824. %
  1825. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1826. %      -11- FIGURE SPACES AND CAPTIONS
  1827. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1828. \message{figures and captions,}
  1829. \def\captionfont@{\smc}
  1830. %
  1831. %      These captions are designed for use within \topinsert's and
  1832. %      \midinsert's.  \nofrills is not currently an option, though
  1833. %      probably it should be added eventually.
  1834. %
  1835. \def\topcaption#1#2\endcaption{%
  1836. %      The captionwidth may have been changed by the user so we don't
  1837. %      make the assumption that it is equal to \hsize - 2\indenti.
  1838.   {\dimen@\hsize \advance\dimen@-\captionwidth@
  1839. %      \raggedcenter@ uses the em so we set the font before calling
  1840. %      it. \leftskip and \rightskip are changed by \raggedcenter so
  1841. %      the modifications of \leftskip and \rightskip must come after.
  1842.    \rm\raggedcenter@ \advance\leftskip.5\dimen@ \rightskip\leftskip
  1843.   {\captionfont@#1}%
  1844.   \if\notempty{#2}.\enspace\ignorespaces#2\fi
  1845.   \endgraf}\nobreak\bigskip}
  1846. %
  1847. %      For whatever reason, the style in current AMS production has
  1848. %      figure captions (= \botcaption) set in a block while table
  1849. %      captions are set ragged center style.
  1850. %
  1851. \def\botcaption#1#2\endcaption{%
  1852. %      The previous vskip may be blank space for a figure, so we can't
  1853. %      use \penaltyandskip@ here, otherwise the \bigskip would not be
  1854. %      added (assuming the preceding vskip is greater than
  1855. %      \bigskipamount):
  1856.   \nobreak\bigskip
  1857. %      Measure how wide the caption is.  Maybe it's only "Figure 1",
  1858. %      or maybe it's "Figure 1. Blah blah blah ... for 10 lines."  In
  1859. %      the first case center it, in the second case put it in
  1860. %      paragraph form.
  1861.   \setboxz@h{\captionfont@#1\if\notempty{#2}.\enspace\rm#2\fi}%
  1862.   {\dimen@\hsize \advance\dimen@-\captionwidth@
  1863.    \leftskip.5\dimen@ \rightskip\leftskip
  1864. %      long caption---set it in a paragraph
  1865.    \noindent \ifdim\wdz@>\captionwidth@
  1866. %      short caption---add \hfil to balance with \parfillskip.
  1867.    \else\hfil\fi
  1868.   {\captionfont@#1}%
  1869.   \if\notempty{#2}.\enspace\rm#2\fi\endgraf}}
  1870. %
  1871. %      Redefine plain TeX \@ins to add definition of \vspace (locally)
  1872. %      for use with caption macros.  Also \captionwidth.
  1873. %
  1874. \def\@ins{\par\begingroup\def\vspace##1{\vskip##1\relax}%
  1875.   \def\captionwidth##1{\captionwidth@##1\relax}%
  1876.   \setbox\z@\vbox\bgroup} % start a \vbox
  1877. %
  1878. %      CASE 1: \topcaption plus a table typed by the author.
  1879. %
  1880. %      \topinsert
  1881. %      \topcaption{Table 1}This is a table caption.\endcaption
  1882. %      \halign{ ...
  1883. %       ...
  1884. %      }
  1885. %      \endinsert
  1886. %
  1887. %      CASE 2: \topcaption plus some blank space.
  1888. %
  1889. %      \midinsert
  1890. %      \topcaption{Table 2}This is another table caption.\endcaption
  1891. %      \vspace{13pc}
  1892. %      \endinsert
  1893. %
  1894. %      CASE 3: \botcaption plus some blank space.
  1895. %
  1896. %      \topinsert
  1897. %      \vspace{7pc}
  1898. %      \botcaption{Figure 1}\endcaption
  1899. %      \endinsert
  1900. %
  1901. %      Use of \captionwidth:
  1902. %
  1903. %      \topinsert
  1904. %      \captionwidth{14pc}
  1905. %      \topcaption{Table 1}Text ...
  1906. %      \endcaption
  1907. %      \endinsert
  1908. %
  1909. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1910. %      -12- MISCELLANEOUS FORMATTING MACROS
  1911. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1912. \message{miscellaneous,}
  1913. %    \block is intended for typing long quotes in a block, indented on
  1914. %    both margins. It is set up so that it can be used in either of two
  1915. %    ways:
  1916. %
  1917. %         $$\block...\endblock\tag1.1$$
  1918. %
  1919. %    or
  1920. %
  1921. %         Normal text.
  1922. %         \block ...  \endblock
  1923. %         Continue with more text.
  1924. %
  1925. %    In the latter case, we use a TeX display to provide spacing above
  1926. %    and below the block. If we're in vertical mode when \block is
  1927. %    called, we use \noindent to avoid getting an extra blank line
  1928. %    before the display. But then we will get the short display skips
  1929. %    instead of the full display skips, so we set \predisplaysize
  1930. %    explicitly to ensure the full display skips.
  1931. %
  1932. \def\block{\RIfMIfI@\nondmatherr@\block\fi
  1933.        \else\ifvmode\noindent$$\predisplaysize\hsize
  1934.          \else$$\fi
  1935.   \def\endblock{\par\egroup$$}\fi
  1936.   \vbox\bgroup\advance\hsize-2\indenti\noindent}
  1937. \def\endblock{\par\egroup}
  1938. %
  1939. %      In version 1 of amsppt \cite did some parsing to locate a comma
  1940. %      in its argument and if one was found the font was switched from
  1941. %      \citefont to \rm.  In version 2 we no longer do this because if
  1942. %      a \cite deviates too much from the expected form we run into
  1943. %      problems:  The expected form was either \cite{13}, or \cite{13,
  1944. %      Theorem 2.2}.  But if for example the user wants to cite two
  1945. %      references together, \cite{13,15}, we don't want to switch off
  1946. %      \citefont after the comma.  And since authors tend to invent
  1947. %      even more imaginative variations than this, we just did away
  1948. %      with the parsing altogether.
  1949. %
  1950. %      \m@th is in case the author uses subscripts in his citation
  1951. %      codes.
  1952. %
  1953. \def\cite#1{\rom{[{\citefont@\m@th#1}]}}
  1954. %
  1955. %      In version 1 of amsppt \citefont was \bf.
  1956. %
  1957. \def\citefont@{\rm}
  1958. %
  1959. %      \rom provides a way for getting roman punctuation and numerals
  1960. %      in italic text. It takes pains to handle italic corrections
  1961. %      reasonably nicely.
  1962. %
  1963. \def\rom#1{\leavevmode
  1964.   \edef\prevskip@{\ifdim\lastskip=\z@ \else\hskip\the\lastskip\relax\fi}%
  1965.   \unskip
  1966.   \edef\prevpenalty@{\ifnum\lastpenalty=\z@ \else
  1967.     \penalty\the\lastpenalty\relax\fi}%
  1968.   \unpenalty \/\prevpenalty@ \prevskip@ {\rm #1}}
  1969. %
  1970. %
  1971. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1972. %      -13- BIBLIOGRAPHY
  1973. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1974. \message{references,}
  1975. %
  1976. \def\refsfont@{\eightpoint}
  1977. %
  1978. %      \refindentwd controls the indention from the left margin of the
  1979. %      ref item numbers or key labels.  The initial setting is to 2
  1980. %      decimal digits; numbers up to 99 will be aligned on the right
  1981. %      within a box the width of \refindentwd.  \key labels will be
  1982. %      aligned on the LEFT within a box of the same width; but when
  1983. %      \key's are being used, the indention may need to be increased
  1984. %      if it's required that the labels remain clear from the text.
  1985. %      The \widestnumber macro can be used to do this:
  1986. %      \widestnumber\key{MNOPQ} will increase \refindentwd to the
  1987. %      width of a box containing "[MNOPQ]\enspace". \widestnumber can
  1988. %      also be used with \no: \widestnumber\no{000} for 3-digit
  1989. %      numbers, \widestnumber\no{0} for 1-digit numbers, and so on.
  1990. %
  1991. \newdimen\refindentwd
  1992. \setboxz@h{\refsfont@ 00.\enspace}
  1993. \refindentwd\wdz@
  1994. %
  1995. \outer\def\Refs{\add@missing\endroster \add@missing\endproclaim
  1996.  \let\savedef@\Refs \let\Refs\relax % because of \outer-ness
  1997.  \def\Refs##1{\restoredef@\Refs
  1998. %      For a monograph where the title of the References section is
  1999. %      done using \title, we want to omit the normal "References"
  2000. %      heading and the vertical skips above and below.  This can be
  2001. %      accomplished using \Refs\nofrills{}.  As long as the vskip at
  2002. %      the end of \endtopmatter is not less than \aboveheadskip and
  2003. %      \belowheadskip, this will be accomplished by the fact that
  2004. %      \penaltyandskip@ doesn't add to a previous larger vskip, and
  2005. %      the ragged center part will simply vanish if #1 is empty.
  2006.    \if\notempty{##1}\penaltyandskip@{-200}\aboveheadskip
  2007.      \begingroup \raggedcenter@\headfont@
  2008.        \ignorespaces##1\endgraf\endgroup
  2009.      \penaltyandskip@\@M\belowheadskip
  2010.    \fi
  2011.    \begingroup\def\envir@end{\endRefs}\refsfont@\sfcode`\.\@m
  2012.    }%
  2013. %      This line here is a little tricky. If a \nofrills is found when
  2014. %      we look ahead, then \frills@ will become equal to \eat@ and it
  2015. %      will eat "References" before \Refs is allowed to read its
  2016. %      argument.  Also we have to use a \csname trick to get around
  2017. %      the outerness of \Refs.  MJD
  2018.  \nofrillscheck{\csname Refs\expandafter\endcsname
  2019.   \frills@{{References}}}}
  2020. %
  2021. \def\endRefs{\par % This will check for a missing \endref, also
  2022.   \endgroup}
  2023. %
  2024. %      These two conditionals are used for handling the logic of
  2025. %      typesetting book versus journal article versus proceedings
  2026. %      article references.
  2027. \newif\ifbook@ \newif\ifprocpaper@
  2028. %
  2029. %      The \else clause here is to handle the case when \nofrills is
  2030. %      used outside of the References section in an unexpected place
  2031. %      (i.e., not immediately after \proclaim, \definition, \head, or
  2032. %      the other things that have a \nofrills option).
  2033. %
  2034. \def\nofrills{%
  2035. %      Are we inside a \ref...\endref pair?  If so, OK to continue.
  2036.   \expandafter\ifx\envir@end\endref
  2037.     \let\do\relax
  2038.     \xdef\nofrills@list{\nofrills@list\do\curbox}%
  2039.   \else\errmessage{\Invalid@@ \string\nofrills}%
  2040.   \fi}%
  2041. %
  2042. \def\defaultreftexts{\gdef\edtext{ed.}\gdef\pagestext{pp.}%
  2043.   \gdef\voltext{vol.}\gdef\issuetext{no.}}
  2044. \defaultreftexts
  2045. %
  2046. \def\ref{\par
  2047.   \begingroup \def\envir@end{\endref}%
  2048. %      Start the reference.
  2049.   \noindent\hangindent\refindentwd
  2050. %      Change \par so that it will supply a (presumably) missing
  2051. %      \endref, with an error message.
  2052.   \def\par{\add@missing\endref}%
  2053. %      \nofrills@list should always be assigned globally, to conserve
  2054. %      save stack.
  2055.   \global\let\nofrills@list\empty@
  2056. %
  2057. %      Change \linebreak and \mathbreak to work properly in the
  2058. %      special ref environment.
  2059.   \refbreaks
  2060.   \procpaper@false \book@false \moreref@false
  2061. %      Start an initial box, to match up properly with the first
  2062. %      upcoming \makerefbox; this will be discarded.
  2063.   \def\curbox{\z@}\setbox\z@\vbox\bgroup
  2064. }
  2065. %
  2066. %      \keyhook@ is used for switching  the style of reference labels
  2067. %      automatically behind the scenes. This is for phasing in,
  2068. %      without loss of backward compatibilty, a \refstyle command to
  2069. %      implement the various reference styles currently used in AMS
  2070. %      production.  [19-MAR-1991] See the definition of \refstyle.
  2071. %
  2072. \let\keyhook@\empty@
  2073. %
  2074. \def\endref{%
  2075. %      To wind up the preceding box it is convenient to call
  2076. %      \makerefbox again; it will also open a new box, however, so we
  2077. %      give it arguments \thr@@ and \endgraf\egroup that will cause
  2078. %      the new box to be closed immediately and discarded. But we must
  2079. %      first make sure box 3 is void or we'll trigger an error
  2080. %      message.  This is done by dumping the current contents of
  2081. %      (global register) box 3 into (local register) box 2; the \box
  2082. %      command always makes its argument globally void.  (Because box
  2083. %      0 is used heavily in \makerefbox, it's easier to just use box 2
  2084. %      here, rather than try to verify that using box 0 would be safe
  2085. %      in all cases.)
  2086.   \setbox\tw@\box\thr@@
  2087.   \makerefbox?\thr@@{\endgraf\egroup}%
  2088. %      Then we call \endref@ to take all the saved material and
  2089. %      combine it into a paragraph, adding punctuation to separate
  2090. %      pieces.
  2091.   \endref@
  2092. %      The \endgraf is done here rather than in \endref@ because in
  2093. %      \moreref or \transl cases \endref@ shouldn't do the \endgraf.
  2094.   \endgraf
  2095. %      Finally, we need to close the group that was started by \ref.
  2096. %      This has the effect of killing the current definition of
  2097. %      \envir@end, among other things.
  2098.   \endgroup
  2099.   \keyhook@
  2100.   \global\let\keyhook@\empty@ % \global to conserve save stack
  2101. }
  2102. %
  2103. \def\key{\gdef\key{\makerefbox\key\keybox@\empty@}\key} \newbox\keybox@
  2104. \def\no{\gdef\no{\makerefbox\no\keybox@\empty@}%
  2105.   \gdef\keyhook@{\refstyle C}\no}
  2106. \def\by{\makerefbox\by\bybox@\empty@} \newbox\bybox@
  2107. \let\manyby\by % for backward compatibility
  2108. \def\bysame{\by\hbox to3em{\hrulefill}\thinspace\kern\z@}
  2109. \def\paper{\makerefbox\paper\paperbox@\it} \newbox\paperbox@
  2110. \def\paperinfo{\makerefbox\paperinfo\paperinfobox@\empty@}%
  2111.   \newbox\paperinfobox@
  2112. \def\jour{\makerefbox\jour\jourbox@
  2113.   {\aftergroup\book@false \aftergroup\procpaper@false}} \newbox\jourbox@
  2114. \def\issue{\makerefbox\issue\issuebox@\empty@} \newbox\issuebox@
  2115. \def\yr{\makerefbox\yr\yrbox@\empty@} \newbox\yrbox@
  2116. \def\pages{\makerefbox\pages\pagesbox@\empty@} \newbox\pagesbox@
  2117. \def\page{\gdef\pagestext{p.}\makerefbox\page\pagesbox@\empty@}
  2118. \def\ed{\makerefbox\ed\edbox@\empty@} \newbox\edbox@
  2119. \def\eds{\gdef\edtext{eds.}\makerefbox\eds\edbox@\empty@}
  2120. %      The \aftergroup\book@true here sets the \ifbook@ switch so that
  2121. %      later (in \endref@) we will know whether we are typesetting a
  2122. %      book, a journal article, or a proceedings article. Could use
  2123. %      \global instead of \aftergroup but avoiding \global is usually
  2124. %      safer when possible.
  2125. \def\book{\makerefbox\book\bookbox@
  2126.   {\it\aftergroup\book@true \aftergroup\procpaper@false}}
  2127.   \newbox\bookbox@
  2128. \def\bookinfo{\makerefbox\bookinfo\bookinfobox@\empty@}%
  2129.   \newbox\bookinfobox@
  2130. \def\publ{\makerefbox\publ\publbox@\empty@} \newbox\publbox@
  2131. \def\publaddr{\makerefbox\publaddr\publaddrbox@\empty@}%
  2132.   \newbox\publaddrbox@
  2133. %      See the above comment for \book about the \aftergroup
  2134. \def\inbook{\makerefbox\inbook\bookbox@
  2135.   {\aftergroup\procpaper@true \aftergroup\book@false}}
  2136. \def\procinfo{\makerefbox\procinfo\procinfobox@\empty@}%
  2137.   \newbox\procinfobox@
  2138. \def\finalinfo{\makerefbox\finalinfo\finalinfobox@\empty@}%
  2139.   \newbox\finalinfobox@
  2140. \def\miscnote{\makerefbox\miscnote\miscnotebox@\empty@}%
  2141.   \newbox\miscnotebox@
  2142. \def\toappear{\miscnote to appear}
  2143. \def\lang{\makerefbox\lang\langbox@\empty@} \newbox\langbox@
  2144. \newbox\morerefbox@
  2145. %
  2146. %      \vol is special because in AMS style it takes a different font
  2147. %      depending on whether it's a journal volume or a book volume.
  2148. %
  2149. \def\vol{\makerefbox\vol\volbox@{\ifbook@ \else
  2150.   \ifprocpaper@\else\bf\fi\fi}}
  2151. \newbox\volbox@
  2152. %
  2153. \newbox\holdoverbox
  2154. %
  2155. %      \makerefbox takes three arguments: the first is the name of
  2156. %      the calling macro, for use in error messages; argument 2
  2157. %      is the box used for storing data (note: some boxes are shared
  2158. %      by more than one calling macro); argument 3 is additional
  2159. %      material (optional---may be empty) that may be used to
  2160. %      affect the contents of the box.
  2161. %
  2162. \def\makerefbox#1#2#3{\endgraf
  2163. %      Set box 0 to the just-completed line of text.
  2164.   \setbox\z@\lastbox
  2165. %      Although \holdoverbox will usually be void it still doesn't
  2166. %      hurt to \unhbox it here in every case, which simplifies the
  2167. %      programming.
  2168.   \global\setbox\@ne\hbox{\unhbox\holdoverbox
  2169. %      \ifvoid test is necessary here to prevent a \linebreak at the
  2170. %      end of a field from being removed by the \unpenalty.
  2171.     \ifvoid\z@\else\unhbox\z@\unskip\unskip\unpenalty\fi}%
  2172.   \egroup
  2173. %      If box 1 is empty (width <= 0pt) then set the current box to
  2174. %      void (it might still have a baselineskip glue or something in
  2175. %      it at this point, for one thing).  Otherwise set it to box 1.
  2176.   \setbox\curbox\box\ifdim\wd\@ne>\z@ \@ne \else\voidb@x\fi
  2177. %    That finishes the previous box.  Now let's start a new one
  2178. %    using the box given as arg 1 of \makerefbox. But first check
  2179. %    to see if it's void and if not give an error message.
  2180.   \ifvoid#2\else\Err@{Redundant \string#1; duplicate use, or
  2181.      mutually exclusive information already given}\fi
  2182.   \def\curbox{#2}\setbox\curbox\vbox\bgroup \hsize\maxdimen \noindent
  2183.   #3}
  2184. %
  2185. \def\refbreaks{%
  2186.   \def\refconcat##1{\setbox\z@\lastbox \setbox\holdoverbox\hbox{%
  2187.        \unhbox\holdoverbox \unhbox\z@\unskip\unskip\unpenalty##1}}%
  2188.   \def\holdover##1{%
  2189.     \RIfM@
  2190. %    Break the current line, adding \null to ensure proper spacing for
  2191. %    a preceding mathrel or mathbin. The blank line containing the
  2192. %    \null will be discarded by later processing.
  2193.       \penalty-\@M\null
  2194. %      Put a temporary ending of the current math formula on the next
  2195. %      line, by itself.
  2196.       \hfil$\clubpenalty\z@\widowpenalty\z@\interlinepenalty\z@
  2197.       \offinterlineskip\endgraf
  2198. %      Now remove that unwanted extra line and the preceding \lineskip
  2199. %      (of 0pt) and any  penalty.  There shouldn't be any penalty,
  2200. %      actually, because the relevant penalties were set to 0 above;
  2201. %      but the \unpenalty is harmless and perhaps there is an
  2202. %      overlooked eventuality that it will catch.
  2203.       \setbox\z@\lastbox\unskip \unpenalty
  2204.       \refconcat{##1}%
  2205.       \noindent
  2206. %      Since we did a temporary end of the current math formula there
  2207. %      remains some more math coming up; therefore we need to shift
  2208. %      into math mode again.  By breaking immediately after the
  2209. %      beginning of the math formula we leave the unwanted extra
  2210. %      \mathon item in a line by itself; this will be ignored because
  2211. %      in the unpacking process we will only take the last line out of
  2212. %      the current \vbox.
  2213.       $\hfil\penalty-\@M
  2214. %      No \null here because we don't need to do anything extra to
  2215. %      affect the math spacing of the following item. (Line breaks
  2216. %      in math formulas always occur after a \mathbin or \mathrel,
  2217. %      not before, according to AMS style.)
  2218.     \else
  2219.       \endgraf\refconcat{##1}\noindent
  2220.     \fi}%
  2221.   \def\break{\holdover{\penalty-\@M}}%
  2222.   \let\vadjust@\vadjust
  2223.   \def\vadjust##1{\holdover{\vadjust@{##1}}}%
  2224. %      It seems unlikely that \newpage will be needed inside of a
  2225. %      \ref...\endref construction (more likely it will occur between
  2226. %      references, if at all).  So we provide only a very simple
  2227. %      alternate version using \vadjust.
  2228.   \def\newpage{\vadjust{\vfill\break}}%
  2229. }
  2230. %
  2231. \def\refstyle#1{\uppercase{%
  2232.   \if#1A\relax \def\keyformat##1{[##1]\enspace\hfil}%
  2233.   \else\if#1B\relax
  2234.     \def\keyformat##1{\aftergroup\kern
  2235.               \aftergroup-\aftergroup\refindentwd}%
  2236.     \refindentwd\parindent
  2237.  \else\if#1C\relax
  2238.    \def\keyformat##1{\hfil##1.\enspace}%
  2239.  \fi\fi\fi}% end of \uppercase
  2240. }
  2241. %
  2242. %      Make letters the default for ref labels. This is chosen over
  2243. %      refstyle C with a view to eventually phasing out \no in favor
  2244. %      of always using \key, with the formatting being determined by
  2245. %      the refstyle setting.
  2246. \refstyle{A}
  2247. %
  2248. %      You might think that \refbreak@ shouldn't be necessary here (it
  2249. %      executes a line break if the user specified \linebreak in the
  2250. %      last field of the reference), but: sometimes there will be a
  2251. %      language after the final period, and conceivably someone might
  2252. %      need to break the line after the period and before the
  2253. %      language.
  2254. \def\finalpunct{\ifnum\lastkern=\m@ne\unkern\else.\fi
  2255.        \refquotes@\refbreak@}%
  2256. \def\continuepunct#1#2#3#4{}%
  2257. %
  2258. %      \endref@ is shared by \endref, \moreref, and \transl, therefore
  2259. %      some of the code needs to be circumspect.
  2260. \def\endref@{%
  2261. %      Change the format of the reference label, if necessary:
  2262.   \keyhook@
  2263. %      This variant definition of \nofrillscheck is embedded in
  2264. %      \endref@ despite the slight cost in extra execution time, in
  2265. %      order to allow, e.g., subheadings within a bibliography section
  2266. %      to have normal \nofrills action.
  2267.   \def\nofrillscheck##1{%
  2268.     \def\do####1{\ifx##1####1\let\frills@\eat@\fi}%
  2269.     \let\frills@\identity@ \nofrills@list}%
  2270. %      If no author name was given, but editor name was given, then
  2271. %      transfer it to the author name box so that it will print at the
  2272. %      beginning of the reference.  This  would normally happen only
  2273. %      in the case of a proceedings volume or other such collection,
  2274. %      cited as a whole.
  2275.   \ifvoid\bybox@
  2276.     \ifvoid\edbox@
  2277.     \else\setbox\bybox@\hbox{\unhbox\edbox@\breakcheck
  2278.       \nofrillscheck\edbox@\frills@{\space(\edtext)}\refbreak@}\fi
  2279.   \fi
  2280. %      \noindent \hangindent\refindentwd was done earlier by \ref, so
  2281. %      at this point we just need to put the reference label on the
  2282. %      page.
  2283. %
  2284. %      Using this \ifvoid test is partly to prevent accessing \keybox@
  2285. %      in the \moreref and \transl cases:
  2286.   \ifvoid\keybox@\else\hbox to\refindentwd{%
  2287.        \keyformat{\unhbox\keybox@}}\fi
  2288.   \ifmoreref@
  2289. %      Even though this reads ``\commaunbox@,'' a semicolon will be
  2290. %      substituted for the comma by the action of \punct@ if
  2291. %      \morerefbox@ is in fact not void.  (And note that both \transl
  2292. %      and \moreref share \morerefbox@.)
  2293.     \commaunbox@\morerefbox@
  2294.   \else
  2295. %      Put in some special kerns to flag the beginning of a reference,
  2296. %      to avoid adding unwanted punctuation and space if \by is omitted.
  2297.     \kern-\tw@ sp\kern\m@ne sp
  2298.   \fi
  2299.   \ppunbox@\empty@\empty@\bybox@\empty@
  2300.   \ifbook@ % Case 1: \book etc.
  2301.     \commaunbox@\bookbox@ \commaunbox@\bookinfobox@
  2302.     \ppunbox@\empty@{ (}\procinfobox@)%
  2303.     \ppunbox@,{ vol.~}\volbox@\empty@
  2304.     \ppunbox@\empty@{ (}\edbox@{, \edtext)}%
  2305.     \commaunbox@\publbox@ \commaunbox@\publaddrbox@
  2306.     \commaunbox@\yrbox@
  2307.     \ppunbox@,{ \pagestext~}\pagesbox@\empty@
  2308.   \else
  2309.     \commaunbox@\paperbox@ \commaunbox@\paperinfobox@
  2310.     \ifprocpaper@ % Case 2: \paper ... \inbook
  2311.       \commaunbox@\bookbox@
  2312.       \ppunbox@\empty@{ (}\procinfobox@)%
  2313.       \ppunbox@\empty@{ (}\edbox@{, \edtext)}%
  2314.       \commaunbox@\bookinfobox@
  2315.       \ppunbox@,{ \voltext~}\volbox@\empty@
  2316.       \commaunbox@\publbox@ \commaunbox@\publaddrbox@
  2317.       \commaunbox@\yrbox@
  2318.       \ppunbox@,{ \pagestext~}\pagesbox@\empty@
  2319.     \else % Case 3: \paper ... \jour
  2320.       \commaunbox@\jourbox@
  2321.       \ppunbox@\empty@{ }\volbox@\empty@
  2322.       \ppunbox@\empty@{ (}\yrbox@)%
  2323.       \ppunbox@,{ \issuetext~}\issuebox@\empty@
  2324. %      Although \publ and \publaddr will rarely be used with a journal
  2325. %      article, it doesn't really hurt to print them if provided, and
  2326. %      certain rare cases may benefit.  E.g.:
  2327. %
  2328. %      \paper \"Uber maximale Monotonie von Operatoren des Typs
  2329. %      $L^\ast \Phi\circ L$ \paperinfo Report 78-24 \publ Math. Inst.,
  2330. %      Univ. K\"oln \yr 1978 \moreref\jour  published as Manuscripta
  2331. %      Math. \vol28 \yr1979\pages 305--316
  2332. %
  2333.       \commaunbox@\publbox@ \commaunbox@\publaddrbox@
  2334.       \commaunbox@\pagesbox@
  2335.     \fi
  2336.   \fi
  2337.   \commaunbox@\finalinfobox@
  2338.   \ppunbox@\empty@{ (}\miscnotebox@)%
  2339. %      The final punctuation (usually a period) here is not part of a
  2340. %      \ppunbox@ clause because it is always inserted even if
  2341. %      \langbox@ is void.
  2342.   \finalpunct\ppunbox@\empty@{ (}\langbox@)%
  2343. %      Restore defaults "ed.", "pp.", etc. in case they were changed.
  2344.   \defaultreftexts
  2345. }
  2346. %
  2347. %      \punct@ is the same as \identity@, but we define it rather than
  2348. %      using \let, just in case the contents of amsppt.sty ever get
  2349. %      shuffled around in such a way that \identity@ is later in the
  2350. %      file.
  2351. \def\punct@#1{#1}
  2352. %      \ppunbox@ takes 4 arguments.  #1 is punctuation that should
  2353. %      precede ending quotes and/or a line breaking penalty, from the
  2354. %      previous item.  #2 is material (usually a word space) that
  2355. %      should come after ending quotes or a penalty.  #3 is the box
  2356. %      containing the next part of the current reference.  #4 is other
  2357. %      material to follow box #3 (e.g., a closing parenthesis, in some
  2358. %      cases).
  2359. %
  2360. \def\ppunbox@#1#2#3#4{\ifvoid#3\else
  2361.   \let\prespace@\relax
  2362. %      If nofrills was specified for the previous item, then it will
  2363. %      have been ended with a kern of -1sp.  If we find such a kern,
  2364. %      we remove it and omit the normal punctuation (arg #1).
  2365.   \ifnum\lastkern=\m@ne \unkern\let\punct@\eat@
  2366. %      A kern of -2sp here means we are at the very beginning of the
  2367. %      reference, after the key or number. In that case we need to
  2368. %      omit not only the punctuation, but also any following space.
  2369.     \ifnum\lastkern=-\tw@ \unkern\let\prespace@\ignorespaces \fi
  2370.   \fi
  2371.   \nofrillscheck#3%
  2372.   \punct@{#1}\refquotes@\refbreak@
  2373. %      Restore normal definition of \punct@:
  2374.   \let\punct@\identity@
  2375.   \prespace@
  2376. %      If \nofrills is not in effect, the \space will be eaten;
  2377. %      otherwise it will be substituted for the normal pre-item
  2378. %      frills.
  2379.   \frills@{#2\eat@}\space
  2380. %      \refquotes@ and \refbreak@ will be emptied by \breakcheck
  2381. %      (unless of course there is a new line breaking penalty present
  2382. %      for next time around).
  2383.   \unhbox#3\breakcheck
  2384.   \frills@{#4\eat@}{\kern\m@ne sp}\fi}
  2385. %
  2386. \def\commaunbox@#1{\ppunbox@,\space{#1}\empty@}
  2387. %
  2388. %      By putting the \ifnum here inside the \edef we get automatic
  2389. %      initialization of \refbreak@ for the next time around, instead
  2390. %      of needing an extra \let\refbreak@\empty@ step after \refbreak@
  2391. %      is used.
  2392. \def\breakcheck{\edef\refbreak@{\ifnum\lastpenalty=\z@\else
  2393.   \penalty\the\lastpenalty\relax\fi}\unpenalty}
  2394. %
  2395. %      For quotes, the complication is that the ending quotes must
  2396. %      fall after a comma or other such punctuation that might come
  2397. %      next (we don't know yet what punctuation will be used, if any).
  2398. %      And in addition we have the usual possibility of a line break
  2399. %      to worry about at the same time.  Therefore the special control
  2400. %      sequence \endquotes is provided, to be used like this, if let's
  2401. %      say you want book titles to appear in quotes:
  2402. %
  2403. %      \ppunbox@,{ ``}\bookbox@\endquotes
  2404. %      \commaunbox@\bookinfobox@
  2405. %
  2406. %      \endquotes defines the control sequence \refquotes@ to add the
  2407. %      ending quotes later, after we find out whether a comma, period,
  2408. %      or no punctuation at all will be added (not to mention maybe a
  2409. %      line breaking penalty that would need to be shuffled around).
  2410. %
  2411. \def\endquotes{\def\refquotes@{''\let\refquotes@\empty@}}
  2412. \let\refquotes@\empty@
  2413. \let\refbreak@\empty@
  2414. %
  2415. %    We need a switch to handle certain complications with the moreref
  2416. %    case.
  2417. %
  2418. \newif\ifmoreref@
  2419. %
  2420. %    \moreref ends the previous setbox operation, does \endref@ to
  2421. %    typeset any information gathered so far, and then prepares to
  2422. %    start the equivalent of a new \ref.
  2423. %
  2424. \def\moreref{%
  2425. %    To wind up the preceding box it is convenient to call
  2426. %    \makerefbox again; it will also open a new box, however, so we
  2427. %    give it arguments \thr@@ and \endgraf\egroup that will cause the
  2428. %    new box to be closed immediately and discarded. But we must first
  2429. %    make sure box 3 is void or we'll trigger an error message.  This
  2430. %    is done by dumping the current contents of (global register) box
  2431. %    3 into (local register) box 2; the \box command always makes its
  2432. %    argument globally void.  (Because box 0 is used heavily in
  2433. %    \makerefbox, it's easier to just use box 2 here, rather than try
  2434. %    to verify that using box 0 would be safe in all cases.)
  2435.   \setbox\tw@\box\thr@@
  2436.   \makerefbox?\thr@@{\endgraf\egroup}%
  2437. %    This saved definition will be lost if something else in \endref@
  2438. %    uses \savedef@.  Currently (14-MAR-1991) that is not the case,
  2439. %    however, so doing it this way allows us to save a bit of memory.
  2440.   \let\savedef@\finalpunct  \let\finalpunct\empty@
  2441.   \endref@
  2442. %    The next time \punct@ is called by \ppunbox, it will change
  2443. %    ",\refquotes@" into "\refquotes@;" or similarly for
  2444. %    \empty@\refquotes@.  Then \punct@ will be restored to its original
  2445. %    definition.  Note that this definition does not need to be
  2446. %    global; it is local inside the \begingroup ...\endgroup of the
  2447. %    current \ref.
  2448.   \def\punct@##1##2{##2;}%
  2449.   \global\let\nofrills@list\empty@ % global, to conserve save stack
  2450. %      Now restore the normal definition of \finalpunct :
  2451.   \let\finalpunct\savedef@
  2452.   \moreref@true
  2453. %    Set any initial text between \moreref and the following
  2454. %    control sequence in \morerefbox@. This is typically used with
  2455. %    \transl to add a note such as "English transl."
  2456.   \def\curbox{\morerefbox@}%
  2457.   \setbox\morerefbox@\vbox\bgroup \hsize\maxdimen \noindent
  2458. }
  2459. %    And \transl, for setting translation information,
  2460. %    doesn't need to be any different than \moreref:
  2461. %
  2462. \def\transl{\moreref}
  2463. %
  2464. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2465. %      -14- END OF DOCUMENT
  2466. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2467. \message{end of document,}
  2468. %
  2469. \outer\def\enddocument{\par% \par will do a runaway check for \endref
  2470.   \add@missing\endRefs
  2471. %      Repeat these in case an article (or book chapter!) doesn't have
  2472. %      a references section:
  2473.   \add@missing\endroster \add@missing\endproclaim
  2474.   \add@missing\enddefinition
  2475.   \add@missing\enddemo \add@missing\endremark \add@missing\endexample
  2476. %      In a monograph we expect the translator name and author
  2477. %      addresses to be handled in the front matter rather than at the
  2478. %      end of the individual chapters:
  2479.  \ifmonograph@ % do nothing
  2480.  \else
  2481. %      No break between the References and the final matter.
  2482.  \nobreak
  2483. %      The \address's get printed at the end of the paper.  Also the
  2484. %      translator name, if any.  We don't need to do an
  2485. %      \ifx\thetranslator@\empty@, as we did with \thesubjclass@ and
  2486. %      other items in \endtopmatter, because we're not constructing a
  2487. %      footnote, just slapping the material on the page.
  2488.  \thetranslator@
  2489. %      Print all the \address's, including e-mail addresses if
  2490. %      present. If any of the \email's are undefined the \csname will
  2491. %      just evaluate to \relax.
  2492.  \count@\z@ \loop\ifnum\count@<\addresscount@\advance\count@\@ne
  2493.  \csname address\number\count@\endcsname
  2494.  \csname email\number\count@\endcsname
  2495.  \repeat
  2496. \fi
  2497.  \vfill\supereject\end}
  2498. %
  2499. %
  2500. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2501. %      -15- OUTPUT ROUTINE
  2502. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2503. \message{output routine,}
  2504. %      Extra braces are added in \folio to localize \foliofont@; this
  2505. %      is merely a precaution, since in our basic style it will be
  2506. %      localized anyway by being put in an \llap or \rlap.  We provide
  2507. %      a \foliofont@ separate from \headlinefont@ because it is not
  2508. %      uncommon for documentstyles to have the folios in a different
  2509. %      font, although in our basic style this is not the case.
  2510. %      \foliofont@ is \eightrm instead of \eightpoint merely for
  2511. %      efficiency; we don't expect to need for example math family
  2512. %      assignments in order to typeset the folio.  On the other hand
  2513. %      we need full math capability for \headlinefont@ since running
  2514. %      heads may contain math (from a title or a section head).  From
  2515. %      a design standpoint it might be preferable to have seven-point
  2516. %      running heads (compare a small caps \head that falls at the top
  2517. %      of a page with the running head above it) but it is more
  2518. %      convenient to use the already available \eightpoint macro, and
  2519. %      this saves a bit of overhead.
  2520. %
  2521. \def\folio{{\foliofont@\ifnum\pageno<\z@ \romannumeral-\pageno
  2522.  \else\number\pageno \fi}}
  2523. \def\foliofont@{\eightrm}
  2524. \def\headlinefont@{\eightpoint}
  2525. %
  2526. %      \leftheadline and \rightheadline use the method described in
  2527. %      the TeXbook, p. 260 for selecting different pieces of the
  2528. %      topmark or botmark.  The necessary \else is inserted by
  2529. %      \leftheadtext and \rightheadtext.
  2530. %
  2531. \def\leftheadline{\rlap{\folio}\hfill \iftrue\topmark\fi \hfill}
  2532. \def\rightheadline{\hfill \expandafter\iffalse\botmark\fi
  2533.   \hfill \llap{\folio}}
  2534. %
  2535. \newtoks\leftheadtoks
  2536. \newtoks\rightheadtoks
  2537. %
  2538. %      \leftheadtext and \rightheadtext have a \nofrills option to
  2539. %      turn off uppercasing.  They also set their argument in a box,
  2540. %      during a syntax check, because otherwise syntax errors in the
  2541. %      argument would not be caught (because the output routine, and
  2542. %      hence \headline, is never called during a syntax check).
  2543. %
  2544. \def\leftheadtext{\let\savedef@\leftheadtext
  2545.   \def\leftheadtext##1{\let\leftheadtext\savedef@
  2546.     \leftheadtoks\expandafter{\frills@\uppercasetext@{##1}}%
  2547.     \mark{\the\leftheadtoks\noexpand\else\the\rightheadtoks}
  2548.     \ifsyntax@\setboxz@h{\def\\{\unskip\space\ignorespaces}%
  2549.         \headlinefont@##1}\fi}%
  2550.   \nofrillscheck\leftheadtext}
  2551. %
  2552. \def\rightheadtext{\let\savedef@\rightheadtext
  2553.   \def\rightheadtext##1{\let\rightheadtext\savedef@
  2554.     \rightheadtoks\expandafter{\frills@\uppercasetext@{##1}}%
  2555.     \mark{\the\leftheadtoks\noexpand\else\the\rightheadtoks}%
  2556.     \ifsyntax@\setboxz@h{\def\\{\unskip\space\ignorespaces}%
  2557.         \headlinefont@##1}\fi}%
  2558.   \nofrillscheck\rightheadtext}
  2559. %
  2560. %      In the running heads, we redefine \chapter so that it only does
  2561. %      a roman numeral (via \chapterno@) rather than "CHAPTER " +
  2562. %      roman numeral. In the \nofrills case, however, e.g. for
  2563. %      something like "Appendix A", the given text is printed without
  2564. %      modification.  And we redefine \\ because if the running head
  2565. %      is taken from a title or section head it might possibly contain
  2566. %      a \\ from the line-breaking done in the original text.
  2567. %
  2568. \headline={\def\\{\unskip\space\ignorespaces}\headlinefont@
  2569.   \def\chapter{%
  2570.     \def\chapter##1{%
  2571.       \frills@{\afterassignment\chapterno@ \chaptercount@=}##1.\space}%
  2572.     \nofrillscheck\chapter}%
  2573.   \ifodd\pageno \rightheadline \else \leftheadline\fi}
  2574. %
  2575. %      Capitalization is used to indicate global scope of
  2576. %      \NoRunningHeads and \NoPageNumbers, as is done by amstex.tex
  2577. %      for \TagsOnLeft, etc.
  2578. %
  2579. \def\NoRunningHeads{\global\runheads@false\global\let\headmark\eat@}
  2580. \def\NoPageNumbers{\gdef\folio{}}
  2581. %
  2582. \def\logo@{\baselineskip2pc \hbox to\hsize{\hfil\eightpoint Typeset by
  2583.  \AmSTeX}}
  2584. %
  2585. %      In response to the popular demand, reinstate the
  2586. %      \nologo command removed in version 2.0.
  2587. %
  2588. \def\nologo{\def\logo@{}}
  2589. %
  2590. %      Finally, we are ready for the \output routine. It is based on
  2591. %      the \plainoutput routine, but the first page normally has the
  2592. %      `Typeset by AmS-TeX' logo attached, and we add a switch for
  2593. %      running heads.  The default for running heads is "true".
  2594. %
  2595. \newif\iffirstpage@     \firstpage@true
  2596. \newif\ifrunheads@      \runheads@true
  2597. %
  2598. \output={\output@}
  2599. \def\output@{\shipout\vbox{%
  2600.  \iffirstpage@ \global\firstpage@false
  2601.   \pagebody \logo@ \makefootline%
  2602.  \else \ifrunheads@ \makeheadline \pagebody
  2603.        \else \pagebody \makefootline \fi
  2604.  \fi}%
  2605.  \advancepageno \ifnum\outputpenalty>-\@MM\else\dosupereject\fi}
  2606. %
  2607. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2608. %      -16- HYPHENATION EXCEPTIONS
  2609. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2610. \message{hyphenation exceptions (U.S. English)}
  2611. %      Add some common hyphenation exceptions, from TUGboat files,
  2612. %      20-NOV-1989. For more details see TUGboat vol 10, no 3,
  2613. %      November 1989, pp. 336--341. Many words from the TUGboat list
  2614. %      that seemed less likely to occur in mathematical text have been
  2615. %      omitted because hyphenation exceptions use up memory (most
  2616. %      versions of TeX currently have a limit of 307 on hyphenation
  2617. %      exceptions; each added hyphenation exception uses up something
  2618. %      like 2 extra words of main memory as well).  The list of
  2619. %      hyphenations for proper names could be expanded forever if room
  2620. %      permitted; we restrict ourselves to a rather short, extremely
  2621. %      arbitrary list.
  2622. %
  2623. %      Note: The hyphenation rules of British English differ in some
  2624. %      particulars from the U.S. rules.
  2625. %
  2626. \hyphenation{acad-e-my acad-e-mies af-ter-thought anom-aly anom-alies
  2627. an-ti-deriv-a-tive an-tin-o-my an-tin-o-mies apoth-e-o-ses
  2628. apoth-e-o-sis ap-pen-dix ar-che-typ-al as-sign-a-ble as-sist-ant-ship
  2629. as-ymp-tot-ic asyn-chro-nous at-trib-uted at-trib-ut-able bank-rupt
  2630. bank-rupt-cy bi-dif-fer-en-tial blue-print busier busiest
  2631. cat-a-stroph-ic cat-a-stroph-i-cally con-gress cross-hatched data-base
  2632. de-fin-i-tive de-riv-a-tive dis-trib-ute dri-ver dri-vers eco-nom-ics
  2633. econ-o-mist elit-ist equi-vari-ant ex-quis-ite ex-tra-or-di-nary
  2634. flow-chart for-mi-da-ble forth-right friv-o-lous ge-o-des-ic
  2635. ge-o-det-ic geo-met-ric griev-ance griev-ous griev-ous-ly
  2636. hexa-dec-i-mal ho-lo-no-my ho-mo-thetic ideals idio-syn-crasy
  2637. in-fin-ite-ly in-fin-i-tes-i-mal ir-rev-o-ca-ble key-stroke
  2638. lam-en-ta-ble light-weight mal-a-prop-ism man-u-script mar-gin-al
  2639. meta-bol-ic me-tab-o-lism meta-lan-guage me-trop-o-lis
  2640. met-ro-pol-i-tan mi-nut-est mol-e-cule mono-chrome mono-pole
  2641. mo-nop-oly mono-spline mo-not-o-nous mul-ti-fac-eted mul-ti-plic-able
  2642. non-euclid-ean non-iso-mor-phic non-smooth par-a-digm par-a-bol-ic
  2643. pa-rab-o-loid pa-ram-e-trize para-mount pen-ta-gon phe-nom-e-non
  2644. post-script pre-am-ble pro-ce-dur-al pro-hib-i-tive pro-hib-i-tive-ly
  2645. pseu-do-dif-fer-en-tial pseu-do-fi-nite pseu-do-nym qua-drat-ic
  2646. quad-ra-ture qua-si-smooth qua-si-sta-tion-ary qua-si-tri-an-gu-lar
  2647. quin-tes-sence quin-tes-sen-tial re-arrange-ment rec-tan-gle
  2648. ret-ri-bu-tion retro-fit retro-fit-ted right-eous right-eous-ness
  2649. ro-bot ro-bot-ics sched-ul-ing se-mes-ter semi-def-i-nite
  2650. semi-ho-mo-thet-ic set-up se-vere-ly side-step sov-er-eign spe-cious
  2651. spher-oid spher-oid-al star-tling star-tling-ly sta-tis-tics
  2652. sto-chas-tic straight-est strange-ness strat-a-gem strong-hold
  2653. sum-ma-ble symp-to-matic syn-chro-nous topo-graph-i-cal tra-vers-a-ble
  2654. tra-ver-sal tra-ver-sals treach-ery turn-around un-at-tached
  2655. un-err-ing-ly white-space wide-spread wing-spread wretch-ed
  2656. wretch-ed-ly Brown-ian Eng-lish Euler-ian Feb-ru-ary Gauss-ian
  2657. Grothen-dieck Hamil-ton-ian Her-mit-ian Jan-u-ary Japan-ese Kor-te-weg
  2658. Le-gendre Lip-schitz Lip-schitz-ian Mar-kov-ian Noe-ther-ian
  2659. No-vem-ber Rie-mann-ian Schwarz-schild Sep-tem-ber}
  2660. %
  2661. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2662. %
  2663. %      We begin with ten-point type.
  2664. %
  2665. \tenpoint
  2666. %
  2667. %      Write an empty line on screen to tidy up:
  2668. \W@{}
  2669. %
  2670. %    Now we restore the catcode for @ that was in effect before this
  2671. %    file. Note that we do not use \filename here, even though we did
  2672. %    at the beginning of this file, because in the absence of a proper
  2673. %    filename stack mechanism, we cannot be sure (taking into account
  2674. %    possible future changes in the contents of amsppt.sty) that an
  2675. %    intervening input file did not change \filename to another value.
  2676. %
  2677. \csname amsppt.sty\endcsname
  2678. %
  2679. %      And that's it.
  2680. \endinput
  2681. %
  2682. %
  2683. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2684. %      -17- NOTES
  2685. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2686.  
  2687.  Abbreviations used in this file:
  2688.  
  2689.  From plain.tex:
  2690.  
  2691.  \p@             1pt, dimen register
  2692.  \z@             0pt, dimen register, can be used also as a number
  2693.  \m@ne           -1, count register
  2694.  
  2695.  Chardefs and mathchardefs (these control sequences can be used as
  2696.  numbers):
  2697.  
  2698.  \@ne            1
  2699.  \tw@            2
  2700.  \thr@@          3
  2701.  \active         13
  2702.  \sixt@@n        16
  2703.  \@cclv          255
  2704.  \@cclvi         256
  2705.  \@m             1000
  2706.  \@M             10000
  2707.  \@MM            20000
  2708.  
  2709.  Scratch registers:
  2710.  
  2711.  \countdef\count@=255
  2712.  \dimendef\dimen@=0
  2713.  \dimendef\dimen@i=1  global only
  2714.  \dimendef\dimen@ii=2
  2715.  \skipdef\skip@=0
  2716.  \toksdef\toks@=0
  2717.  
  2718.  Other:
  2719.  
  2720.  \m@th           sets \mathsurround=0pt
  2721.  \z@skip         0pt plus 0pt minus 0pt, skip register
  2722.  \hideskip       -1000pt plus 1fill, skip register
  2723.  \centering      0pt plus 1000pt minus 1000pt, skip register
  2724.  \voidb@x        permanently void box register
  2725.  \endgraf        same as \par, but will be accepted in arguments where
  2726.                    \par would cause an error.
  2727.  
  2728.  \space          a macro whose expansion is a space token
  2729.  \empty@          a defined macro with a null expansion
  2730.  \null           an \hbox with null contents
  2731.  
  2732.  From amstex.tex:
  2733.  
  2734.  \W@             \immediate\write16
  2735.  \eat@           gobbles next token or group in braces
  2736.  \strip@         gets rid of trailing space from given argument
  2737.  \hashtoks@      token register, containing #
  2738.  \centering@     skip register, 0pt plus 1000pt
  2739.  \rightappend@ ... \to ...       Append to a token list.
  2740.  \space@         a space token (\let equal, not a macro like \space)
  2741.  \relaxnext@     \let\next=\relax
  2742.  \ex@            dimen, related to x-height, roughly equal to 1pt
  2743.  \hexnumber@     convert hex digit from decimal form to hex equivalent
  2744.  \font@          font assignment, like \font but modified to make
  2745.                    syntax check work
  2746.  \macro@@        used for stripping off the first part of the result
  2747.                    of a \meaning command.
  2748.  
  2749.  \def\FN@{\futurelet\next}
  2750.  \def\DN@{\def\next@}
  2751.  \def\DNii@{\def\nextii@}
  2752.  \def\RIfM@{\relax\ifmmode}
  2753.  \def\RIfMIfI@{\relax\ifmmode\ifinner}
  2754.  \def\setboxz@h{\setbox\z@\hbox}
  2755.  \def\wdz@{\wd\z@}
  2756.  \def\boxz@{\box\z@}
  2757.  \def\setbox@ne{\setbox\@ne}
  2758.  \def\wd@ne{\wd\@ne}
  2759.  
  2760.  More scratch registers:
  2761.  
  2762.  \toks@@
  2763.  \count@@
  2764.  \count@@@
  2765. %
  2766. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2767. %      -18- APPENDIX: NOTES ON VERSION 2.1
  2768. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2769.  
  2770. ---\curraddr was added, for giving the current address of an author,
  2771. if different from the address given in \address.
  2772.  
  2773. ---\rom was added, for preventing unwanted italicization of certain
  2774. things such as parentheses or numbers, in theorems and other italic
  2775. passages.  \rom automatically inserts italic corrections.
  2776.  
  2777. ---The implementation of \nofrills was completely changed, to provide
  2778. better error messages for a missing or misspelled \endkeywords or
  2779. similar end command, when reading a delimited argument. The error
  2780. message is now one of
  2781.  
  2782.   ! Forbidden control sequence found while scanning use of \keywords.
  2783.   ! Paragraph ended before \keywords was complete.
  2784.  
  2785. Previously the message would have had the same form, but would have
  2786. referred to a mysterious control sequence ``\next@'' instead of
  2787. \keywords.
  2788.  
  2789. This change also eliminates a longstanding, very minor bug
  2790. (\usualspace@ didn't work if it was stored in something such as
  2791. \keywords@ for later use, because of its dependence on the
  2792. \ifnofrills@ switch).
  2793.  
  2794. ---Multiple \thanks commands in the top matter will now produce
  2795. multiple acknowledgment footnotes instead of discarding all but the
  2796. last one. A period is no longer added automatically at the end of a
  2797. \thanks.
  2798.  
  2799. ---\subjclass was updated to use the date (1991) of the current
  2800. Mathematics Subject Classification scheme.
  2801.  
  2802. ---\widestnumber\item now works as claimed in the User's Guide.
  2803.  
  2804. ---The missing \par in \penaltyandskip@ was added.
  2805.  
  2806. ---Additional checks were added for runaway \proclaim, \definition,
  2807. \ref, \roster, etc.  The internal macro \runaway@ was changed to make
  2808. its usage more consistent and robust; in the process its name was
  2809. changed to \add@missing (and as the name suggests, it now tries to
  2810. recover by adding the  missing \end... command).
  2811.  
  2812. ---The bibliography macros were substantially modified to correct
  2813. another longstanding bug: line breaks after explicit hyphens,
  2814. mathbins, and mathrels were inhibited. This also involved changing the
  2815. \ref-specific version of \nofrills.  Backward compatibility (with
  2816. version 2.0) is not complete with respect to \nofrills in the
  2817. bibliography macros.  This seems best, however, not only to avoid
  2818. extra implementation difficulties, but also because the user syntax in
  2819. version 2.0 was inferior. \nofrills now should always follow
  2820. immediately after the name of the field to which it applies, e.g.,
  2821. \transl\nofrills, or \paper\nofrills. Note that this is more
  2822. consistent with the usage of \nofrills outside of the references
  2823. section. \nofrills will cause all the "frills" such as the parentheses
  2824. around years in journal article citations, or words like "eds." or
  2825. "vol." that are supplied automatically, to be omitted for the given
  2826. field.  In addition, it will suppress the automatic punctuation at the
  2827. end of the field, if any.
  2828.  
  2829. The macro \refdef@ is gone; instead, to define a new reference
  2830. element, you need a definition of the form
  2831.  
  2832.   \newbox\jourbox@
  2833.   \def\jour{\makerefbox\jour\jourbox@{\it}}
  2834.  
  2835. where \makerefbox is a macro with three arguments: #1 is the name of
  2836. the calling macro (for use in error messages, if need be), #2 is the
  2837. box in which the contents of the \jour field should be stored, and #3
  2838. is formatting information (primarily font changes) to be inserted at
  2839. the beginning of the box. However, as before, punctuation and words
  2840. such as "pp.", "eds.", or "vol." that are to be inserted automatically
  2841. are handled by \endref@.
  2842.  
  2843. Therefore, to change such frills, or the ordering of the parts of a
  2844. reference, you need to modify \endref@.  The macros \ppunbox@ and
  2845. \commaunbox@ should normally be used to unpack a box, because they
  2846. automatically take care of complications like \nofrills, closing
  2847. quotes, or line breaks. \ppunbox@ takes four arguments:
  2848.  
  2849.        #1: punctuation that should come before a line break or
  2850.            closing quotes of a previous field
  2851.        #2: other material such as "(" or "vol." that should be added
  2852.            at the beginning of the current field
  2853.        #3: the name of the box to be unpacked
  2854.        #4: other material such as ")" that should be added
  2855.            at the end of the current field
  2856.  
  2857. For example, the command to unpack the \yr field is:
  2858.  
  2859.        \ppunbox@\empty@{ (}\yrbox@)%
  2860.  
  2861. Note the use of \empty@ to specify no preceding comma or other
  2862. punctuation.
  2863.  
  2864. \commaunbox@ is merely an abbreviation for
  2865.  
  2866.        \ppunbox@,\space\xxxbox@\empty@
  2867.  
  2868. The switches \ifpaperquotes@ and \ifbookquotes@ are gone.  If quotes
  2869. are to be added around a particular part of a reference, it should be
  2870. done in \endref@ using \ppunbox@ and \endquotes as follows:
  2871.  
  2872.        \ppunbox@,{ ``}\xxxbox@\endquotes
  2873.  
  2874. \endquotes does not typeset the ending quotes immediately (because we
  2875. don't know yet whether to insert a comma or other punctuation before
  2876. the ending quotes).  Instead, it sets a flag to be used in subsequent
  2877. processing.
  2878.  
  2879. ---A \refstyle command was added to allow users to specify one of the
  2880. three different reference styles most commonly used in AMS
  2881. publications: letter labels in square brackets; unnumbered; and
  2882. numbered (denoted A, B, and C, respectively). The syntax is
  2883. "\refstyle{A}". Style C, numbered with arabic numerals, is the default
  2884. selected by amsppt.sty. Eventually, phasing in the \refstyle command
  2885. will allow the formatting for cites in the main text to be
  2886. automatically  linked with the corresponding references in the
  2887. bibliography. (Since the bibliography style could also affect the
  2888. style of cites, the \refstyle command should be placed in the preamble
  2889. of a document.) Also, eventually \key could be used for all reference
  2890. labels, and the \no command will be unnecessary, because its current
  2891. use is merely to indicate different formatting for the reference
  2892. number.
  2893.  
  2894. ---\miscnote was added, and used in the implementation of \toappear,
  2895. so that \toappear and \finalinfo would not be mutually exclusive.
  2896. \miscnote might also be used for things like "preprint" or
  2897. "submitted".  Unlike \finalinfo, \miscnote automatically adds
  2898. parentheses.
  2899.  
  2900. ---\procinfo was added, to give place and date where the meeting
  2901. took place, for proceedings volumes.
  2902.  
  2903. ---\eds or \ed information will now be used in place of an author's
  2904. name, if \by is absent.  This would be for collections or proceedings
  2905. volumes that are cited as a whole, instead of citing a single paper
  2906. within the volume.
  2907. %
  2908. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2909. %      -19- APPENDIX: NOTES ON VERSIONS 2.1a, 2.1b, ...
  2910. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2911.  
  2912. Users that have amsppt.sty built into their amstex format file will
  2913. need to rebuild their format file if they get a newer version of
  2914. amsppt.sty.
  2915.  
  2916. Version 2.1a:
  2917.  
  2918. ---Added a test so that amsppt.sty will give an error message if it's
  2919. about to be loaded and a different version of amsppt.sty was preloaded
  2920. in the format file.
  2921.  
  2922. ---Added code to compensate for a bug in version 2.1 that left
  2923. \amsppt.sty = \endinput. Probably not necessary---unless the error
  2924. message described above is changed in the future to just a warning
  2925. message.
  2926.  
  2927. ---Added \loadmsam and \loadmsbm before the call to \UseAMSsymbols,
  2928. so that amsppt.sty 2.1 will work even with an AMSTeX 2.0 format file.
  2929.  
  2930. ---Changed the definition of \magnification (from plain.tex) so that
  2931. it won't reset the page dimensions to 6.5 by 9 true inches if
  2932. it is used but will behave in a way that's more appropriate
  2933. for the amsppt page dimensions.
  2934.  
  2935. ---Switched to using box 0 instead of \keybox@ for measuring a \key
  2936. given with the \widestnumber command. This prevents a misnumbering
  2937. problem that occurred in rare cases (e.g., an unnumbered reference
  2938. following numbered references).
  2939.  
  2940. ---Changed erroneous \proclaimfont@ to \proclaimheadfont@ and
  2941. \demofont@ to \remarkheadfont@ in the definition of \Monograph.  Note:
  2942. This means that fonts used for \remark, \demo, \proclaim \definition,
  2943. \example, were wrong for any document that used \Monograph with amsppt
  2944. 2.1; switching to amsppt version 2.1a will make the fonts correct
  2945. according to AMS standard monograph style, but with a slight chance of
  2946. changing line breaks.
  2947.  
  2948. ---Added \pagenumwd and put the table-of-contents definition of
  2949. \page inside the \toc group so that it will not conflict with
  2950. the normal definition of \page if a single document contains
  2951. both \toc (with \widestnumber\page used) and \Refs.
  2952.  
  2953. ---Added default definition for \leftskip@ to handle rare cases.
  2954. Added \envir@stack\endroster in \Runinitem to prevent spurious
  2955. "missing \endroster" error every time it's used.
  2956.  
  2957. ---Change handling of \key and \no to better handle the complications
  2958. related to \refstyle and the need to maintain backward compatibility.
  2959. (I.e., \refstyle should automatically be reset to C if \no is used.)
  2960.  
  2961. ---Added \procpaper@false and \book@false where appropriate in \book,
  2962. \jour, \inbook to handle (rare?) \moreref cases where the additional
  2963. ref is not the same type as the first ref. Switched around \moreref
  2964. and \transl, a cosmetic change but makes the code easier to
  2965. understand. (It seems reasonable for \transl to be based on \moreref,
  2966. but rather odd for \moreref to be based on \transl, as in version
  2967. 2.1.)
  2968.  
  2969. ---Added \ifvoid test in \makerefbox to give an error message
  2970. if the same tag is used twice or mutually exclusive tags (e.g.,
  2971. \book and \inbook) are used.
  2972.  
  2973. ---Added some code to print out editors and pages information
  2974. if given even when according to AMS style it should normally
  2975. be omitted.
  2976.  
  2977. Version 2.1b:
  2978.  
  2979. ---Restored the old \nologo command by popular demand.
  2980.  
  2981. ---Added \linespacing command to facilitate changing line spacing
  2982. globally: \linespacing{2.0} increases line spacing by a factor of 2,
  2983. similarly \linespacing{1.5} or \linespacing{2.3} for arbitrary
  2984. factors.
  2985.  
  2986. ---Italic font is now used instead of slanted throughout (for e.g.
  2987. \proclaim).
  2988.  
  2989. ---Omitting \by in a \ref is now possible without getting unwanted
  2990. punctuation at the very beginning after the key.
  2991.  
  2992. ---\rom now handles preceding ~, not just preceding space.
  2993.  
  2994. ---\subsubheadfont@ added to facilitate font switching.
  2995.  
  2996. ---\document does some font setup if \topmatter is omitted.
  2997.  
  2998. ---Fixed a problem with running heads and \chapter\nofrills.
  2999.  
  3000. ---Eliminated spurious error message from \roster \widestnumber inside
  3001. a \proclaim.
  3002.  
  3003. Version 2.1c:
  3004.  
  3005. ---Fixed a bug introduced in version 2.1b: lost punctuation and space
  3006. at the beginning of a \moreref.
  3007.  
  3008.  
  3009.