blob: 94d4245838c7a22479ba3cc35d3c3c1ee6c0e384 (
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
|
% macros definitions for e-TeX manual
\def\NTS{\leavevmode\hbox{$\cal N\kern-0.35em\lower0.5ex\hbox{$\cal T$}%
\kern-0.2emS$}}
\def\eTeX{\leavevmode\hbox{$\varepsilon$}-\TeX}
\def\TeXbook{{\sl The \TeX\/book\/}}
\DeclareFontShape{OT1}{cmr}{bxrev}{n}{<-> xbmc10}{} % for right-to-left text
\DeclareTextFontCommand{\revrm}{\fontseries{bxrev}\fontshape{n}\selectfont}
\ifx\beginL\undefined % this is \TeX
\def\XeT{X\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT}
\def\TeXeT{\TeX-\hbox{\revrm{\XeT}}}
\def\TeXXeT{\TeX-\hbox{\revrm{-\XeT}}}
\else
\ifx\eTeXversion\undefined % this is \TeXeT
\def\TeXeT{\TeX-\revrm{\beginR\TeX\endR}}
\def\TeXXeT{\TeX-\revrm{\beginR\TeX-\endR}}
\else % this is \eTeX
\def\TeXeT{\TeX-\revrm{\TeXXeTstate=1\beginR\TeX\endR}}
\def\TeXXeT{\TeX-\revrm{\TeXXeTstate=1\beginR\TeX-\endR}}
\fi
\fi
{\def~{|} \global\catcode`\|=\active \global\let|=~}
\def\|{\leavevmode\verb|}
\def\<{\leavevmode\hbox\bgroup\catcode`>=13$\langle$} % syntax quantity
\def\>{\/$\rangle$\egroup} % finish syntax quantity
\def\cstok#1{\leavevmode\thinspace\hbox{\vrule\vtop{\vbox{\hrule\kern1pt
\hbox{\vphantom{\tt/}\thinspace{\tt#1}\thinspace}}
\kern1pt\hrule}\vrule}\thinspace} % control sequence token
\def\[#1]{\thinspace{\tt#1}\thinspace} % keyword in syntax
\newenvironment{paramlist}%
{\endgraf\parskip=0pt
\advance\leftskip by5em \parindent=-2.5em}%
{\endgraf}
\newenvironment{syntax}%
{\endgraf\nobreak\medskip
\begingroup \catcode`<=13 \catcode`[=13 \let|=\|%
\let\par=\endsyntaxline \obeylines}%
{\medbreak}
\def\endsyntaxline{\futurelet\next\syntaxswitch}
\def\syntaxswitch{\ifx\next\<\let\next=\syntaxrule
\else\ifx\next\end\let\next=\endgroup
\else\let\next=\continuerule\fi\fi \next}
\def\continuerule{\hfil\break\indent\qquad}
{\catcode`<=13 \catcode`>=13 \catcode`[=13
\global\let<=\< \global\let>=\> \global\let[=\[
\gdef\syntaxrule<{\endgraf\indent\<}}
\def\is{\ $\longrightarrow$ }
\def\alt{\ $\vert$ }
\def\more{whatever \TeXbook\ defines}
\def\ot#1{\|#1|$_{12}$} % an other token
\def\cs#1{{\tt\char`\\#1}}
\newenvironment{multilist}[2]%
{$$\setbox\z@=\hbox\bgroup % catch some funny things -> \mathord
\let\a=\empty
\let\b=\empty
\count@=\z@
\toks@={#2}%
\def\item##1\cr
{\ifnum \count@=\z@
\count@=#1%
\expandafter\def\expandafter\b\expandafter{\b\y{}}%
\fi
\advance\count@ by\m@ne
\expandafter\def\expandafter\a\expandafter{\a\x{##1}}}%
\ignorespaces}%
{\loop
\ifnum \count@>\z@
\expandafter\def\expandafter\a\expandafter{\a\expandafter\z\b\relax}%
\advance\count@ by\m@ne
\repeat
\def\x##1{\expandafter\y\b\relax{##1}}%
\def\y\y##1##2\relax##3%
{\ifx @##1@%
\def\b{##2\y{##3}}%
\else
\def\b{##2\y{##1&##3}}%
\fi}%
\def\z\y##1##2\relax{\def\b{##2\y{##1}}}%
\a
\def\x
{\expandafter\egroup\expandafter\halign\expandafter\bgroup
\expandafter&\the\toks@\cr}%
\def\y##1{\expandafter\def\expandafter\x\expandafter{\x##1\cr}}%
\b
\x\egroup $$}
|