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
|
*** amsfndoc.def.org 2009-02-22 20:46:31.000000000 +0100
--- amsfndoc.def 2013-02-14 15:43:14.549616359 +0100
***************
*** 49,54 ****
--- 49,104 ----
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+ % Additions of latex-tds
+
+ \input ltxcmds.sty\relax
+ \input infwarerr.sty\relax
+ \input ifpdf.sty\relax
+
+ \ifpdf
+ \else
+ \@PackageError{\jobname}{pdfTeX in PDF mode is required}\@ehd
+ \endgroup
+ \csname @@end\expandafter\endcsname
+ \fi
+
+ \def\MakeDest#1{%
+ \begingroup
+ \begingroup
+ \let\relax\ltx@empty
+ \edef\x{\endgroup
+ \edef\noexpand\@tmp{#1\ltx@empty}%
+ }%
+ \x
+ \ltx@IfUndefined{dest@\@tmp}{%
+ \pdfdest name{\@tmp}xyz\relax
+ \immediate\write16{* dest: [\@tmp]}%
+ \global\expandafter\let\csname dest@\@tmp\endcsname\ltx@empty
+ }{%
+ \@PackageError{\jobname}{%
+ Destination `\@tmp' is already defined%
+ }\@ehc
+ }%
+ \endgroup
+ }
+ \def\MakeLinkAux#1#2#3{%
+ \leavevmode
+ \pdfstartlink attr{/F 4/Border[0 0 0]}goto name{#1}\relax
+ \pdfcolorstack0 push{#3}\relax
+ {#2}%
+ \pdfcolorstack0 pop\relax
+ \pdfendlink
+ }
+ \def\MakeLink#1#2{%
+ \MakeLinkAux{#1}{#2}{1 0 0 rg 1 0 0 RG}%
+ }
+
+ \def\Cite[#1]{%
+ [\MakeLinkAux{bib.#1}{#1}{0 .8 0 rg 0 .8 0 RG}]%
+ }
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
% Utility registers and definitions
% Test registers for transient use; paired - internal/external
***************
*** 428,434 ****
\let\DoHrule=\mthrule
\newbox\maintitlebox
! \def\maintitle #1\\#2<{\vfil\eject
\vbox{\rightskip=0pt plus 1fil\leftskip=\rightskip
\parindent=0pt\parfillskip=0pt\bf#1\par
}%
--- 478,484 ----
\let\DoHrule=\mthrule
\newbox\maintitlebox
! \def\OriginalMaintitle #1\\#2<{\vfil\eject
\vbox{\rightskip=0pt plus 1fil\leftskip=\rightskip
\parindent=0pt\parfillskip=0pt\bf#1\par
}%
***************
*** 437,442 ****
--- 487,498 ----
\else\vskip3pt\centerline{#2}\fi
\medskip\SetupFirstPar }
+ \def\maintitle #1\\{%
+ \pdfinfo{/Title(#1)}%
+ \global\let\maintitle\OriginalMaintitle
+ }
+
+ \pdfinfo{/Author(AMS)}
% First-paragraph formatting
***************
*** 465,477 ****
\def\section#1#2\par{%
\penalty-20
\vskip\AboveTitleSkip
{\raggedcenter
{\smc\noindent\ignorespaces\if!#1!\else#1. \fi
\ifFigure\rm\fi\ignorespaces
#2\unskip}\strutt
\ifFigure \global\Figurefalse
\else
! \tocwrites\tocsection{#1}{#2}%
\ifAppendix
\else \toks0{\rhsection{#1}{#2}}\mark{\the\toks0}%
\fi
--- 521,534 ----
\def\section#1#2\par{%
\penalty-20
\vskip\AboveTitleSkip
+ \MakeDest{section.#1}%
{\raggedcenter
{\smc\noindent\ignorespaces\if!#1!\else#1. \fi
\ifFigure\rm\fi\ignorespaces
#2\unskip}\strutt
\ifFigure \global\Figurefalse
\else
! \tocwrites\tocsection{section.#1}{#1}{#2}%
\ifAppendix
\else \toks0{\rhsection{#1}{#2}}\mark{\the\toks0}%
\fi
***************
*** 493,503 ****
\def\auxwriteb{\write\auxfile}
\long\def\gobbletwo#1#2{}
! \long\def\gobblethree#1#2#3{}
! \def\tocwrite#1#2#3{%
\begingroup
! \def\temp{{#2}{#3}}\edef\temp{\mmeaning\temp}%
\edef\tempb{\noexpand\auxwrite{%
\string#1\temp{\noexpand\the\pageno}}}%
\tempb
--- 550,560 ----
\def\auxwriteb{\write\auxfile}
\long\def\gobbletwo#1#2{}
! \long\def\gobblefour#1#2#3#4{}
! \def\tocwrite#1#2#3#4{%
\begingroup
! \def\temp{{#2}{#3}{#4}}\edef\temp{\mmeaning\temp}%
\edef\tempb{\noexpand\auxwrite{%
\string#1\temp{\noexpand\the\pageno}}}%
\tempb
***************
*** 508,518 ****
\def\tocwritea{\tocwrite}
\newif\ifAppendix
! \def\appendix#1#2{\maintitle Appendix #1\break #2\\<
! \mark{Appendix #1.\enspace#2}\tocwritea\tocappendix{#1}{#2}%
\gdef\theappendix{#1}%
% Now \section should no longer go into the table of contents.
! \let\tocwrites\gobblethree
% And forget the running head on the first page of an appendix.
\global\ThisIsFirstPagetrue \Appendixtrue
\InstSec=0 \relax }
--- 565,577 ----
\def\tocwritea{\tocwrite}
\newif\ifAppendix
! \def\appendix#1#2{%
! \MakeDest{appendix.#1}%
! \maintitle Appendix #1\break #2\\<
! \mark{Appendix #1.\enspace#2}\tocwritea\tocappendix{appendix.#1}{#1}{#2}%
\gdef\theappendix{#1}%
% Now \section should no longer go into the table of contents.
! \let\tocwrites\gobblefour
% And forget the running head on the first page of an appendix.
\global\ThisIsFirstPagetrue \Appendixtrue
\InstSec=0 \relax }
***************
*** 535,541 ****
\def\endReferences{\par\endgroup}
! \def\bibitem [#1] {\noindent\kern-\leftskip
\hbox to\leftskip{[#1]\hfil}\ignorespaces}
\def\bysame{\hbox to 3em{\leaders\hrule\hfill}\thinspace, }
--- 594,602 ----
\def\endReferences{\par\endgroup}
! \def\bibitem [#1] {%
! \MakeDest{bib.#1}%
! \noindent\kern-\leftskip
\hbox to\leftskip{[#1]\hfil}\ignorespaces}
\def\bysame{\hbox to 3em{\leaders\hrule\hfill}\thinspace, }
***************
*** 543,557 ****
% Note that, since \raggedbottom is turned on, there is already an
% implied 60pt (= 5\baselineskip) margin allowed, so the penalty
% should not be overly attractive.
! \def\subsection#1#2\par{\ifFirstPar \nobreak
\else \vskip\z@ plus 4\baselineskip \penalty-10
\vskip\z@ plus-4\baselineskip \vskip 8pt \vskip\parskip \fi
{\raggedright\hyphenpenalty=10000 \exhyphenpenalty=10000
! \noindent\bf#1. \ignorespaces#2\endgraf}\nobreak \vskip 4pt\relax
\SetupFirstPar }
\def\Contents{%
\subsection{\gobble}Contents of this document\par
\begingroup
\parfillskip=\normalparindent \parindent=\normalparindent
--- 604,645 ----
% Note that, since \raggedbottom is turned on, there is already an
% implied 60pt (= 5\baselineskip) margin allowed, so the penalty
% should not be overly attractive.
! \def\subsection#1#2\par{%
! \def\@tmps{#1}%
! \ifx\@tmps\macrogobble
! \MakeDest{section.contents}%
! \else
! \MakeDest{subsection.#1}%
! \fi
! \ifFirstPar \nobreak
\else \vskip\z@ plus 4\baselineskip \penalty-10
\vskip\z@ plus-4\baselineskip \vskip 8pt \vskip\parskip \fi
{\raggedright\hyphenpenalty=10000 \exhyphenpenalty=10000
! \noindent
! \ifx\@tmps\macrogobble
! \else
! \tocwrite\tocsub{subsection.#1}{#1}{#2}%
! \fi
! \bf#1. \ignorespaces#2\endgraf}\nobreak \vskip 4pt\relax
\SetupFirstPar }
+ \def\macrogobble{\gobble}
+
+ \def\tocsub#1#2#3#4{}%
+
+ \def\Outline#1#2{%
+ \begingroup
+ \def\LaTeX##1{LaTeX##1}%
+ \def\TeX##1{TeX##1}%
+ \def\AmSTeX##1{AmS-TeX##1}%
+ \pdfoutline goto name{#1}count0{\romannumeral-`\@#2}\relax
+ \endgroup
+ }
+
+ \pdfcatalog{/PageMode/UseOutlines}
\def\Contents{%
+ \Outline{section.contents}{Table of contents}%
\subsection{\gobble}Contents of this document\par
\begingroup
\parfillskip=\normalparindent \parindent=\normalparindent
***************
*** 560,572 ****
\par\endgroup
}
! \def\tocsection#1#2#3{%
\par \global\NoTocfalse
\begingroup \hangindent\parindent\indent
! \if!#1!\else#1. \fi#2\dotsfill\ #3\endgraf
\endgroup}
! \def\tocappendix#1{\tocsection{Appendix #1}}
% Define address blocks and other structures that use \obeylines
% in the context \tag ...<
--- 648,666 ----
\par\endgroup
}
! \def\tocsection#1#2#3#4{%
! \Outline{#1}{%
! \if!#2!\else#2. \fi#3%
! }%
\par \global\NoTocfalse
\begingroup \hangindent\parindent\indent
! \MakeLink{#1}{%
! \if!#2!\else#2. \fi#3\dotsfill\ #4%
! }%
! \endgraf
\endgroup}
! \def\tocappendix#1#2{\tocsection{#1}{Appendix #2}}
% Define address blocks and other structures that use \obeylines
% in the context \tag ...<
***************
*** 827,833 ****
\ifx\InstName\relax % then we are doing only the installation instructions.
\NoTocfalse % don't complain about the absence of TOC
! \let\tocwrite\gobblethree
\else
% Make sure there is an auxfile.
\openin\auxfile=\jobname.aux \relax
--- 921,927 ----
\ifx\InstName\relax % then we are doing only the installation instructions.
\NoTocfalse % don't complain about the absence of TOC
! \let\tocwrite\gobblefour
\else
% Make sure there is an auxfile.
\openin\auxfile=\jobname.aux \relax
***************
*** 843,849 ****
\ifx\InstName\relax % then we are doing only the installation instructions.
\else
! \begingroup \let\tocsection\gobblethree
\input \jobname.aux
\endgroup
\fi
--- 937,943 ----
\ifx\InstName\relax % then we are doing only the installation instructions.
\else
! \begingroup \let\tocsection\gobblefour
\input \jobname.aux
\endgroup
\fi
|