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
|
% pdccode.tex 1.6 1995/03/30 -- self-documenting TeX macros
%%%@TeX-definition-file {
%%% filename = "$texmf/tex/plain/pdcmac/pdccode.tex",
%%% version = "1.6",
%%% date = "1995/03/30",
%%% package = "pdcmac 1.0",
%%% author = "P. Damian Cugley",
%%% email = "damian.cugley@comlab.ox.ac.uk",
%%% address = "Oxford University Computing Laboratory,
%%% Parks Road, Oxford OX1 3QD, UK",
%%% codetable = "USASCII",
%%% keywords = "TeX, plain TeX, macros",
%%% supported = "Maybe",
%%% abstract = "Macros for documented TeX macros (DTX files).
%%% This file was generated by running
%%% plain TeX on pdccode.dtx",
%%% copyright = "Copyright (c) 1991-1995 P. Damian Cugley",
%%% copying = "DO NOT DISTRIBUTE THIS FILE.
%%% Distribute pdccode.dtx only as part of the
%%% package it came in.",
%%% dependencies = "",
%%% }
\message{1.6 <pdc 1995/03/30>}
\toksdef\toksa=0
\def\rcs#1: #2,v #3 #4 #5 #6 #7 #8$#9\endrcs{
\def\filename{#2}
\def\fileversion{#3}
\def\filedate{#4}
\def\fileauthor{#6}
\def\filelocker{#8}
}
\def\declareactivechar#1{%
\toksa\expandafter{\verbatimplains\do#1}%
\edef\verbatimplains{\the\toksa }%
\catcode`#1\active
}
\def\verbatimplains{\do\\\do\{\do\}\do\_\do\$\do\#\do\&\do\%}
\def\verbatimactives{\do\`\do\'\do\~\do\^\do\ }
\chardef\other=12
\newtoks\everyverbatim
\bgroup \catcode`\^=13 \catcode`\'=13 \catcode`\`=13 \toksa={\egroup
\def\setupverbatim{%
\frenchspacing
\spaceskip0pt \xspaceskip0pt % use spacing of font
\def\do##1{\catcode\lq##112 }\verbatimplains
\def\do##1{\catcode\lq##1\active }\verbatimactives
\let`\ttlq \let'\ttrq
\let~\tttilde \let^\ttcircum
\the\everyverbatim
}
}\the\toksa
\def\ttlq{\lower0.125ex \hbox{\char18 }}
\def\ttrq{\lower0.125ex \hbox{\char19 }}
\def\tttilde{\lower0.5ex \hbox{\char`\~ }}
\def\ttcircum{\lower0.5ex \hbox{\char`\^ }}
\def\defverbatim#1{%
\ifcat\noexpand#1\noexpand~\else \declareactivechar#1 \fi
\begingroup \uccode`\~=`#1 \uppercase{\toksa={\endgroup
\def~{%
\leavevmode
\begingroup \tt \setupverbatim
\catcode`#1\active \let~\endgroup
}%
}}\the\toksa
}
\defverbatim\|
\hyphenchar\tentt=-1
\newwrite\CODEwrite
\def\codefile#1{
\ifeof\CODEwrite\else \endcodefile \fi
\def\thecodefile{#1} \openout\CODEwrite=#1
}
\def\endcodefile{
\message{Code written on \thecodefile.}
\closeout\CODEwrite
}
\def\code{
\smallskip
\begingroup
\let|\CODEline \let\|\CODElinex
\let\{=\CODElb \let\}=\CODErb \let\\=\CODEbslash
\def~{ } \let\~\CODEtilde
\the\everycode
\obeylines
}
\def\endcode{
\smallbreak
\endgroup
}
\def\CODEline{%
\begingroup % matched by \CODElinei
\setupverbatim \catcode`\|\other
\CODElinei
}
\begingroup\catcode`\'=\active \catcode`\`=\active
\catcode\lq\@=\catcode\lq\^ \catcode\lq\^=\active
\catcode\lq\@@M=\active \toksa={\endgroup %
\def\CODElinei#1@@M{%
\begingroup\let`\lq \let'\rq %
\let^\CODEcircum \let~ \CODEtilde%
\edef\tmp{#1}%
\write\CODEwrite\expandafter{\tmp}%
\endgroup %
\indent\the\everycodeline #1\par %
\endgroup % matches \CODEline
}%
}\the\toksa
\begingroup\catcode`\^^M=13 \toksa={\endgroup %
\def\CODElinex#1^^M{%
\edef\tmp{\write\CODEwrite{#1}}\tmp %
{\indent\the\everycodeline #1\par}%
}%
} \the\toksa
\begingroup\catcode`\/=0 \catcode`\\=\other /toksa={/endgroup
/def/CODEbslash{\}
}/the/toksa
\begingroup\catcode`\^=\other \toksa={\endgroup
\def\CODEcircum{^}
}\the\toksa
\begingroup\catcode`\~=\other \toksa={\endgroup
\def\CODEtilde{~}
}\the\toksa
\begingroup\catcode`\%=\other \toksa={\endgroup
\def\%{%}
}\the\toksa
\begingroup\catcode`\~=\other \toksa={\endgroup
\def\CODEtilde{~}
}\the\toksa
\begingroup\catcode`\[=1 \catcode`\]=2
\catcode`\{=\other \catcode`\}=\other
\toksa=[\endgroup
\def\CODElb[{] \def\CODErb[}]
]\the\toksa
\newtoks\everycode
\newtoks\everycodeline
\everycode{\tt \baselineskip=0.8\baselineskip \lineskiplimit=0pt }
\newcount\lineno
\everycodeline{\llap{$ \global\advance\lineno1
\scriptstyle\the\lineno $\enspace}%
\mark\expandafter{\the\lineno}}
\let\document\relax \let\enddocument\relax
\lefthyphenmin=3 \righthyphenmin=2 \errorcontextlines10000
\parindent=2em \hsize=36\fontdimen6\tentt \advance\hsize\parindent
\hoffset=210mm \advance\hoffset-\hsize \advance\hoffset-25mm
\newdimen\leftmargin \leftmargin=\hoffset \advance\leftmargin-25mm
\advance\hoffset-1in
\voffset=297mm \advance\voffset-11in
\advance\voffset7mm \advance\voffset20pt
\vsize=297mm \advance\vsize-2\voffset \advance\vsize-2\baselineskip
\advance\voffset-1in
\def\do#1{\fontdimen3#1=0pt \fontdimen4#1=0pt }
\do\tenrm \do\tenit \do\tenbf
\rightskip=0pt plus 2em minus 2pt \adjdemerits=0 \tolerance=500
\parfillskip=0pt plus 0.8\hsize
\def\author#1{\def\theauthor{#1}} \author{P. Damian Cugley}
\font\titlefont=cmssbx10 scaled \magstep3
\def\title#1{
\vglue2\baselineskip
\begingroup \parindent-\leftmargin \hyphenpenalty10000 \titlefont
#1\smallskip
\endgroup
\leftline{Version \fileversion,
last changed \fileauthor\space \mungedate\filedate}
\ifx\filelocker\empty\else
\leftline{Edited by \filelocker\unskip\ \today}
\fi
\medskip
\hrule \vskip1pt \hrule \vskip1pt \hrule \vskip1pt \hrule
\medskip
\rightline{\theauthor}
\bigskip
\headline{\hfil\global\headline{%
\sevenbf \hskip-\leftmargin \themarks \hfil #1
\fileversion
\ifx\filelocker\empty
\space\mungedate\filedate
\else
e\space\today
\fi
}}
}
\def\themarks{%
\ifx\firstmark\empty\else
\firstmark
\ifx\firstmark\botmark \else --\botmark \fi
\fi
}
\def\today{\mungedate{\number\year/\twodigits\month/\twodigits\day}}
\def\twodigits#1{\ifnum#1<10 0\fi \number#1}
\def\mungedate#1{$ \textfont0=\font \mathcode`/="7B #1 $}
\font\secfont=cmssdc10 at 12pt
\font\subsecfont=cmssi10
\newcount\seccount
\newcount\subseccount
\def\section#1{%
\advance\seccount1 \subseccount=0
\bigbreak
\begingroup
\secfont \hyphenpenalty=10000 \tolerance=1000
\rightskip=0pt plus 2em
\noindent\llap{\number\seccount.\enspace}#1
\medskip
\endgroup
\noindenttrue
}
\def\subsec#1{%
\advance\subseccount1
\medbreak
\begingroup
\subsecfont \hyphenpenalty=10000 \tolerance=1000
\rightskip=0pt plus 2em
\noindent\llap{\number\seccount.%
\number\subseccount.\enspace}#1
\nobreak\smallskip
\endgroup
\noindenttrue
}
\newif\ifnoindent
\everypar{%
\ifnoindent
{\setbox0=\lastbox}\global\noindentfalse
\fi
}
\newskip\footnoterightskip \footnoterightskip=\rightskip
\catcode`@=11
\def\vfootnote#1{\insert\footins\bgroup
\interlinepenalty\interfootnotelinepenalty
\splittopskip\ht\strutbox % top baseline for broken footnotes
\splitmaxdepth\dp\strutbox \floatingpenalty\@MM
\leftskip\z@skip \rightskip\footnoterightskip
\spaceskip\z@skip \xspaceskip\z@skip \rm
\textindent{#1}\footstrut\futurelet\next\fo@t}
\catcode`@=11
\def\<#1>{\leavevmode\hbox{$\langle$\it#1\/$\rangle$}}
\def\cs#1{\leavevmode\hbox{\tt\char`\\#1}}
\def\arg#1{\leavevmode\hbox{{\tt\char`\{}#1{\tt\char`\}}}}
\def\pt{\,{\rm pt}} \def\em{\,{\rm em}} \def\mm{\,{\rm mm}}
\def\inch{''}
\def\flushtop#1{%
\leavevmode
\begingroup
\setbox0=\hbox{#1}\setbox2=\hbox{X}%
\dimen0=\ht2 \advance\dimen0-\ht0
\raise\dimen0 \box0
\endgroup
}
\def\TeX{T\kern-0.1em \lower0.5ex \hbox{E}X\spacefactor1000 }
\def\LaTeX{L\kern-0.1em \flushtop{a}\TeX}
\def\notepar{
\smallskip
\begingroup
\leftskip2\parindent \advance\rightskip\parindent minus \parindent
\noindent\kern-\parindent{\bf Note}\quad\it
\ignorespaces
}
\def\endnotepar{
\smallbreak
\endgroup
}
\endinput
|