summaryrefslogtreecommitdiff
path: root/macros/latex/required/amscls/amsdtx.dtx
blob: 7825a7028b46bb5c391eea175834f97e6c0b63ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
% \def\filename{amsdtx.dtx}
% \def\fileversion{2.07}
% \def\filedate{2009/08/19}
%
% \iffalse meta-comment
%
% American Mathematical Society
% Technical Support
% Publications Technical Group
% 201 Charles Street
% Providence, RI 02904
% USA
% tel: (401) 455-4080
%      (800) 321-4267 (USA and Canada only)
% fax: (401) 331-3842
% email: tech-support@ams.org
%
% Copyright 1996, 1999, 2004, 2009 American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
% 
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is the American Mathematical
% Society.
%
% \fi
%
% \iffalse
%    The following section of code makes this file self-printable.
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\documentclass{amsdtx}

\newcommand{\rp}{\let\PBS\\\raggedright\let\\\PBS}

\CodelineIndex

\begin{document}

\title{The \cls{amsldoc} and \cls{amsdtx} document classes}

\author{American Mathematical Society\\Michael Downes\\
  updated by David M. Jones}

\date{Version \fileversion, \filedate}

\DocInput{amsdtx.dtx}

\PrintIndex

\end{document}
%</driver>
% \fi
%
%^^A If this file is printed by itself the \fileversion and \filedate
%^^A information will come from the file header rather than from the
%^^A \ProvidesClass command. See \hDocInput.
% \maketitle
%
%    \tableofcontents
%
% \MakeShortVerb\|
% \section{Introduction}
%    This file is the source for two documentclasses, \cls{amsldoc}
%    (used for the \amslatex/ user's guide) and \cls{amsdtx} (used for
%    printing AMS \fn{.dtx} files). The generic \cls{book} class is used
%    as a base, but the \cls{amsdtx} class is modified to serve as an
%    article-type class. This affects the form of documentation files
%    mainly in the use of \cn{maketitle} and \cn{chapter}.
%
% \begin{table}
% \caption{Features of the \cls{amsldoc} and \cls{amsdtx} classes}
% \centering
% \begin{tabular}{lp{.65\columnwidth}}
% Command Name& Purpose\\
% \hline
% \cn{cn}& \rp To print a user command name: \verb"\cn{title}"; leading
%   backslash can be optionally included for control symbols:
%   \verb"\cn{\%}". The \cn{cn} command works properly even in macro
%   arguments (compare to, e.g., \cn{verb}\verb"'\newif'"). But beware
%   of a fragile control symbol (are there any?) in a moving argument.\\
% \cn{cs}& \rp `Control sequence': to print an internal command name,
%   not intended for the end user\\
% \cn{env}& \rp To print an environment name: \verb"\env{table}"\\
% \cn{pkg}& \rp To print a package name: \verb"\pkg{eufrak}"\\
% \cn{cls}& \rp To print a class name: \verb"\cls{book}"\\
% \cn{opt}& \rp To print the name of a class or package option:
%   \verb"\opt{twocolumn}"\\
% \cn{bst}& \rp To print the name of a \bibtex/ style
%   \verb"\bst{amsalpha}"\\
% \cn{fn}& \rp To print a file name or font name: \verb"\fn{T1enc.def}",
%   \verb"\fn{cmsy10}"\\
% \cn{fnt}& \rp To print a font name: \verb"\fn{cmsy10}" \\
% \cn{cnt}& \rp To print a counter name: \verb"\fn{topnumber}" \\
% \cn{qc}& \rp To quote a single character: \verb"\qc{\%}";
%   this works properly for special characters, even in macro
%   arguments, unlike e.g., \verb"\verb'%'"\\
% \cn{latex/} etc.& \rp Convenient forms of \cn{LaTeX}, \cn{TeX},
%   \cn{BibTeX}, etc. that are easier to type and have a trailing slash
%   to eliminate the following-space problem (without needing different
%   markup in different contexts)
% \end{tabular}
% \end{table}
%
% \StopEventually{}
%
%    Standard starting pieces. (Note: the reason each \cn{ProvidesClass}
%    command is placed on a line by itself, with separate begin and end
%    guards for docstripping, is to make automatic update of file date
%    and version slightly easier and more robust.)
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1995/06/01]% LaTeX date must be June 1995 or later
%<*amsldoc>
\ProvidesClass{amsldoc}[2009/08/19 v2.07]
%</amsldoc>
%<*amsdtx>
\ProvidesClass{amsdtx}[2009/08/19 v2.07]
%</amsdtx>
%    \end{macrocode}
%
% \section{Implementation}
%    Start with the generic book class as a base.
%    \begin{macrocode}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions
\LoadClass{book}
%    \end{macrocode}
%
%    \begin{macrocode}
\IfFileExists{url.sty}{%
    \RequirePackage{url}\relax
    \@gobble
}{%
    \@firstofone
}
{
    \DeclareRobustCommand{\url}[1]{%
        \def\@tempa{#1}%
        \texttt{\urlsetup $\expandafter\strip@prefix\meaning\@tempa$}%
    }%
    \def\urlsetup{%
        \check@mathfonts \textfont\@ne\the\font \textfont\z@\the\font
        \urlfix +\urlfix\=\urlfix\:\urlfix\-\urlfix\.\urlfix\,\urlfix\;%
        \urlbreak\&\urlbreak\/\urlbreak\?%
    }%
    \def\urlbreak#1{%
        \mathcode`#1="8000
        \begingroup \lccode`\~=`#1 \lowercase{\endgroup \edef~}%
        {\mathchar\number`#1\penalty\hyphenpenalty}%
    }%
    \def\urlfix#1{%
        \mathcode`#1=`#1\relax
    }%
}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%    \begin{macrocode}
\providecommand{\qq}[1]{\textquotedblleft#1\/\textquotedblright}
\providecommand{\mdash}{\textemdash\penalty\exhyphenpenalty}
\providecommand{\ndash}{\textendash\penalty\exhyphenpenalty}
%    \end{macrocode}
%
%    \begin{macrocode}
\let\@xp\expandafter
%    \end{macrocode}
%    \section{Indexing primitives}
%
%    Unlike \pkg{amsdtx}, \pkg{amsldoc} doesn't load the \pkg{doc}
%    package, so we need to provide the following logical names.  The
%    values are consistent with \fn{makeindex}'s default conventions.
%    \begin{macrocode}
%<*amsldoc>
\def\actualchar{@}
\def\quotechar{"}
\def\levelchar{!}
\def\encapchar{|}
\def\verbatimchar{+}
%    \end{macrocode}
%    We also need the \cs{ifcodeline@index} switch.
%    \begin{macrocode}
\newif\ifcodeline@index
%</amsldoc>
%    \end{macrocode}
%
%    \begin{macro}{\autoindex}
%    When generating a codeline index, this encapsulates the page
%    number in italics.
%    \begin{macrocode}
\newcommand*{\autoindex}[1]{%
    \index{#1\ifcodeline@index\encapchar usage\fi}%
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\ntt}
%    To avoid font substitution warnings we make the tt font always
%    print in the normal weight and shape.
%    \begin{macrocode}
\newcommand{\ntt}{\normalfont\ttfamily}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\indexcs}
%    Index a control sequence without printing it. Note
%    non-long. The \cs{@nobslash} strips off an optional leading
%    backslash before passing the control sequence name to
%    \cs{@indexcs}.  This means that |\indexcs{\cs}| and
%    |\indexcs{cs}| produce the same index entry.
%    \begin{macrocode}
\newcommand*{\indexcs}[1]{%
    \@xp\@xp\@xp\@indexcs\@xp\@nobslash\string#1\@nil
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@indexcs}
%    Given |cs| as an argument, this writes something like
%    |cs@\verb"*+\cs+| to the \fn{.idx} file (or |cs=\verb!*+\cs+| if
%    using \fn{doc.sty}).
%    \begin{macrocode}
\def\@indexcs#1\@nil{%
    \autoindex{#1\actualchar
        \string\verb\quotechar*\verbatimchar
            \@xp\@bothoftwo\string\ #1\@empty
        \verbatimchar
    }%
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@bothoftwo}
%    This has the effect of removing spaces before each of the
%    arguments.  In particular, it removes the space generated by
%    \verb*+\string\ + above.
%    \begin{macrocode}
\def\@bothoftwo#1#2{#1#2}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\category@index}
%    \begin{macrocode}
\def\category@index#1#2{%
    {\ntt#2}%
    \@category@index{#1}{#2}%
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\@category@index}
%    \begin{macrocode}
\def\@category@index#1#2{%
    \autoindex{%
        #2\actualchar\string\texttt{#2}%
        \ifx\@nil#1\@nil\else\space#1\fi
    }%
}
%    \end{macrocode}
%    \end{macro}
%
%    Some functions to support \cn{cn} etc. For most of these commands
%    we don't really want them to be \cs{long}! But in some early
%    releases of \LaTeXe\ the \verb'*' form of \cn{newcommand} was not
%    yet available.
%
%    We use the name \cn{bslchar} instead of \cn{bslash} to avoid
%    potential conflict with the \pkg{doc} package \cn{bslash} command.
%    Unlike \cn{bslash}, \cn{bslchar} survives unlimited
%    writing/expansion because it is a chardef.
%    \begin{macrocode}
\chardef\bslchar=`\\ % p. 424, TeXbook
\newcommand{\addbslash}{\expandafter\@addbslash\string}
\def\@addbslash#1{\bslchar\@nobslash#1}
\newcommand{\nobslash}{\expandafter\@nobslash\string}
\def\@nobslash#1{\ifnum`#1=\bslchar\else#1\fi}
%    \end{macrocode}
%
%  \begin{macro}{\@boxorbreak}
%    Start up for a \cn{cs} or \cn{cn} command, adds an \cs{hbox} if in
%    math, or an allowbreak penalty if the preceding item is not a space.
%    (In case two such commands are used side-by-side.)
%    \begin{macrocode}
\def\@boxorbreak{%
    \leavevmode
    \ifmmode\hbox\else\ifdim\lastskip=\z@\penalty9999 \fi\fi
}
%    \end{macrocode}
%  \end{macro}
%
%    Control sequence. The function \cn{addbslash} makes this command
%    also usable for some special control sequences like \cn{\%} \cn{\}}
%    \cn{\{}: instead of writing |\cs{%}| which doesn't work, you can
%    write |\cs{\%}|.
%    \begin{macrocode}
\DeclareRobustCommand{\cs}[1]{%
    \@boxorbreak{%
        \ntt
        \addbslash#1\@empty
        \@xp\@xp\@xp\@indexcs\@xp\@nobslash\string#1\@nil
    }%
}
%    \end{macrocode}
%
%    Allow distinguishing non-private `command names' that will be
%    visible to the user from internal (mostly private) `control
%    sequences'.
%    \begin{macrocode}
\let\cn\cs
%    \end{macrocode}
%
%    \begin{macro}{\embrace}
%    \begin{macrocode}
\DeclareTextSymbol{\lbracechar}{OT1}{123}
\DeclareTextSymbolDefault{\lbracechar}{OT1}
\DeclareTextSymbol{\rbracechar}{OT1}{125}
\DeclareTextSymbolDefault{\rbracechar}{OT1}

\providecommand{\embrace}[1]{%
  \begingroup \ntt\lbracechar#1\rbracechar\endgroup}
%    \end{macrocode}
%    \end{macro}
%
% One mandatory argument: cnm; two: cnmm; one optional and one
%    mandatory: cnom; throwing in a star: cnsom; and so on.
%    \begin{macrocode}
\providecommand{\cnbreak}{\penalty999\hskip0pt\relax}
\providecommand{\cnm}[2]{\cn{#1}\cnbreak\embrace{#2}}
\providecommand{\cnmm}[3]{\cn{#1}\cnbreak\embrace{#2}\cnbreak\embrace{#3}}
\providecommand{\cnom}[1]{\cn{#1}\cnbreak\ommitude}
\providecommand{\ommitude}[2][]{{\ntt[#1]}\cnbreak\embrace{#2}}
\providecommand{\cnmsm}[4]{%
  \cn{#1}\cnbreak\embrace{#2}\cnbreak *\embrace{#4}}
%    \end{macrocode}
%    The following items should not normally appear in math mode so they
%    don't need to call \cs{@boxorbreak}.
%
%    \latex/ documentclass name.
%    \begin{macrocode}
\DeclareRobustCommand{\cls}{\category@index{class}}
%    \end{macrocode}
%
%    \latex/ package name.
%    \begin{macrocode}
\DeclareRobustCommand{\pkg}{\category@index{package}}
%    \end{macrocode}
%
%    \latex/ option name.
%    \begin{macrocode}
\DeclareRobustCommand{\opt}{\category@index{option}}
%    \end{macrocode}
%
%    Environment name.
%    \begin{macrocode}
%<amsdtx>\DeclareRobustCommand{\env}[1]{{\ntt#1}\SpecialEnvIndex{#1}}
%<amsldoc>\DeclareRobustCommand{\env}{\category@index{environment}}
%    \end{macrocode}
%
%    File name.
%    \begin{macrocode}
\DeclareRobustCommand{\fn}{\category@index{}}
%    \end{macrocode}
%
%    \bibtex/ style.
%    \begin{macrocode}
\DeclareRobustCommand{\bst}{\category@index{\string\BibTeX{} style}}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareRobustCommand{\cnt}{\category@index{counter}}
\DeclareRobustCommand{\fnt}{\category@index{font}}
%    \end{macrocode}
%
%    With long command names or file names we sometimes prefer to allow
%    hyphenation in the tt font (in combination with suitable
%    \cn{hyphenation} statements for individual documents). To make this
%    work we must turn off the feature of \latex/ that disables the
%    hyphenchar of the tt fonts.
%
%    The method shown here depends on the assumption that OT1 encoding
%    will be used for the tt fonts. An encoding-independent method would
%    be more awkward: You'd have to explicitly load the relevant
%    fonts, let's say by using \cn{AtBeginDocument}, and undo the
%    hyphenchar change individually for each font.
%
%    Instead we force loading, or possibly reloading (depending on the
%    preload options used locally for creating the \latex/ format file),
%    of the \fn{OT1/cmtt} fd file, and then clear the macro
%    \cs{OT1+cmtt} which contains code to execute whenever a font of
%    this family is first loaded. The default value is to turn off the
%    hyphenchar, and that's what we don't want.
%
%    This method is not especially palatable but other methods that
%    don't involve loading the fd file are significantly less reliable.
%    \begin{macrocode}
\def\allowtthyphens{\begingroup
  \fontencoding{OT1}\fontfamily{cmtt}%
%    \end{macrocode}
%    Undefine the csname that \cs{try@load@fontshape} tests to determine
%    whether the fd file needs loading. Then call
%    \cs{try@load@fontshape}. Then we can remove the `turn off
%    hyphenation' code, which as it happens resides in the same csname
%    that was tested.
%    \begin{macrocode}
  \expandafter\let\csname OT1+cmtt\endcsname\relax
  \try@load@fontshape
  \endgroup
  \expandafter\let\csname OT1+cmtt\endcsname\@empty
}
%    \end{macrocode}
%
%    We allow some slop at the right margin because we have some
%    long control sequence names and verbatim text to deal with. Also
%    ignore underfull hboxes and vboxes unless they are really bad.
%    \begin{macrocode}
\hfuzz2pc
\vbadness9999 \hbadness5000
%    \end{macrocode}
%
%    \begin{macrocode}
\def\AmS{{\protect\usefont{OMS}{cmsy}{m}{n}%
  A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\latex/{{\protect\LaTeX}}
\def\amslatex/{{\protect\AmS-\protect\LaTeX}}
\def\tex/{{\protect\TeX}}
\def\amstex/{{\protect\AmS-\protect\TeX}}
\def\bibtex/{{Bib\protect\TeX}}
%    \end{macrocode}
%
%    \cn{makeindex} command is already used for other purposes.
%    \begin{macrocode}
\def\makeindx/{MakeIndex}
%    \end{macrocode}
%
%    Don't allow a break after the hyphen:
%    \begin{macrocode}
\def\xypic/{XY\mbox{-}pic}
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand{\Textures}{\textit{Textures}}
%    \end{macrocode}
%
%    `Meta' macro.
%    \begin{macrocode}
\def\<#1>{\textit{$\langle$#1\/$\rangle$}}
%    \end{macrocode}
%
%    Reduce itemsep in lists.
%    \begin{macrocode}
\def\@listi{%
  \leftmargin\leftmargini
  \topsep 3\p@ \@plus2\p@ \@minus\p@
  \parsep \p@ \@plus\p@ \itemsep\parsep
}
\let\@listI\@listi
\@listi
\def\@listii{%
  \leftmargin\leftmarginii
  \labelwidth\leftmarginii \advance\labelwidth-\labelsep
  \topsep\p@\@plus\p@ \@minus\p@
  \parsep\z@skip \itemsep\z@skip
}
\def\@listiii{%
  \leftmargin\leftmarginiii
  \labelwidth\leftmarginiii \advance\labelwidth-\labelsep
  \topsep\z@skip \parsep\z@skip \itemsep\z@skip
}
%    \end{macrocode}
%
%    An environment to encapsulate remarks relevant to old versions but
%    not essential for the current version.
%    \begin{macrocode}
\newenvironment{histnote}{%
  \trivlist\item[\hspace{\labelsep}\bfseries Historical Note:]%
}{%
  \endtrivlist
}
%    \end{macrocode}
%
%    Turn off \cs{autoindex} during \cn{tableofcontents} or similar.
%    \begin{macrocode}
\def\@starttoc#1{\begingroup
  \let\autoindex\@gobble
  \makeatletter
  \@input{\jobname.#1}\if@filesw
  \expandafter\newwrite\csname tf@#1\endcsname
             \immediate\openout
                 \csname tf@#1\endcsname \jobname.#1\relax
  \fi \global\@nobreakfalse \endgroup}
%    \end{macrocode}
%
%    Make glossary commands a no-op for the moment. [mjd,1994/10/03]
%    Provide a \cn{secref} command for section references.
%    \begin{macrocode}
%<*amsldoc>
\newcommand{\gloss}[1]{}
%</amsldoc>
\newcommand*{\secref}[1]{\S\ref{#1}}
%    \end{macrocode}
%
%    We can write |\qc{\%}| to quote a single
%    character in situations where |\verb"%"| would not work, mainly
%    when text is read as a macro argument (e.g., footnotes).
%    \begin{macrocode}
\newcommand{\qc}[1]{}% check for prior definition
\edef\qc#1{\noexpand\protect\expandafter\noexpand\csname qc \endcsname
  \noexpand\protect#1}
%    \end{macrocode}
%    For this function the first argument is \cn{protect} and just needs
%    to be discarded. The method for removing a leading backslash is to
%    turn off \cs{escapechar}; this is more forgiving of variations like
%    |\qc{$}|. If the argument is `|\ |' we print a cmtt visible-space
%    character, \qc{\ }.
%    \begin{macrocode}
\@namedef{qc }#1#2{\begingroup\ntt
  \ifx\ #2\char`\ \else\escapechar\m@ne\string#2\fi\endgroup}
%    \end{macrocode}
%    Declare a few character names to avoid e.g., indexing difficulties.
%    \begin{macrocode}
\DeclareRobustCommand{\qcat}{\qc\@}%
\DeclareRobustCommand{\qcamp}{\qc\&}%
\DeclareRobustCommand{\qcbang}{\qc\!}%
%    \end{macrocode}
%
%  \begin{macro}{\arg}
%    Change \cn{arg} to print a macro argument number:
%    \begin{macrocode}
\DeclareRobustCommand{\arg}[1]{{\ntt\##1}}
%    \end{macrocode}
%  \end{macro}
%
%    We need to emulate the \pkg{amsthm} \cn{qedsymbol} for the
%    \amslatex/ user's guide.
%    \begin{macrocode}
%<*amsldoc>
\newcommand{\openbox}{\leavevmode
  \hbox to.77778em{%
  \hfil\vrule
  \vbox to.675em{\hrule width.6em\vfil\hrule}%
  \vrule\hfil}}
\newcommand{\qedsymbol}{\openbox}
%</amsldoc>
%    \end{macrocode}
%
%    Logical markup for e-mail address:
%    \begin{macrocode}
%<amsldoc>\def\mail{\texttt}
%    \end{macrocode}
%
%    Shorthand for indexing:
%    \begin{macrocode}
%<*amsldoc>
\def\*#1{\def\@tempa{#1}\def\@tempb{*}%
  \ifx\@tempa\@tempb \expandafter\index
  \else #1\index{#1}\fi}
%</amsldoc>
%    \end{macrocode}
%
%    Non-indexed \cn{cn} (maybe call this |\cn*|?)
%    \begin{macrocode}
\def\ncn#1{{\let\index\@gobble\cn{#1}}}
%    \end{macrocode}
%    Indexing difficulties with !, @.
%    \begin{macrocode}

\DeclareRobustCommand{\cnbang}{%
  \ncn{\!}\index{"!@{\ntt\bslchar\qcbang}}}
\DeclareRobustCommand{\cnat}{%
  \ncn{\!}\index{"@@{\ntt\bslchar\qcat}}}
%    \end{macrocode}
%
%    Shorthand for a discouraged, but not forbidden, line break:
%    \begin{macrocode}
\def\5{\penalty500 }
%    \end{macrocode}
%
%    Environment for error message examples. Use \cs{meaning} to allow
%    reading the error message text as an ordinary brace-delimited arg
%    but still be able to print embedded braces; and first change the
%    backslash catcode to prevent extra spaces after control words.
%    \begin{macrocode}
%<*amsldoc>
\newenvironment{error}{%
  \begingroup\catcode`\\=12 \expandafter\endgroup\errora
}{%
  \endtrivlist
}
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand{\errora}[1]{%
  \trivlist
  \item[\hskip\labelsep\errorbullet\enspace
    \ntt\frenchspacing\def\@tempa{#1}%
    \expandafter\strip@prefix\meaning\@tempa]\leavevmode\par
}
%    \end{macrocode}
%    \cs{errorbullet} is just an attempt at a simple graphic device that
%    doesn't require any special fonts.
%    \begin{macrocode}
\newcommand{\errorbullet}{\rule[-.5pt]{2.5pt}{7.5pt}%
  \rule[-.5pt]{5pt}{2.5pt}\kern-2.5pt%
  \rule[4.5pt]{2.5pt}{2.5pt}}
%</amsldoc>
%    \end{macrocode}
%    A couple of subheading commands:
%    \begin{macrocode}
\newcommand{\errexa}{\par\noindent\textit{Example}:\ }
\newcommand{\errexpl}{\par\noindent\textit{Explanation}:\ }
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{\cls{amsldoc} style modifications for sectioning commands}
%    The following section deals with book commands (part, chapter,
%    frontmatter, \dots).
%    \begin{macrocode}
%<*amsldoc>
%    \end{macrocode}
%
%    Modifications of sectioning commands from \fn{book.cls}, mostly
%    reducing font sizes and vertical spacing.
%    \begin{macrocode}
\renewcommand\frontmatter{\clearpage
            \@mainmatterfalse\pagenumbering{roman}}
\renewcommand\mainmatter{\clearpage
       \@mainmattertrue\pagenumbering{arabic}}
\renewcommand\backmatter{\clearpage \@mainmatterfalse}
%    \end{macrocode}
%
%    \begin{macrocode}
\renewcommand\part{\clearpage
                 \thispagestyle{plain}%
                 \if@twocolumn
                     \onecolumn
                     \@tempswatrue
                   \else
                     \@tempswafalse
                 \fi
                 \hbox{}\vfil
                 \secdef\@part\@spart}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    \markboth{}{}%
    {\centering
     \interlinepenalty \@M
     \reset@font
     \ifnum \c@secnumdepth >-2\relax
       \Large\bfseries \partname~\thepart
       \par
       \vskip 20\p@
     \fi
     \Large \bfseries #2\par}%
    \@endpart}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@spart#1{%
    {\centering
     \interlinepenalty \@M
     \reset@font
     \Large \bfseries #1\par}%
    \@endpart}
\def\@endpart{\vfil\newpage
              \if@twoside
                \hbox{}%
                \thispagestyle{empty}%
                \newpage
              \fi
              \if@tempswa
                \twocolumn
              \fi}
%</amsldoc>
%    \end{macrocode}
%
%    \begin{macrocode}
\renewcommand\chapter{\par \@afterindentfalse
                    \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                       \if@mainmatter
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\protect\numberline{\thechapter}#1}%
                       \else
                         \addcontentsline{toc}{chapter}{#1}\fi
                    \else
                      \addcontentsline{toc}{chapter}{#1}
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@makechapterhead#1{%
  \vspace{1.5\baselineskip}%
  {\parindent \z@ \raggedright \reset@font
    \ifnum \c@secnumdepth >\m@ne
      \large\bfseries \@chapapp\space\thechapter
      \par\nobreak
      \vskip.5\baselineskip\relax
    \fi
    #1\par\nobreak
    \vskip\baselineskip
  }}
\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}%
                   \@afterheading
                 \fi}
\def\@makeschapterhead#1{%
  \vspace*{1.5\baselineskip}%
  {\parindent \z@ \raggedright
    \reset@font
    \large \bfseries  #1\par\nobreak
    \vskip\baselineskip
  }}
%    \end{macrocode}
%
%    Add Donald Arseneau's \cs{@removefromreset}; used to decouple the
%    footnote counter from \cn{chapter}, since chapters here do not
%    automatically start on a new page.  [bnb, 1999/09/27]
%  \begin{verbatim}
%    \@removefromreset{FOO}{BAR} : Removes counter FOO from the list of
%                       counters \cl@BAR to be reset when counter BAR
%                       is stepped.  The opposite of \@addtoreset.
%  \end{verbatim}
%    \begin{macrocode}
\def\@removefromreset#1#2{\let\@tempb\@elt
   \expandafter\let\expandafter\@tempa\csname c@#1\endcsname
   \def\@elt##1{\expandafter\ifx\csname c@##1\endcsname\@tempa\else
         \noexpand\@elt{##1}\fi}%
   \expandafter\edef\csname cl@#2\endcsname{\csname cl@#2\endcsname}%
   \let\@elt\@tempb}
\@removefromreset{footnote}{chapter}
%    \end{macrocode}
%
%    Change running head font to \cn{footnotesize}, nonslanted.
%    \begin{macrocode}
\def\ps@headings{%
  \let\@oddfoot\@empty\let\@evenfoot\@empty
  \def\@evenhead{\thepage\hfil{\footnotesize\leftmark{}{}}}%
  \def\@oddhead{{\footnotesize\rightmark{}{}}\hfil\thepage}%
  \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markboth {\uppercase{\ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        \@chapapp\ \thechapter. \ \fi
      \fi
        ##1}}{}}%
  \def\sectionmark##1{%
    \markright {\uppercase{\ifnum \c@secnumdepth >\z@
        \thesection. \ \fi
        ##1}}}}
%    \end{macrocode}
%
%
% \section{\cls{amsdtx} style modifications for sectioning commands}
%    These definitions for \cn{maketitle} are from \fn{article.cls}.
%    \begin{macrocode}
%<*amsdtx>
\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\fnsymbol{footnote}}%
    \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \let\thanks\relax
  \let\maketitle\relax\let\@maketitle\relax
  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}}
%
\def\@maketitle{%
  \newpage
  \null
  \vskip 2em%
  \begin{center}%
    {\LARGE \@title \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\large \@date}%
  \end{center}%
  \par
%    \end{macrocode}
%    Put the title into both running heads.
%    \begin{macrocode}
  \uppercase\expandafter{\expandafter\toks@\expandafter{\@title}}%
  \edef\@tempa{\noexpand\markboth{\the\toks@}{\the\toks@}}%
  \@tempa
  \vskip 1.5em}
%</amsdtx>
%    \end{macrocode}
%
%    Edit the table of contents.
%    \begin{macrocode}
%<*amsdtx>
\renewcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \subsection*{\contentsname}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }
%</amsdtx>
%    \end{macrocode}
%
%    Edit the sectioning commands.
%    \begin{macrocode}
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-.6\baselineskip \@plus -3\p@}%
                                   {.4\baselineskip}
%<amsdtx>                          {\reset@font\Large\bfseries}}
%<amsldoc>                         {\reset@font\normalsize\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-.3\baselineskip\@plus -2\p@}%
                                     {.2\baselineskip}%
%<amsdtx>                          {\reset@font\large\bfseries}}
%<amsldoc>                         {\reset@font\normalsize\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-.2\baselineskip\@plus -2\p@}%
                                     {.2\baselineskip}%
                                     {\reset@font\normalsize\bfseries}}
%    \end{macrocode}
%    Change index environment to turn off \cn{autoindex}.
%    \begin{macrocode}
\renewenvironment{theindex}{%
  \if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi
  \columnseprule \z@ \columnsep 35\p@
  \let\autoindex\@gobble
%<amsdtx>  \twocolumn[\section*{\indexname}]%
%<amsldoc>  \twocolumn[\@makeschapterhead{\indexname}]%
  \addcontentsline{toc}{chapter}{\indexname}%
  \@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}%
  \thispagestyle{plain}\parindent\z@
  \parskip\z@ \@plus .3\p@\relax
  \let\item\@idxitem
}{%
  \if@restonecol\onecolumn\else\clearpage\fi
}
%    \end{macrocode}
%
%    Take out \cn{thechapter} from \cn{thesection}.
%    \begin{macrocode}
%<amsdtx>\renewcommand{\thesection}{\arabic{section}}
%    \end{macrocode}
%
%    Change the style of captions slightly. Also incorporate some
%    caption improvements from Donald Arseneau (\fn{comp.text.tex}, 11
%    Oct 1994).
%    \begin{macrocode}
\long\def\@makecaption#1#2{%
  \addvspace\abovecaptionskip
  \begingroup
    \countdef\@parcycles=8 % local count register
    \@parcycles\z@
    \@setpar{\advance\@parcycles\@ne \ifnum\@parcycles>999
      \@@par\@parcycles\z@\fi
      \ifhmode \unskip\hskip\parfillskip\penalty-\@M\fi}%
    \@hangfrom{\textbf{#1.} }\vadjust{\penalty\m@ne}#2%
  \endgroup
  \ifhmode\unpenalty\fi\par
  \ifnum\lastpenalty=\m@ne % only one line in the caption
    \unpenalty \setbox\@tempboxa\lastbox
    \nointerlineskip
    \hbox to\hsize{\hfill\unhbox\@tempboxa\unskip\hfill}%
  \fi
  \nobreak\vskip\belowcaptionskip
}
%    \end{macrocode}
%    For table captions, assume top captions and so put space below the
%    caption rather than above:
%    \begin{macrocode}
\renewenvironment{table}{%
  \belowcaptionskip\abovecaptionskip \abovecaptionskip\z@skip
  \@float{table}%
}{%
  \end@float
}
\renewenvironment{table*}{%
  \belowcaptionskip\abovecaptionskip \abovecaptionskip\z@skip
  \@dblfloat{table}%
}{%
  \end@dblfloat
}
%    \end{macrocode}
%
% \section{Float placement parameters}
%    These control the placing of floating objects like tables and
%    figures. The values here, which are much more tolerant than the
%    \latex/ defaults, are more or less copied from \fn{amsclass.dtx}.
%    \begin{macrocode}
\setcounter{topnumber}{4}\setcounter{bottomnumber}{4}
\setcounter{totalnumber}{4}\setcounter{dbltopnumber}{4}
\renewcommand{\topfraction}{.97}\renewcommand{\bottomfraction}{.97}
\renewcommand{\textfraction}{.03}\renewcommand{\floatpagefraction}{.9}
\renewcommand{\dbltopfraction}{.97}
\renewcommand{\dblfloatpagefraction}{.9}
\setlength{\floatsep}{8pt plus6pt}
\setlength{\textfloatsep}{10pt plus8pt}
\setlength{\intextsep}{8pt plus6pt}
\setlength{\dblfloatsep}{8pt plus6pt}
\setlength{\dbltextfloatsep}{10pt plus8pt}
\setlength{\@fptop}{0pt}\setlength{\@fpsep}{8pt}%
\setlength{\@fpbot}{0pt plus 1fil}
\setlength{\@dblfptop}{0pt}\setlength{\@dblfpsep}{8pt}%
\setlength{\@dblfpbot}{0pt plus 1fil}
%    \end{macrocode}

%    \begin{macrocode}
\pagestyle{headings}
%    \end{macrocode}
%
%    Make \verb"|...|" shorthand for verbatim fragments. In the case of
%    the \cls{amsldoc} class, we avoid requiring an extra package
%    (\pkg{doc} or \pkg{shortvrb}), to reduce the possibility of package
%    files not being found at run time.
%    \begin{macrocode}
%<*amsldoc>
\AtBeginDocument{\catcode`\|=\active }
\def\activevert{\verb|}
\expandafter\gdef\expandafter\dospecials\expandafter
  {\dospecials \do\|}%
\expandafter\gdef\expandafter\@sanitize\expandafter
  {\@sanitize \@makeother\|}
\begingroup\catcode`\|=\active \gdef|{\protect\activevert{}}\endgroup
%</amsldoc>
%    \end{macrocode}
%
%  \begin{macro}{\arrayargpatch}
%    If the column-specs arg of array or tabular contains a vert bar
%    character, and we have made vert bars active, it will cause
%    trouble. The following command, used in the ctab environment,
%    prevents the trouble.
%    \begin{macrocode}
\newcommand{\arrayargpatch}{%
  \let\@oldarray\@array
  \edef\@array[##1]##2{\catcode\number`\|=\number\catcode`\|
    \catcode\number`\@=\number\catcode`\@ \relax
    \let\noexpand\@array\noexpand\@oldarray
    \noexpand\@array[##1]{##2}}%
  \catcode`\|=12 \catcode`\@=12 \relax
}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{environment}{ctab}
%    An environment for centered tables.
%    \begin{macrocode}
\newenvironment{ctab}{%
  \par\topsep\medskipamount
  \trivlist\centering
  \item[]%
  \arrayargpatch
  \begin{tabular}%
}{%
  \end{tabular}%
  \endtrivlist
}
%    \end{macrocode}
%  \end{environment}
%
%    Load \pkg{doc} package, reset \cn{AltMacroFont} to be the same as
%    \cn{MacroFont} (when there are large sections of conditional
%    code I think it looks better not to have it all slanted).
%    \begin{macrocode}
%<*amsdtx>
\RequirePackage{doc}
\def\AltMacroFont{\MacroFont}
%    \end{macrocode}
%
%    \begin{macro}{\SpecialMainEnvIndex}
%    Override \fn{doc.sty}'s main environment indexing to get rid of
%    the parens around ``environment'', for compatibility with our
%    \cs{env} command.
%    \begin{macrocode}
\def\SpecialMainEnvIndex#1{%
    \@bsphack
    \special@index{%
        #1\actualchar\string\texttt{#1} environment\encapchar main%
    }%
    \special@index{%
        environments:\levelchar#1%
        \actualchar\string\texttt{#1}%
        \encapchar main}%
    \@esphack
}
%    \end{macrocode}
%    \end{macro}
%
% \begin{macro}{\SpecialEnvIndex}
%    \begin{macrocode}
\def\SpecialEnvIndex#1{%
    \@bsphack
    \index{#1\actualchar\string\texttt{#1} environment\encapchar usage}%
    \index{%
        environments:\levelchar#1%
        \actualchar\string\texttt{#1}%
        \encapchar usage}%
    \@esphack
}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macro}{\DescribeOption}
%    \begin{macrocode}
\def\DescribeOption{%
    \leavevmode
    \@bsphack
    \begingroup
        \MakePrivateLetters
    \Describe@Option
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\Describe@Option}
%    \begin{macrocode}
\def\Describe@Option#1{%
    \endgroup
    \marginpar{\raggedleft\PrintDescribeOption{#1}}%
    \SpecialOptionIndex{#1}%
    \@esphack
    \ignorespaces
}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\PrintDescribeOption}
%    \begin{macrocode}
\def\PrintDescribeOption#1{\strut \MacroFont #1\ }
%    \end{macrocode}
%    \end{macro}
%
% \begin{macro}{\option}
%    \begin{macrocode}
\def\option{%
    \let\SpecialMainEnvIndex\SpecialMainOptionIndex
\begingroup
   \catcode`\\12
   \MakePrivateLetters \m@cro@ \iffalse}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macro}{\SpecialMainOptionIndex}
%    \begin{macrocode}
\def\SpecialMainOptionIndex#1{%
    \@bsphack
    \special@index{#1\actualchar\string\texttt{#1} option\encapchar main}%
    \@esphack
}
%    \end{macrocode}
%    \end{macro}
%
% \begin{macro}{\SpecialOptionIndex}
%    \begin{macrocode}
\def\SpecialOptionIndex{\@category@index{option}}
%    \end{macrocode}
% \end{macro}
%
%    Ordinary \cn{DocInput} doesn't handle standardized file headers
%    unless you enclose them in \cs{iffalse} \dots\ \cs{fi} which I
%    don't care to do. So instead here's an alternate version of
%    \cn{DocInput}, called \cn{hDocInput}.
%    \begin{macrocode}
\def\hDocInput#1{\MakePercentIgnore
  \begingroup
%    \end{macrocode}
%    Define active \qc{\@} which should be the first non-percent,
%    non-equal-sign character when a file header is present. (If a file
%    header is not present, \cn{hDocInput} should not be used.)
%    \begin{macrocode}
  \begingroup \lccode`\~=`\@
  \lowercase{\endgroup\long\def ~}##1##{%
    \catcode`\==12 \skipfileheader{##1}}%
  \catcode`\@=\active \catcode`\==14 % comment
  \def\filename{#1}%
  \@@input#1 \MakePercentComment}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\skipfileheader#1#2 {\endgroup
  \hGetFileInfo#2 version = "??" date = "??"\@nil
  \begingroup\catcode`\==9 \catcode`\ =9 \futurelet\0\endgroup
}
%    \end{macrocode}
%
%    \begin{macrocode}
\long\def\hGetFileInfo#1 version = "#2"#3 date = "#4"#5\@nil{%
  \def\fileversion{#2}\def\filedate{#4}}
%</amsdtx>
%    \end{macrocode}
%
%
%    \section{Hyphenation exceptions}
%
%    \begin{macrocode}
\hyphenation{base-line-skip}
%    \end{macrocode}
%
%    \section{Index exceptions}
%
%    A bunch of stuff we don't want in code indexes:
%    \begin{macrocode}
%<*amsdtx>
\DoNotIndex{\@xp,\@nx,\@empty,\newcommand,\renewcommand}
\DoNotIndex{\newenvironment,\renewenvironment,\providecommand}
\DoNotIndex{\if,\fi,\ifnum,\fi,\@let@token,\futurelet,\fsa@n}
\DoNotIndex{\ignorespaces,\@tempcnta,\@tempcntb,\count@}
\DoNotIndex{\toks@,\@ne,\advance}
\DoNotIndex{\!,\/,\?,\@,\^,\_}
\DoNotIndex{\@@par,\@M,\@auxout,\@bsphack,\@esphack,\@depth,\@ehc}
\DoNotIndex{\@for,\@flushglue,\@gobble,\@gobbletwo,\@height,\@idxitem}
\DoNotIndex{\@ifnextchar,\@ifstar,\@ifundefined,\@input,\@latexerr}
\DoNotIndex{\@makeschapterhead,\@namedef,\@nameuse,\@nil}
\DoNotIndex{\@nobreakfalse,\@restonecolfalse,\@restonecoltrue}
\DoNotIndex{\@tempa,\@tempb,\@tempc,\@tempf}
\DoNotIndex{\@temptokena,\@temptokenb}
\DoNotIndex{\@themark,\@width}
\DoNotIndex{\active,\aindex,\baselineskip,\begin,\begingroup,\box}
\DoNotIndex{\c@page,\catcode,\chapter,\char,\chardef,\closeout}
\DoNotIndex{\CodelineIndex,\sp,\sb,\label,\leavevmode,\mark}
\DoNotIndex{\mark,\newinsert,\newwrite,\newtoks,\xdef}
\DoNotIndex{\columnsep,\columnseprule,\columnwidth,\csname,\def}
\DoNotIndex{\dimen,\do,\DocInput,\documentstyle,\edef,\em}
\DoNotIndex{\EnableCrossrefs,\end,\endcsname,\endgroup,\endinput}
\DoNotIndex{\everypar,\expandafter,\filedate,\fileversion}
\DoNotIndex{\footnotesize,\gdef,\global,\glossary,\hangindent}
\DoNotIndex{\if@filesw,\else,\fi}
\DoNotIndex{\if@nobreak,\if@twocolumn,\if@twoside,\fi,\fi,\fi}
\DoNotIndex{\hsize,\hskip}
\DoNotIndex{\ifhmode,\ifmmode,\ifodd,\ifvmode,\ifx,\fi,\fi,\fi,\fi,\fi}
\DoNotIndex{\ifcase,\ifdim,\ifeof,\iffalse,\iftrue,\fi,\fi,\fi,\fi,\fi}
\DoNotIndex{\ifcat,\fi}
\DoNotIndex{\immediate,\insert,\item,\jobname,\long}
\DoNotIndex{\let,\lineskip,\marginparsep,\marginparwidth,\maxdimen}
\DoNotIndex{\makeatletter,\noexpand,\openout,\protect,\rlap}
\DoNotIndex{\min,\newpage,\nobreak,\normalbaselineskip}
\DoNotIndex{\normallineskip,\p@,\par,\parfillskip,\parindent,\parskip}
\DoNotIndex{\penalty,\relax,\section,\sin,\sloppy,\space,\string}
\DoNotIndex{\tableofcontents,\the,\thepage,\thispagestyle,\toks,\tt}
\DoNotIndex{\twocolumn,\uppercase,\vbox,\vrule,\vskip,\vss}
\DoNotIndex{\write,\z@,\z@skip}
%</amsdtx>
%    \end{macrocode}
%
%    The usual \cs{endinput} to ensure that random garbage at the end of
%    the file doesn't get copied by \fn{docstrip}.
%    \begin{macrocode}
\endinput
%    \end{macrocode}
%
% \changes{v1.2b}{1995/02/15}{Added {}{} after rightmark, leftmark to
%   handle no-maketitle case}
% \changes{v1.2b}{1995/02/15}{Added frenchspacing in error env heading}
%
% \changes{v1.2c}{1996/10/28}{Update version number, date for new release}
%
% \changes{v1.2d}{1997/03/13}{Fixed up loading method for OT1cmtt fd file}
%
% \changes{v2.03}{2004/04/06}{Reworked indexing commands for
%    compatibility with doc.sty}
%
% \changes{v2.04}{2004/04/07}{Further work on indexing commands for
% compatibility with macro and environment environments in \fn{doc.sty}.
% Also added \env{option} environment, \cs{DescribeOption},
% \cs{PrintDescribeOption}, \cs{SpecialOptionIndex}, and
% \cs{SpecialMainOptionIndex}.}
%
% \changes{v2.05}{2004/04/27}{Fixed the amsdtx \cs{env} so that it
% prints its argument in addition to putting it in the index.  Added
% |\penalty\exhyphenpenalty| to \cs{mdash} and \cs{ndash} as per
% \pkg{textcmds}.}
%
% \CheckSum{1569}
% \Finale