-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcommands.tex
424 lines (349 loc) · 14.2 KB
/
commands.tex
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
%% Document style TMreport: report for Thinking Machines Corporation.
%% Produced from /usr/local/lib/tex/macros/report.sty by Guy Steele.
% 3/18/85 10:28:39 Created.
% 3/18/85 10:29:39 Uses TMrep10.sty instead of rep10.sty, etc.
% 3/18/85 11:12:44 New \maketitle puts in copyright notice and other text.
% 3/19/85 12:38:40 Added formattedindex and \indexentry.
% 3/21/85 11:39:27 Make index be in \small font. Adjust spacing.
% 5/22/85 12:38:42 Need to make @ be alphabetic (catcode 11) when
% reading in the index. Things like \z@ show up.
% 1/31/86 15:24:51 Add hackery to put blank lines in index where
% initial letter changes.
% 2/03/86 16:01:52 Use \indexspace, not \bigskip.
% 2/04/86 14:10:52 Added \registered and \trademark.
% 3/07/86 14:21:25 Make \theindex use \raggedright.
% 3/11/86 16:32:19 Add new document option "onecolumnindex".
% 6/28/88 23:40:11 Add stuff to reset the \jobname for TeXtures. Yuk.
% 8/27/88 17:17:17 Add flushdesc environment.
\ifx \HCode\Undef
\newcommand{\logo}[1]{\includegraphics{#1}}
\else
\newcommand{\logo}[1]{\href{../index.html}{\includegraphics{#1.png}}}
\fi
\ifx \HCode\Undef
\newcommand{\igraphics}[1]{\includegraphics{#1}}
\else
\newcommand{\igraphics}[1]{{\includegraphics{#1.png}}}
\fi
\def\PostScriptFile#1{\special{psfile=#1}}
\newif\ifchiron \chironfalse
\makeatletter
%\newif\if@onecolumnindex \@onecolumnindexfalse
%\newif\if@externaldocument \@externaldocumentfalse
\newif\if@draft \@draftfalse
\newif\if@permutemonospace \@permutemonospacefalse
%\typeout{Document Style 'TMreport'. Version 0.91a - released 18 March 1985}
\def\@ptsize{0} \@namedef{ds@11pt}{\def\@ptsize{1}}
\@namedef{ds@12pt}{\def\@ptsize{2}}
\def\ds@twoside{\@twosidetrue \@mparswitchtrue}
\def\ds@draft{\overfullrule 18pt\@drafttrue}
%\def\ds@external{\@externaldocumenttrue}
%\def\ds@onecolumnindex{\@onecolumnindextrue}
\def\ds@permutemonospace{\@permutemonospacetrue}
\@options
%\input CLTL1\@ptsize.sty\relax
\newskip\ruletonoteskip \ruletonoteskip=6pt plus 3pt minus 1pt
\newskip\ruletotextskip \ruletotextskip=10pt plus 12pt minus 2pt
\newdimen\thinrule \thinrule=0.4pt
%\clubpenalty=1000
%\widowpenalty=1000
%%% defun.tex
% defun library.
% Guy L. Steele Jr.
% Copyright 1985, 1986 , 1988, 1989 Guy L. Steele Jr.
% 3/18/85 12:48 Now \@defunname generates index entries.
% 5/22/85 14:16 Use \noexpand before \tt and \rm in index entries.
% This will delay their processing until the point
% when the index is read back in again.
% 5/23/85 17:01 Add special check for nil as an init value for an
% &optional or &key argument; make it be \tt, not \it.
% 12/17/85 12:56 Add "lisp" environment.
% 1/02/86 14:15 Base "lisp" environment on tabbing instead of raggedright.
% 1/02/86 17:00 Make \endlisp use \ignorespaces.
% 1/03/86 17:00 Put a space into the index key to make sorting work better.
% 1/31/86 12:32 Simplify "lisp" environment to let the tabbing environment
% take care of interparagraph spacing.
% 1/31/86 13:27 Add \smallcaps stuff.
% 1/31/86 13:38 In \@defunkeymode et al., assume the user provides a :.
% 1/31/86 16:03 Flush \smallcaps stuff.
% 1/31/86 17:03 Use \addvspace in \defun et al.
% 2/04/86 17:15 Add feature so that the syntax \begin{defun}[Frob] causes "[Frob]"
% to appear at the right margin, as in the Common Lisp book, and causes
% the index entry for function baz to be "baz frob". If no square
% brackets ae used, then nothing appears at the right margin, and the
% index entry looks like "baz \lowercase{default}" where "default" is
% the definition of \defaultdefuntype, which is initialized by this file
% to {Function} but can be redefined by the user.
% 2/07/86 17:08 Make lisp environment use \frenchspacing.
% 3/11/86 11:42 Improve some of the breaking places in the defun headers:
% Introduce \hbox around every name, and make better pseudo-hyphens.
% Also fix a bug in \@defuninitvalue.
% 3/12/86 11:47 Hair up the defunbreak stuff some more. Now we have different
% behavior depending on whether the function name is long or short.
% 3/12/86 16:09 Fix a possible bug in \@showdefuntype.
% 3/13/86 14:16 More fixes to hairy defunbreak stuff.
% 5/29/86 01:47 Add \internalroutine.
% 6/04/86 14:47 Correct spacing in \@showdefuntype.
% 6/29/88 00:31 Remove priority-box macros.
\catcode`@=11 % Make it possible to refer to some LaTeX utility macros.
\catcode`&=11
\newcounter{defuncounter}
\newenvironment{lisp}{\begin{tabbing}}{\end{tabbing}\par}
\newenvironment{defunheader}{}{}%
\def\@defunstart{%\noindent
%\leavevmode%
\begingroup%
\samepage \raggedright \catcode`&=11 %
% \hyphenpenalty=-5 \exhyphenpenalty=\@M \brokenpenalty=\@M
\begin{defunheader}%
\catcode`&=11}
\def\defun{\@ifstar{\@defunstart{}\@ifnextchar[{\@defuntyped}{\@defununtyped}}{\relax%
\addvspace{18pt plus 12pt minus 6pt}\@defunstart%
\@ifnextchar[{\@defuntyped}{\@defununtyped}}}
\def\@showdefuntype{\emph{[\@defuntype]}\relax%
\leavevmode%
\let\@defuntype\@defunsecondtype}
\def\@defununtyped{\let\@defunshow=\relax \@defun}
\def\@defuntyped[#1]{\def\@defuntype{#1}\let\@defunsecondtype\@defuntype%
\let\@defunshow=\@showdefuntype%
\@ifnextchar[{\@defuntypedtwice}{\@defun}}
\def\@defuntypedtwice[#1]{\def\@defunsecondtype{#1}\let\@defunshow=\@showdefuntype%
\@defun}
\def\@defun{\@ifnextchar?{\@ifnextchar({\@defunnamesetf}{\@defunname}}
\@ifnextchar({\@defunnamesetf}{\@defunname}} % Skips spaces before name
\def\enddefun{%\par
\@ifstar{}{}} %Margin macros know this amount
% Used to be "plus 2pt" but that was not enough stretch relative to \parskip.
\def\@defunnamesetf(#1 #2) {
\@defunindex{(#1 #2)}:\par{\MakeLowercase{\@defuntype}}\relax%
\@defunshow%
% \typeout{defunname}\typeout{ 1: #1}\typeout{ type: \lowercase{\@defuntype}}
\ \textbf{(#1 #2)}
\ifdim 1\wd0 < 1.3in\relax
\def\@defunbreak{ }\relax
\let\@firstdefunbreak=~\relax
\else
\def\@defunbreak{ }\relax
\let\@firstdefunbreak=\@defunbreak
\fi
\def\@defunkeywordbreak{\@firstdefunbreak\let\@defunkeywordbreak=\@defunbreak}\relax
\def\@hairydefunbreak{\@firstdefunbreak
\let\@defunkeywordbreak=\@defunbreak
\let\@hairydefunbreak\@defunbreak}\relax
\@defunreqmode}
% 1: entry
% \@defuntype: \lowercase{category}
\def\@defunname#1 {
\@defunindex#1:\par{\MakeLowercase{\@defuntype}}\relax
\@defunshow%
% \typeout{defunname}\typeout{ 1: #1}\typeout{ type: \lowercase{\@defuntype}}
\ \textbf{#1}
\ifdim 1\wd0 < 1.3in\relax
\def\@defunbreak{ }\relax
\let\@firstdefunbreak=\relax
\else
\def\@defunbreak{ }\relax
\let\@firstdefunbreak=\relax%\@defunbreak
\fi
\def\@defunkeywordbreak{\@firstdefunbreak\let\@defunkeywordbreak=\@defunbreak}\relax
\def\@hairydefunbreak{\@firstdefunbreak
\let\@defunkeywordbreak=\@defunbreak
\let\@hairydefunbreak\@defunbreak}\relax
\@defunreqmode}
% 1: entry
% 2: empty
% 3: \lowercase{category}
\def\@defunindex#1:#2\par#3{%
\typeout{defunindex}\typeout{ 1: #1}\typeout{ 2: #2}\typeout{ 3: #3}%
\def\@tempa{}\def\thing{#2}\ifx\thing\@tempa
\@idefunindex{}#1:\par{#3}\else \@idefunindex{#1:}#2\par{#3}\fi}
% 1: empty
% 2: entry
% 3: \lowercase{category}
\def\@idefunindex#1#2:\par#3{%
% \typeout{idefunindex}\typeout{ 1: #1}\typeout{ 2: #2}\typeout{ 3: #3}%
\index{symbols}{#2!#3}}
\def\@newlinecheck#1#2{\def\@tempa{#1}\def\@tempb{\\}\ifx\@tempa\@tempb \\*\def\@tempd{\@ifnextchar({\@defunnamesetf}{\@defunname}}
\else \def\@tempd{#2}\fi \@tempd}
\def\@ifparnext#1#2{\def\@tempa{#1}\def\@tempb{#2}\futurelet\@tempc\@ifparnx}
\def\@ifparnx{\ifx\@tempc\@@par \let\@tempd\@tempa \else \let\@tempd\@tempb \fi \@tempd}
\def\@defunreqmode{\@ifparnext{\@defundone}{\@ifnextchar &{\@defunkeyword}{\@ifnextchar({\@defunparenreqarg}{\@defunreqarg}}}}
\def\@defunreqarg#1 {\@newlinecheck{#1}{\@hairydefunbreak\textit{#1}\@defunreqmode}}
\def\@defunparenreqarg(#1 #2) {\@hairydefunbreak(\textit{#1}~#2)\@defunreqmode} %CLOS methods
\def\@defunrestmode{\@ifparnext{\@defundone}{\@ifnextchar &{\@defunkeyword}{\@defunrestarg}}}
\def\@defunrestarg#1 {\@newlinecheck{#1}{\@hairydefunbreak\textit{#1}\@defunrestmode}}
\def\@defunoptionalmode{\@ifparnext{\@defundone}{\@ifnextchar &{\@defunkeyword}{\@ifnextchar({\@defunparenoptionalarg}{\@defunoptionalarg}}}}
\def\@defunoptionalarg#1 {\@newlinecheck{#1}{\@hairydefunbreak\textit{#1}\@defunoptionalmode}}
\def\@defunparenoptionalarg(#1 #2) {\@hairydefunbreak(\textit{#1}~\@defuninitvalue#2)\@defunoptionalmode}
\def\@defuninitvalue#1#2){{\ifcat#1A\def\@tempa{#1#2}\def\@tempb{nil}\ifx\@tempa\@tempb
\relax \else \relax \fi \else \relax \fi #1#2})}
\def\@defunkeymode{\@ifparnext{\@defundone}{\@ifnextchar &{\@defunkeyword}{\@ifnextchar({\@defunparenkeyarg}{\@defunkeyarg}}}}
\def\@defunkeyarg#1 {\@newlinecheck{#1}{\@defunkeywordbreak\textit{#1}\@defunkeymode}}
\def\@defunparenkeyarg(#1 #2) {~(\textit{#1}~\@defuninitvalue#2)\@defunkeymode}
\expandafter\def\csname @defunallow-other-keysmode\endcsname{\@ifparnext{\@defundone}{\@ifnextchar &{\@defunkeyword}{\@ifnextchar({\@defunparenkeyarg}{\@defunkeyarg}}}}
\def\@defunkeyword  {\@defunkeywordbreak\texttt{\hyperref[#1]{\}} \csname @defun#1mode\endcsname}
\def\@defundone\par{\end{defunheader}\par\endgroup
\nobreak\addvspace{6pt}}
\newenvironment{defmacheader}{\begin{tabbing}}{\end{tabbing}\par}
%% Macros, special operators
\begingroup
\catcode`\<=13 \catcode`\>=13
\catcode`\?=13
\global\def\@defmacstart#1{\relax%
% \noindent\leavevmode % Need this to trigger the \everypar for margin rules.
\begingroup \samepage \topsep 0pt
\catcode`&=11
\def\@lbracehack{\{\@backslashsetup}\relax
\def\@rbracehack{\}\@backslashsetup}\relax
\def<{[[\@backslashsetup}\relax
\def>{]]\@backslashsetup}\relax
\def?{{$\downarrow$}}\relax
\def\@finishdefmac{\end{defmacheader}\endgroup}\relax
\expandafter\def\@carret{\expandafter\@ifnextchar\@carret{\@finishdefmac\@gobblecr}%
{\ifx \HCode\Undef \@tabcr* ~~ \else \fi\@backslashsetup}}\relax
\@defunhackbraces
\def\@backslashsetup{\def\\{\end{defmacheader}\begin{defmacheader}%
\@backslashsetup\@dodefmacname{#1}}}\relax
\catcode`\<=13 \catcode`\>=13
\catcode`\?=13 \catcode`\^^M=13
\def\!##1!{\cd{##1}}\relax
\begin{defmacheader}
\@backslashsetup\@margineveryparguts
\@dodefmacname{#1}}
\endgroup
\def\Mopt#1{\,[\textit{#1}]\,}
\def\Mchoice#1{\,[[\textit{#1}]]\,}
\def\Mstar#1{\,\{\textit{#1}\}*\,}
\def\Mplus#1{\,\{\textit{#1}\}+\,}
\def\Mgroup#1{\,\{\textit{#1}\}\,}
\def\Mor{|}
\def\Mind#1{$\downarrow$\textit{#1}}
\ifx \rulang\Undef
\def\defmac{\@defmacbegin{Macro}}
\def\defspec{\@defmacbegin{Special operator}} %
\def\defloop{\@defmacbegin{Loop clause}} %
\else %RUSSIAN
\def\defmac{\@defmacbegin{Макрос}}
\def\defspec{\@defmacbegin{Специальный оператор}}%
\def\defloop{\@defmacbegin{Выражение цикла}}%
\fi
\let\enddefmac\enddefun
\let\enddefspec\enddefun
\let\enddefloop\enddefun
\def\@defmacbegin#1{\@ifstar{\@defmacstart{#1}}{\@defmacstart{#1}}}
{\catcode`\^^M=13\global\def\@carret{
}\global\def\@defmacnamecrgobble#1
{\@defmacname{#1}}}
\def\@dodefmacname#1{
\expandafter\@ifnextchar\@carret
{\@defmacnamecrgobble{#1}}{\@defmacname{#1}}}
\def\@defmacname#1#2 {
\emph{[#1]}\relax
\leavevmode
\ \textbf{#2}
\@backslashsetup
\@defunindex#2:\par{\MakeLowercase{#1}}
}
\bgroup
\catcode`\<=1 \catcode`\>=2 \catcode`\{=13 \catcode`\}=13
\global\def\@defunhackbraces<\catcode`\{=13\catcode`\}=13\let{\@lbracehack\let}\@rbracehack>
\egroup
\catcode`@=12 % Restore character codes
\catcode`&=4
%[End]
%%%
%%% marginal.tex
\makeatletter
\let\@margineverypar\relax
\let\@margineveryparguts\relax
\makeatother
\newenvironment{new}{%
}{%
}
\newenvironment{newer}{%
}{%
}
\newenvironment{obsolete}{%
}{%
}
%%%
\makeatletter
% The \null in the following is intended to suppress hyphenation
% in code words not already containing hyphens. The \leavevmode
% is needed to prevent vertical mode from swallowing the \null.
%%%\def\cd#1{\leavevmode{\cf \null#1}}
%\def\cd{\leavevmode\begingroup\cf\@cd}
%\def\cd{\leavevmode\begingroup\@cd}
%\def\@cd#1{\texttt{#1}\endgroup}
%\def\@cd#1{\textit{\null #1}}
\newcommand{\cd}[1]{\textbf{#1}}
% if label exists, then automatically make hyperref
% else insert plain text
\newcommand{\cdf}[1]{\textbf{\testlabel{#1}}}
\newcommand{\testlabel}[1]{%
\@ifundefined{r@idxcc:#1}%
{#1}%
{\hyperref[idxcc:#1]{#1}}}%
\def\Xtilde{\char"7E}
\def\Xbq{\char"60}
\def\Xquote{\char"27}
\def\Xequal{\char"3D}
\def\Xcircumflex{\char"5E}
\def\cf{} %\frenchspacing}
\def\textnumber{\csname \#\endcsname}
\ifchiron
\def\Xarrowright{\char"A2}
\def\Xarrowdown{\char"A4}
\else
\def\Xarrowright{$\Rightarrow$}
\def\Xarrowdown{$\Downarrow$}
\fi
\def\Xatsign{\char"40}
\def\Xbackslash{\char"5C}
\def\Xunderscore{\char"5F}
\def\Xlbracket{\char"5B}
\def\Xrbracket{\char"5D}
\def\Xlbrace{\char"7B}
\def\Xrbrace{\char"7D}
\def\dlbrack{\lbrack\lbrack}
\def\drbrack{\rbrack\rbrack}
\def\Xdquote{\char"22}
\def\EV{$\Rightarrow$}
\def\EX{$\rightarrow$}
\def\EQ{$\equiv$}
\newcommand{\indexterm}[1]{\index{symbols}{#1}}
\def\emptylist{()}
\def\false{\cdf{nil}}
\def\true{\cdf{t}}
\def\nil{\cdf{nil}}
\ifx \rulang\Undef
\newenvironment{implementation}{\small\noindent\textbf{Implementation note:}}{}
\newenvironment{rationale}{\small\noindent\textbf{Rationale:}}{}
\newenvironment{sideremark}{\small\noindent\textbf{Remark:}}{}
\newenvironment{incompatibility}{\small\noindent\textbf{Compatibility note:}}{}
\else %RUSSIAN
\newenvironment{implementation}{\small\noindent\textbf{Заметка для реализации:}}{}
\newenvironment{rationale}{\small\noindent\textbf{Обоснование:}}{}
\newenvironment{sideremark}{\small\noindent\textbf{Примечание:}}{}
\newenvironment{incompatibility}{\small\noindent\textbf{Несовместимость:}}{}
\fi
\def\beforenoterule{%
\par\vskip\ruletotextskip
\hrule
\nobreak\vskip\ruletonoteskip
}
\def\betweennoterule{%
\par\hrule\par
}
\def\afternoterule{%
\par\nobreak\vskip\ruletonoteskip
\hrule
\vskip\ruletotextskip}
\def\issue#1{\index{issues}{#1}}
\def\prefaceword{\noindent preface:}
%%% For use in "little tables"; leaves some space after the rule (16pt b/b).
\def\hlinesp{%
}
\newenvironment{indentdesc}[1]{\begin{itemize}}{\end{itemize}}
\newenvironment{flushdesc}{\begin{description}}{\end{description}}
\makeatother