summaryrefslogtreecommitdiff
path: root/web/latexspider/web.sty
blob: 00b93d0cb3209b6e564655fa7fc925d3495949c6 (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
%% 
%% This is file `web.sty' generated
%% on <1991/6/19> with the docstrip utility (v1.1l test). 
%% 
%% The original source file was `web.doc'.
%% 
%% You are not allowed to distribute this file without the corresponding 
%% `.doc' version containing the documentation. 
%% 
\iffalse % -*-latex-*-

%% Copyright D.Love, SERC Daresbury Laboratory, 1991
%% The `doc' version of this style is re-distributable and usuable
%% under conditions of the GNU copyleft, but please mark any changes,
%% list them here and report any major enhancements to the author.


\fi

\iffalse %  hack RCS info into a sensible form:
\fi
\def\next$#1: #2/#3/#4 #5 ${\def\filedate{#4/#3/#2}\def\filetime{#5}}
\next$Date: 91/04/30 19:30:11 $

\def\next$#1: #2 ${\def\fileversion{#2}}
\next$Revision: 1.1 $



\typeout{Sub-style `web', version \fileversion\space of \filedate}
\parskip \z@
\ifx\DocInput\undefined
\ifcase \@ptsize
   \textheight = 53 \baselineskip
\or
   \textheight = 47 \baselineskip
\or
   \textheight = 43 \baselineskip
\fi  \advance \textheight by \topskip
\textwidth=6.27in  \oddsidemargin=\z@  \evensidemargin=\z@
\fi
\pagestyle{myheadings}
\ifx\DocInput\undefined \sectionmark{1} \fi
\@ifundefined{selectfont}{%
     \let\normal@font=\relax}   % old scheme
   {% new scheme
     \def\normal@font{\series \mediumseriesdefault
     \shape \normalshapedefault}}
\ifx\DocInput\undefined
\def\@maketitle{%
  \newpage  \thispagestyle{empty} \null
  \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   \vskip 1.5em
  \topofcontents  \tableofcontents  \par  \botofcontents \newpage }
\fi
\ifx\DocInput\undefined
\def\maketitle{%
  \par \begingroup
    \pagenumbering{roman}  \setcounter{page}{0}
    \def\thefootnote{\fnsymbol{footnote}}
    \def\@makefnmark{\hbox to \z@ {$^{\@thefnmark}$\hss}}
    \if@twocolumn  \twocolumn[\@maketitle]
    \else  \newpage  \global\@topnum\z@  \@maketitle  \fi
    \@thanks
  \endgroup
  \setcounter{footnote}{0}  \pagenumbering{arabic}
  \let\maketitle\relax  \let\@maketitle\relax
  \gdef\@thanks{}\let\thanks\relax}
\fi
\let\@title=\empty  \let\@author=\empty
\def\tableofcontents{%
  \noindent Section \hfill Page \par  \@starttoc{toc}}
\def\topofcontents{}  \def\botofcontents{}
\let\ttitlefont=\tt  \let\titlefont=\rm
\newcommand{\id}[1]{\mbox{\idfont #1\/\kern.05em}}
\newcommand{\ida}[1]{\mbox{$ #1 $}}
\newcommand{\idfont}{\normal@font \it}
\newcommand{\reservedfont}{\normal@font \bf}
\newcommand{\res}[1]{\mbox{\reservedfont#1\/}}
\def\str#1{%
  \ifmmode \gdef\@tempa{\null$\null}\else \gdef\@tempa{}\fi
  \@tempa {%
  \let\\=\BS  \let\'=\RQ  \let\`=\LQ  \let\{=\LB  \let\}=\RB
  \let\~=\TL  \let\ =\SP  \let\&=\AM  \def\^{{\tt \char`\^}}%
  \leavevmode \normal@font\tt #1}\@tempa}
\chardef\AM=`\&                 % ampersand
\chardef\BS=`\\                 % backslash
\chardef\LB=`\{                 % left brace
\def\LQ{{\tt\char'22}}          % left quote
\chardef\RB=`\}                 % right brace
\def\RQ{{\tt\char'23}}          % right quote
\def\UL{{\tt\char`\_}}          % underline character in a string
\def\TL{{\tt\char`\~}}          % tilde
\newcommand{\SP}{\char`\ \discretionary{\hbox{\char`\\}}{}{}}
\newcommand{\vstr}[1]{\kern 2pt \fbox{\str{#1}}\kern 2pt}
\setlength{\fboxsep}{2pt}
\def\const#1{{%
  \def\?{\kern.2em}%
  \def\${\ell}% long
  \def\_{\RealConstFormat{\aftergroup}}% power of ten
  \def\~{\hbox{\rm \char'23\kern-.2em \it \aftergroup\?\aftergroup}}% octal
  \def\^{\hbox{\rm "\tt \aftergroup}}% hex
  #1}}                          % (\def{\const})
\newcommand{\RealConstFormat}{\cdot 10^}
\newcount\ind
\newbox\bak  \setbox\bak=\hbox to \m@ne em{}
\newbox\bakk \setbox\bakk=\hbox to -2em{}
\def\0{%
  \ifmmode
    \ifinner$\par\hangindent\ind em\noindent\kern\ind em\ignorespaces$\fi
  \else
    \par\hangindent\ind em\noindent \kern\ind em\ignorespaces
  \fi}
\newcommand{\1}{\global\advance\ind by 1 \hangindent\ind em}
\newcommand{\2}{\global\advance\ind by \m@ne }
\newcommand{\3}[1]{\hfil \penalty#10 \hfilneg}
\newcommand{\4}{\copy\bak}
\newcommand{\5}{\hfil \penalty \m@ne  \hfilneg \kern 2.5em \copy\bakk
  \ignorespaces}
\def\6{\ifmmode \else \par
  \hangindent\ind em\startline \ignorespaces \fi}
\def\startline{\noindent \count255=\ind \advance\count255 by -2
  \hskip\count255 em}
\newcommand{\7}{\Y\6}
\newcommand{\8}{\unskip}
\newcommand{\J}{\str{@\&}}
\def\C#1{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi
   \XX \hfil \penalty \m@ne\hfilneg\quad % original spider
   $\commentbegin\,$\endcodehook{#1}\startcodehook$\,
   \commentend$\XX}
\def\onmaybe{\let\ifon=\maybe}  \let\maybe=\iftrue  \newif\ifon
\outer\def\M#1.{%
  \MN#1.\ifon\vfil\penalty-100\vfilneg
  \vskip12ptminus3pt \startsection \ignorespaces}
\def\startsection{\Q \noindent {\let\*=\lapstar \bf \modstar.\quad }}
\newcommand{\lapstar}{\rlap{*}}
\outer\def\N#1.#2.{%
  \MN#1.\headcheck#2\headcheck
  \typeout{*\modno} % progress report
  \addcontentsline{toc}{\headcheck@type}
    {\hbox to 2em{\modno\hfill} \quad \theopen \relax \themodtitle}
  \markboth{% running headline
    {\protect\small \qquad\uppercase{\ignorespaces\themodtitle}}
      \hfill {\protect\small \@title}\qquad{\rm \old@S \modno}}
    {\rm \old@S \modno\qquad {\protect\small \@title}\hfill
      {\protect\small \uppercase{\ignorespaces\themodtitle\qquad}}}
  \ifon\startsection {\bf \ignorespaces \themodtitle.\quad }\ignorespaces}

\def\MN#1.{%
  \par {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}%
  \ifx\modno\modstar \onmaybe \else \ontrue \fi
  \sectionmark{\modno}
  \let\@tempa\protect
  \def\protect{\noexpand\protect\noexpand}%
  \def\@currentlabel{#1}%
  \let\protect\@tempa} % def\MN
\def\note#1#2.{\Y \noindent {\hangindent 2em \footnotesize
  \baselineskip 10pt#1 #2.\par}}
\newcommand{\A}{\note{See also}}
\def\l@part{\addpenalty{\@secpenalty}
   \addvspace{3pt plus 1pt}     % space above part line
   \@dottedtocline{0}{\z@ }{4em}}
\def\l@norm{\addpenalty{\@secpenalty}
   \@dottedtocline{0}{\z@ }{4em}}
\def\l@num{\@dottedtocline{0}{0em}{4em}}
\newif\ifcancel  \cancelfalse
\def\ifnextchar#1#2#3{%
  \let\@tempe=#1\def\@tempa{#2}\def\@tempb{#3}\@ifnch}
\def\@ifnch{%
  \ifx \@tempc \@tempe\let\@tempd\@tempa
  \else \let\@tempd\@tempb
  \fi
  \@tempd}
\def\makethechar#1{\let\@tempc=#1}
\def\headcheck#1#2\headcheck{%
  \makethechar{#1}%
  \def\theskipper{\vfil\penalty-100 % skip before new module
    \vfilneg\vskip12ptminus3pt}%
  \def\theopen{}% opening skip in toc entry
  \def\thetocskip{}% vertical skip before toc entry
  \def\themodtitle{{#2}}%
  \def\headcheck@type{num}%
  \ifnextchar={%
    \def\theskipper{\newpage}  \canceltrue
    \def\headcheck@type{part}       \def\theopen{\bf}%
    \def\thetocskip{\vskip 3pt plus 1in \penalty-100
      \vskip \z@  plus -1in}%
    }{\ifnextchar1{%
      \cancelfalse      \def\theskipper{\newpage}%
      \def\theopen{\hskip2em}%
    }{\ifnextchar2{%
      \cancelfalse      \def\theopen{\hskip2em}%
    }{\ifnextchar3{%
      \cancelfalse      \def\theskipper{\newpage}%
      \def\theopen{\hskip4em}%
    }{\ifnextchar4{%
      \cancelfalse      \def\theopen{\hskip4em}%
    }{% else
      \ifcancel\else \def\theskipper{\newpage}\fi
      \cancelfalse      \def\headcheck@type{norm}%
      \def\themodtitle{#1{#2}}%
    }}}}}%
    \theskipper }
\newcommand{\code}{%
  \rightskip=\z@  plus 100pt minus 10pt
  \sfcode`;=3000    \pretolerance \@M
  \hyphenpenalty 9999  \exhyphenpenalty \@M
  \global\ind=2 \1 \startline
  \startcodehook} % \def\code
\let\old@=\@   \let\old@S=\S  \let\old@percent=\%
\let\old@hash=\#
\chardef\code@=`\@
\def\tt@percent{\hbox{\tt\char`\%}}  \def\tt@hash{\hbox{\tt\char`\#}}
\def\startcodehook{\let\@=\code@  \let\S=\equiv  \let\%=\tt@percent
  \let\#=\tt@hash  \def\^{\hbox{\tt\char`\^}}}
\def\endcodehook{\let\@=\old@  \let\S=\old@S  \let\%=\old@percent
  \let\#=\old@hash  \def\^##1{{\accent94 ##1}}}
\def\Q{\rightskip=\z@   \sfcode`;=1500  \pretolerance 200
  \endcodehook}
\def\DC{\endcodehook \egroup}
\def\CD{\relax
  \ifmmode \hbox\fi \bgroup \startcodehook}
\newcommand{\U}{\note{This code is used in}}
\def\X#1:#2\X{%
  \ifmmode \gdef\XX{\null$\null}\else \gdef\XX{}\fi
  \XX$\langle\,$#2{\footnotesize \kern.5em #1}$\,\rangle$\XX }
\def\XF#1:#2\XF{%
  \ifmmode \gdef\XX{\null$\null}\else \gdef\XX{}\fi
  \XX {\tt (#2{\footnotesize \kern.5em #1})}\XX}
\newcommand{\Y}{\par\yskip}
\let\yskip=\smallskip
\newcommand{\D}{\defin{define}} % macro definition
\newcommand{\F}{\defin{format}} % format definition
\newcommand{\defin}[1]{\global\advance\ind by 2 \1\res{#1 }}
\newcommand{\DO}{\hbox{\sl\char'044}}    % slant dollar sign (used by awkweb)
\let\G=\ge                      % greater than or equal sign
\let\I=\ne                      % unequal sign
\let\K=\gets                    % left arrow
\let\L=\le                      % less than or equal sign
\let\R=\lnot                    % logical not
\let\TI=\sim                    % tilde
\let\V=\lor                     % logical or
\let\W=\land                    % logical and
\def\vert{|}   \let\amp=\&   \let\PP=\P   \let\*=*
\def\AT!{@}
\def\ch{\note{The following sections were changed by the change file:}
  \let\*=\relax}
\def\inx{%
  \typeout{Index:}
  \begin{multicols}{2}
  \parskip \z@  plus .5pt
  \parfillskip \z@  plus .6\hsize % try to avoid almost empty lines
  \outer\def\:##1, {\par\hangindent2em\noindent##1:\kern1em} % index entry
  \rm  \tolerance \@M  \let\*=\lapstar
  \hyphenpenalty \@M \parindent=\z@  }
\def\fin{%
  \end{multicols}  \newpage
  \parfillskip \z@  plus 1fil
  \markboth{{\protect\small NAMES OF THE SECTIONS}\hfill
      {\protect\small\@title}}
    {{\protect\small\@title}\hfill
    {\protect\small NAMES OF THE SECTIONS\quad}}
  \typeout{Section names:}
  \def\note##1##2.{\quad{\footnotesize##1 ##2.}}
  \def\U{\note{Used in}}%
  \def\:{\par\hangindent 2em}\let\*=*}
\newcommand{\con}{\end{document}}
\input{multicol.sty}
\input{\webmacs}
\let\webmacs=\empty

%% \endinput