Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

open-axiom repository from github

24005 views
1
% axiom.sty -- LaTeX support for noweb
2
% DON'T edit this file! Use src/doc/axiom.sty.pamphlet instead.
3
{\obeyspaces\AtBeginDocument{\global\let =\ }} % from texbook, p 381
4
\def\nwopt@nomargintag{\let\nwmargintag=\@gobble}
5
\def\nwopt@margintag{%
6
\def\nwmargintag##1{\leavevmode\llap{##1\kern\nwmarginglue\kern\codemargin}}}
7
\def\nwopt@margintag{%
8
\def\nwmargintag##1{\leavevmode\kern-\codemargin\nwthemargintag{##1}\kern\codemargin}}
9
\def\nwthemargintag#1{\llap{#1\kern\nwmarginglue}}
10
\nwopt@margintag
11
\newdimen\nwmarginglue
12
\nwmarginglue=0.3in
13
\def\nwtagstyle{\footnotesize\Rm}
14
% make \hsize in code sufficient for 88 columns
15
\setbox0=\hbox{\tt m}
16
\newdimen\codehsize
17
\codehsize=91\wd0 % 88 columns wasn't enough; I don't know why
18
\newdimen\codemargin
19
\codemargin=0pt
20
\newdimen\nwdefspace
21
\nwdefspace=\codehsize
22
% need to use \textwidth in {\LaTeX} to handle styles with
23
% non-standard margins (David Bruce). Don't know why we sometimes
24
% wanted \hsize. 27 August 1997.
25
%% \advance\nwdefspace by -\hsize\relax
26
\ifx\textwidth\undefined
27
\advance\nwdefspace by -\hsize\relax
28
\else
29
\advance\nwdefspace by -\textwidth\relax
30
\fi
31
\chardef\other=12
32
\def\setupcode{%
33
\chardef\\=`\\
34
\chardef\{=`\{
35
\chardef\}=`\}
36
\catcode`\$=\other
37
\catcode`\&=\other
38
\catcode`\#=\other
39
\catcode`\%=\other
40
\catcode`\~=\other
41
\catcode`\_=\other
42
\catcode`\^=\other
43
\catcode`\"=\other % fixes problem with german.sty
44
\obeyspaces\Tt
45
}
46
\let\nwlbrace=\{
47
\let\nwrbrace=\}
48
\def\nwendquote{\relax\ifhmode\spacefactor=1000 \fi}
49
{\catcode`\^^M=\active % make CR an active character
50
\gdef\newlines{\catcode`\^^M=\active % make CR an active character
51
\def^^M{\par\startline}}%
52
\gdef\eatline#1^^M{\relax}%
53
}
54
%%% DON'T \gdef^^M{\par\startline}}% in case ^^M appears in a \write
55
\def\startline{\noindent\hskip\parindent\ignorespaces}
56
\def\nwnewline{\ifvmode\else\hfil\break\leavevmode\hbox{}\fi}
57
\def\setupmodname{%
58
\catcode`\$=3
59
\catcode`\&=4
60
\catcode`\#=6
61
\catcode`\%=14
62
\catcode`\~=13
63
\catcode`\_=8
64
\catcode`\^=7
65
\catcode`\ =10
66
\catcode`\^^M=5
67
\let\{\nwlbrace
68
\let\}\nwrbrace
69
% bad news --- don't know what catcode to give "
70
\Rm}
71
\def\LA{\begingroup\maybehbox\bgroup\setupmodname\It$\langle$}
72
\def\RA{\/$\rangle$\egroup\endgroup}
73
\def\code{\leavevmode\begingroup\setupcode\newlines}
74
\def\edoc{\endgroup}
75
\let\maybehbox\relax
76
\newbox\equivbox
77
\setbox\equivbox=\hbox{$\equiv$}
78
\newbox\plusequivbox
79
\setbox\plusequivbox=\hbox{$\mathord{+}\mathord{\equiv}$}
80
% \moddef can't have an argument because there might be \code...\edoc
81
\def\moddef{\leavevmode\kern-\codemargin\LA}
82
\def\endmoddef{\RA\ifmmode\equiv\else\unhcopy\equivbox\fi
83
\nobreak\hfill\nobreak}
84
\def\plusendmoddef{\RA\ifmmode\mathord{+}\mathord{\equiv}\else\unhcopy\plusequivbox\fi
85
\nobreak\hfill\nobreak}
86
\def\chunklist{%
87
\errhelp{I changed \chunklist to \nowebchunks.
88
I'll try to avoid such incompatible changes in the future.}%
89
\errmessage{Use \string\nowebchunks\space instead of \string\chunklist}}
90
\def\nowebchunks{\message{<Warning: You need noweave -x to use \string\nowebchunks>}}
91
\def\nowebindex{\message{<Warning: You need noweave -index to use \string\nowebindex>}}
92
% here is support for the new-style (capitalized) font-changing commands
93
% thanks to Dave Love
94
\ifx\documentstyle\undefined
95
\let\Rm=\rm \let\It=\it \let\Tt=\tt % plain
96
\else\ifx\selectfont\undefined
97
\let\Rm=\rm \let\It=\it \let\Tt=\tt % LaTeX OFSS
98
\else % LaTeX NFSS
99
\def\Rm{\reset@font\rm}
100
\def\It{\reset@font\it}
101
\def\Tt{\reset@font\tt}
102
\def\Bf{\reset@font\bf}
103
\fi\fi
104
\ifx\reset@font\undefined \let\reset@font=\relax \fi
105
\def\noweboptions#1{%
106
\def\@nwoptionlist{#1}%
107
\@for\@nwoption:=\@nwoptionlist\do{%
108
\@ifundefined{nwopt@\@nwoption}{%
109
\@latexerr{There is no such noweb option as '\@nwoption'}\@eha}{%
110
\csname nwopt@\@nwoption\endcsname}}}
111
\codemargin=10pt
112
\advance\codehsize by \codemargin % make room for indentation of code
113
\advance\nwdefspace by \codemargin % and fix adjustment for def/use
114
\def\setcodemargin#1{%
115
\advance\codehsize by -\codemargin % make room for indentation of code
116
\advance\nwdefspace by -\codemargin % and fix adjustment for def/use
117
\codemargin=#1
118
\advance\codehsize by \codemargin % make room for indentation of code
119
\advance\nwdefspace by \codemargin % and fix adjustment for
120
% def/use
121
}
122
\def\nwopt@shift{%
123
\dimen@=-0.8in
124
\if@twoside % Values for two-sided printing:
125
\advance\evensidemargin by \dimen@
126
\else % Values for one-sided printing:
127
\advance\evensidemargin by \dimen@
128
\advance\oddsidemargin by \dimen@
129
\fi
130
% \advance \marginparwidth -\dimen@
131
}
132
\let\nwopt@noshift\@empty
133
\def\nwbegincode#1{%
134
\begingroup
135
\topsep \nwcodetopsep
136
\@beginparpenalty \@highpenalty
137
\@endparpenalty -\@highpenalty
138
\@begincode }
139
\def\nwendcode{\endtrivlist \endgroup \filbreak} % keeps code on 1 page
140
141
\newenvironment{webcode}{%
142
\@begincode
143
}{%
144
\endtrivlist}
145
\def\@begincode{%
146
\trivlist \item[]%
147
\leftskip\@totalleftmargin \advance\leftskip\codemargin
148
\rightskip\hsize \advance\rightskip -\codehsize
149
\parskip\z@ \parindent\z@ \parfillskip\@flushglue
150
\linewidth\codehsize
151
\@@par
152
\def\par{\leavevmode\null \@@par \penalty\nwcodepenalty}%
153
\obeylines
154
\@noligs \ifx\verbatim@nolig@list\undefined\else
155
\let\do=\nw@makeother \verbatim@nolig@list \do@noligs\`
156
\fi
157
\setupcode \frenchspacing \@vobeyspaces
158
\nowebsize \setupcode
159
\let\maybehbox\mbox }
160
\newskip\nwcodetopsep \nwcodetopsep = 3pt plus 1.2pt minus 1pt
161
\let\nowebsize=\normalsize
162
\def\nwopt@tinycode{\let\nowebsize=\tiny}
163
\def\nwopt@footnotesizecode{\let\nowebsize=\footnotesize}
164
\def\nwopt@scriptsizecode{\let\nowebsize=\scriptsize}
165
\def\nwopt@smallcode{\let\nowebsize=\small}
166
\def\nwopt@normalsizecode{\let\nowebsize=\normalsize}
167
\def\nwopt@largecode{\let\nowebsize=\large}
168
\def\nwopt@Largecode{\let\nowebsize=\Large}
169
\def\nwopt@LARGEcode{\let\nowebsize=\LARGE}
170
\def\nwopt@hugecode{\let\nowebsize=\huge}
171
\def\nwopt@Hugecode{\let\nowebsize=\Huge}
172
\newcount\nwcodepenalty \nwcodepenalty=\@highpenalty
173
\def\nw@makeother#1{\catcode`#1=12 }
174
\def\nwbegindocs#1{\ifvmode\noindent\fi}
175
\let\nwenddocs=\relax
176
\let\nwdocspar=\filbreak
177
\raggedbottom
178
\def\code{\leavevmode\begingroup\setupcode\@vobeyspaces\obeylines}
179
\let\edoc=\endgroup
180
\newdimen\@original@textwidth
181
\def\ps@noweb{%
182
\@original@textwidth=\textwidth
183
\let\@mkboth\@gobbletwo
184
\def\@oddfoot{}\def\@evenfoot{}% No feet.
185
\if@twoside % If two-sided printing.
186
\def\@evenhead{\hbox to \@original@textwidth{%
187
\Rm \thepage\qquad{\Tt\leftmark}\hfil\today}}% Left heading.
188
\def\@oddhead{\hbox to \@original@textwidth{%
189
\Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading.
190
\else % If one-sided printing.
191
\def\@oddhead{\hbox to \@original@textwidth{%
192
\Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading.
193
\let\@evenhead\@oddhead
194
\fi
195
\let\chaptermark\@gobble
196
\let\sectionmark\@gobble
197
\let\subsectionmark\@gobble
198
\let\subsubsectionmark\@gobble
199
\let\paragraphmark\@gobble
200
\let\subparagraphmark\@gobble
201
\def\nwfilename{\begingroup\let\do\@makeother\dospecials
202
\catcode`\{=1 \catcode`\}=2 \nw@filename}
203
\def\nw@filename##1{\endgroup\markboth{##1}{##1}\let\nw@filename=\nw@laterfilename}%
204
}
205
\def\nw@laterfilename#1{\endgroup\clearpage \markboth{#1}{#1}}
206
\let\nwfilename=\@gobble
207
\def\nwcodecomment#1{\@@par\penalty\nwcodepenalty
208
\if@firstnwcodecomment
209
\vskip\nwcodecommentsep\penalty\nwcodepenalty\@firstnwcodecommentfalse
210
\fi%
211
\hspace{-\codemargin}{%
212
\rightskip=0pt plus1in
213
\interlinepenalty\nwcodepenalty
214
\let\\\relax\footnotesize\Rm #1\@@par\penalty\nwcodepenalty}}
215
\def\@nwalsodefined#1{\nwcodecomment{\@nwlangdepdef\ \nwpageprep\ \@pagesl{#1}.}}
216
\def\@nwused#1{\nwcodecomment{\@nwlangdepcud\ \nwpageprep\ \@pagesl{#1}.}}
217
\def\@nwnotused#1{\nwcodecomment{\@nwlangdeprtc.}}
218
\def\nwoutput#1{\nwcodecomment{\@nwlangdepcwf\ {\Tt \@stripstar#1*\stripped}.}}
219
\def\@stripstar#1*#2\stripped{#1}
220
\newcommand{\nwprevdefptr}[1]{%
221
\mbox{$\mathord{\triangleleft}\,\mathord{\mbox{\subpageref{#1}}}$}}
222
\newcommand{\nwnextdefptr}[1]{%
223
\mbox{$\mathord{\mbox{\subpageref{#1}}}\,\mathord{\triangleright}$}}
224
225
\newcommand{\@nwprevnextdefs}[2]{%
226
{\nwtagstyle
227
\ifx\relax#1\else ~~\nwprevdefptr{#1}\fi
228
\ifx\relax#2\else ~~\nwnextdefptr{#2}\fi}}
229
\newcommand{\@nwusesondefline}[1]{{\nwtagstyle~~(\@pagenumsl{#1})}}
230
\newcommand{\@nwstartdeflinemarkup}{\nobreak\hskip 1.5em plus 1fill\nobreak}
231
\newcommand{\@nwenddeflinemarkup}{\nobreak\hskip \nwdefspace minus\nwdefspace\nobreak}
232
\def\nwopt@longxref{%
233
\let\nwalsodefined\@nwalsodefined
234
\let\nwused\@nwused
235
\let\nwnotused\@nwnotused
236
\let\nwprevnextdefs\@gobbletwo
237
\let\nwusesondefline\@gobble
238
\let\nwstartdeflinemarkup\relax
239
\let\nwenddeflinemarkup\relax
240
}
241
\def\nwopt@shortxref{%
242
\let\nwalsodefined\@gobble
243
\let\nwused\@gobble
244
\let\nwnotused\@gobble
245
\let\nwprevnextdefs\@nwprevnextdefs
246
\let\nwusesondefline\@nwusesondefline
247
\let\nwstartdeflinemarkup\@nwstartdeflinemarkup
248
\let\nwenddeflinemarkup\@nwenddeflinemarkup
249
}
250
\def\nwopt@noxref{%
251
\let\nwalsodefined\@gobble
252
\let\nwused\@gobble
253
\let\nwnotused\@gobble
254
\let\nwprevnextdefs\@gobbletwo
255
\let\nwusesondefline\@gobble
256
\let\nwstartdeflinemarkup\relax
257
\let\nwenddeflinemarkup\relax
258
}
259
\nwopt@shortxref % to hell with backward compatibility!
260
\newskip\nwcodecommentsep \nwcodecommentsep=3pt plus 1pt minus 1pt
261
\newif\if@firstnwcodecomment\@firstnwcodecommenttrue
262
\newcount\@nwlopage\newcount\@nwhipage % range lo..hi-1
263
\newcount\@nwlosub % subpage of lo
264
\newcount\@nwhisub % subpage of hi
265
\def\@nwfirstpage#1#2#3{% subpage page xref-tag
266
\@nwlopage=#2 \@nwlosub=#1
267
\def\@nwloxreftag{#3}%
268
\advance\@nwpagecount by \@ne
269
\@nwhipage=\@nwlopage\advance\@nwhipage by \@ne }
270
\def\@nwnextpage#1#2#3{% subpage page xref-tag
271
\ifnum\@nwhipage=#2
272
\advance\@nwhipage by \@ne
273
\advance\@nwpagecount by \@ne
274
\@nwhisub=#1
275
\def\@nwhixreftag{#3}\else
276
\ifnum#2<\@nwlopage \advance\@nwhipage by \m@ne
277
\ifnum\@nwhipage=\@nwlopage
278
\edef\@tempa{\noexpand\noexpand\noexpand\\%
279
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
280
{\@nwloxreftag}}}%
281
\else
282
\count@=\@nwhipage \advance\count@ by \m@ne
283
\ifnum\count@=\@nwlopage % consecutive pages
284
\edef\@tempa{\noexpand\noexpand\noexpand\\%
285
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
286
{\@nwloxreftag}}%
287
\noexpand\noexpand\noexpand\\%
288
{{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
289
{\@nwhixreftag}}}%
290
\else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
291
\count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
292
\ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
293
\count@=\@nwlopage \divide\count@ by 100
294
\@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
295
\ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi
296
\multiply\@nwpagetemp by 100
297
\advance \@nwhipage by -\@nwpagetemp
298
\edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
299
\else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
300
\fi
301
\fi
302
\fi%
303
\fi
304
\fi%
305
\edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else
306
\ifnum#2>\@nwhipage \advance\@nwhipage by \m@ne
307
\ifnum\@nwhipage=\@nwlopage
308
\edef\@tempa{\noexpand\noexpand\noexpand\\%
309
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
310
{\@nwloxreftag}}}%
311
\else
312
\count@=\@nwhipage \advance\count@ by \m@ne
313
\ifnum\count@=\@nwlopage % consecutive pages
314
\edef\@tempa{\noexpand\noexpand\noexpand\\%
315
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
316
{\@nwloxreftag}}%
317
\noexpand\noexpand\noexpand\\%
318
{{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
319
{\@nwhixreftag}}}%
320
\else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
321
\count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
322
\ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
323
\count@=\@nwlopage \divide\count@ by 100
324
\@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
325
\ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi
326
\multiply\@nwpagetemp by 100
327
\advance \@nwhipage by -\@nwpagetemp
328
\edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
329
\else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
330
\fi
331
\fi
332
\fi%
333
\fi
334
\fi%
335
\edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else
336
\@nwlosub=0 \@nwhisub=0
337
\fi\fi\fi
338
}
339
\newcount\@nwpagetemp
340
\newcount\@nwpagecount
341
\def\@nwfirstpagel#1{% label
342
\@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}%
343
\nwix@cons\nw@pages{\\{\bf ??}}}{%
344
\edef\@tempa{\noexpand\@nwfirstpage\subpagepair{#1}{#1}}\@tempa}}
345
\def\@nwnextpagel#1{% label
346
\@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}%
347
\nwix@cons\nw@pages{\\{\bf ??}}}{%
348
\edef\@tempa{\noexpand\@nwnextpage\subpagepair{#1}{#1}}\@tempa}}
349
\def\@pagesl#1{% list of labels
350
\gdef\nw@pages{}\@nwpagecount=0
351
\def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1%
352
\advance\@nwhipage by \m@ne
353
\ifnum\@nwhipage=\@nwlopage
354
\edef\@tempa{\noexpand\noexpand\noexpand\\%
355
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
356
{\@nwloxreftag}}}%
357
\else
358
\count@=\@nwhipage \advance\count@ by \m@ne
359
\ifnum\count@=\@nwlopage % consecutive pages
360
\edef\@tempa{\noexpand\noexpand\noexpand\\%
361
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
362
{\@nwloxreftag}}%
363
\noexpand\noexpand\noexpand\\%
364
{{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
365
{\@nwhixreftag}}}%
366
\else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
367
\count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
368
\ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
369
\count@=\@nwlopage \divide\count@ by 100
370
\@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
371
\ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi
372
\multiply\@nwpagetemp by 100
373
\advance \@nwhipage by -\@nwpagetemp
374
\edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
375
\else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
376
\fi
377
\fi
378
\fi%
379
\fi
380
\fi%
381
\edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@nwhyperpagenum##1}%
382
\ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}}
383
\def\@nwhyperpagenum#1#2{\nwhyperreference{#2}{#1}}
384
385
\def\@pagenumsl#1{% list of labels -- doesn't include word `pages', commas, or `and'
386
\gdef\nw@pages{}\@nwpagecount=0
387
\def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1%
388
\advance\@nwhipage by \m@ne
389
\ifnum\@nwhipage=\@nwlopage
390
\edef\@tempa{\noexpand\noexpand\noexpand\\%
391
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
392
{\@nwloxreftag}}}%
393
\else
394
\count@=\@nwhipage \advance\count@ by \m@ne
395
\ifnum\count@=\@nwlopage % consecutive pages
396
\edef\@tempa{\noexpand\noexpand\noexpand\\%
397
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
398
{\@nwloxreftag}}%
399
\noexpand\noexpand\noexpand\\%
400
{{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
401
{\@nwhixreftag}}}%
402
\else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
403
\count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
404
\ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
405
\count@=\@nwlopage \divide\count@ by 100
406
\@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
407
\ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi
408
\multiply\@nwpagetemp by 100
409
\advance \@nwhipage by -\@nwpagetemp
410
\edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
411
\else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
412
\fi
413
\fi
414
\fi%
415
\fi
416
\fi%
417
\edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa%
418
\def\\##1{\@nwhyperpagenum##1\let\\=\@nwpagenumslrest}\nw@pages}
419
\def\@nwpagenumslrest#1{~\@nwhyperpagenum#1}
420
\def\subpages#1{% list of {{subpage}{page}}
421
\gdef\nw@pages{}\@nwpagecount=0
422
\def\\##1{\edef\@tempa{\noexpand\@nwfirstpage##1{}}\@tempa
423
\def\\####1{\edef\@tempa{\noexpand\@nwnextpage####1}\@tempa}}#1%
424
\advance\@nwhipage by \m@ne
425
\ifnum\@nwhipage=\@nwlopage
426
\edef\@tempa{\noexpand\noexpand\noexpand\\%
427
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
428
{\@nwloxreftag}}}%
429
\else
430
\count@=\@nwhipage \advance\count@ by \m@ne
431
\ifnum\count@=\@nwlopage % consecutive pages
432
\edef\@tempa{\noexpand\noexpand\noexpand\\%
433
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
434
{\@nwloxreftag}}%
435
\noexpand\noexpand\noexpand\\%
436
{{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
437
{\@nwhixreftag}}}%
438
\else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
439
\count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
440
\ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
441
\count@=\@nwlopage \divide\count@ by 100
442
\@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
443
\ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi
444
\multiply\@nwpagetemp by 100
445
\advance \@nwhipage by -\@nwpagetemp
446
\edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
447
\else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
448
\fi
449
\fi
450
\fi%
451
\fi
452
\fi%
453
\edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@firstoftwo##1}%
454
\ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}}
455
\def\@nwaddrange{\advance\@nwhipage by \m@ne
456
\ifnum\@nwhipage=\@nwlopage
457
\edef\@tempa{\noexpand\noexpand\noexpand\\%
458
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
459
{\@nwloxreftag}}}%
460
\else
461
\count@=\@nwhipage \advance\count@ by \m@ne
462
\ifnum\count@=\@nwlopage % consecutive pages
463
\edef\@tempa{\noexpand\noexpand\noexpand\\%
464
{{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
465
{\@nwloxreftag}}%
466
\noexpand\noexpand\noexpand\\%
467
{{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
468
{\@nwhixreftag}}}%
469
\else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
470
\count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
471
\ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
472
\count@=\@nwlopage \divide\count@ by 100
473
\@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
474
\ifnum\count@=\@nwpagetemp % lo--least 2 digits of hi
475
\multiply\@nwpagetemp by 100
476
\advance \@nwhipage by -\@nwpagetemp
477
\edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
478
\else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
479
\fi
480
\fi
481
\fi%
482
\fi
483
\fi%
484
\edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa}
485
\def\nwpageword{\@nwlangdepchk} % chunk, was page
486
\def\nwpagesword{\@nwlangdepchks} % chunk, was page
487
\def\nwpageprep{\@nwlangdepin} % in, was on
488
\newcommand\nw@genericref[2]{% what to do, name of ref
489
\expandafter\nw@g@nericref\csname r@#2\endcsname#1{#2}}
490
\newcommand\nw@g@nericref[3]{% control sequence, what to do, name
491
\ifx#1\relax
492
\ref{#3}% trigger the standard `undefined ref' mechanisms
493
\else
494
\expandafter#2#1.\\%
495
\fi}
496
\def\nw@selectone#1#2#3\\{#1}
497
\def\nw@selecttwo#1#2#3\\{#2}
498
\def\nw@selectonetwo#1#2#3\\{{#1}{#2}}
499
\newcommand{\subpageref}[1]{%
500
\nwhyperreference{#1}{\nw@genericref\@subpageref{#1}}}
501
\def\@subpageref#1#2#3\\{%
502
\@ifundefined{2on#2}{#2}{\nwthepagenum{#1}{#2}}}
503
\newcommand{\subpagepair}[1]{% % produces {subpage}{page}
504
\@ifundefined{r@#1}%
505
{{0}{0}}%
506
{\nw@genericref\@subpagepair{#1}}}
507
\def\@subpagepair#1#2#3\\{%
508
\@ifundefined{2on#2}{{0}{#2}}{{#1}{#2}}}
509
\newcommand{\sublabel}[1]{%
510
\@bsphack
511
\nwblindhyperanchor{#1}%
512
\if@filesw {\let\thepage\relax
513
\def\protect{\noexpand\noexpand\noexpand}%
514
\edef\@tempa{\write\@auxout{\string
515
\newsublabel{#1}{{}{\thepage}}}}%
516
\expandafter}\@tempa
517
\if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
518
\newcommand{\nosublabel}[1]{%
519
\@bsphack\if@filesw {\let\thepage\relax
520
\def\protect{\noexpand\noexpand\noexpand}%
521
\edef\@tempa{\write\@auxout{\string
522
\newlabel{#1}{{0}{\thepage}}}}%
523
\expandafter}\@tempa
524
\if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
525
\newcommand\newsublabel{%
526
\nw@settrailers
527
\global\let\newsublabel\@newsublabel
528
\@newsublabel}
529
\newcommand{\@newsublabel}[2]{%
530
\edef\this@page{\@cdr#2\@nil}%
531
\ifx\this@page\last@page\else
532
\sub@page=\z@
533
\fi
534
\edef\last@page{\this@page}
535
\advance\sub@page by \@ne
536
\ifnum\sub@page=\tw@
537
\global\@namedef{2on\this@page}{}%
538
\fi
539
\pendingsublabel{#1}%
540
\edef\@tempa##1{\noexpand\newlabel{##1}%
541
{{\number\sub@page}{\this@page}\nw@labeltrailers}}%
542
\pending@sublabels
543
\def\pending@sublabels{}}
544
\newcommand\nw@settrailers{% -- won't work on first run
545
\@ifpackageloaded{nameref}%
546
{\gdef\nw@labeltrailers{{}{}{}}}%
547
{\gdef\nw@labeltrailers{}}}
548
\renewcommand\nw@settrailers{%
549
\@ifundefined{@secondoffive}%
550
{\gdef\nw@labeltrailers{}}%
551
{\gdef\nw@labeltrailers{{}{}{}}}}
552
\newcommand{\nextchunklabel}[1]{%
553
\nwblindhyperanchor{#1}% % looks slightly bogus --- nr
554
\@bsphack\if@filesw {\let\thepage\relax
555
\edef\@tempa{\write\@auxout{\string\pendingsublabel{#1}}}%
556
\expandafter}\@tempa
557
\if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
558
\newcommand\pendingsublabel[1]{%
559
\def\@tempa{\noexpand\@tempa}%
560
\edef\pending@sublabels{\noexpand\@tempa{#1}\pending@sublabels}}
561
\def\pending@sublabels{}
562
\def\last@page{\relax}
563
\newcount\sub@page
564
\def\@alphasubpagenum#1#2{#2\ifnum#1=0 \else\@alph{#1}\fi}
565
\def\@nosubpagenum#1#2{#2}
566
\def\@numsubpagenum#1#2{#2\ifnum#1=0 \else.\@arabic{#1}\fi}
567
\def\nwopt@nosubpage{\let\nwthepagenum=\@nosubpagenum\nwopt@nomargintag}
568
\def\nwopt@numsubpage{\let\nwthepagenum=\@numsubpagenum}
569
\def\nwopt@alphasubpage{\let\nwthepagenum=\@alphasubpagenum}
570
\nwopt@alphasubpage
571
\newcount\@nwalph@n
572
\let\@nwalph@d\@tempcnta
573
\let\@nwalph@bound\@tempcntb
574
\def\@nwlongalph#1{{%
575
\@nwalph@n=#1\advance\@nwalph@n by-1
576
\@nwalph@bound=26
577
\loop\ifnum\@nwalph@n<\@nwalph@bound\else
578
\advance\@nwalph@n by -\@nwalph@bound
579
\multiply\@nwalph@bound by 26
580
\repeat
581
\loop\ifnum\@nwalph@bound>1
582
\divide\@nwalph@bound by 26
583
\@nwalph@d=\@nwalph@n\divide\@nwalph@d by \@nwalph@bound
584
% d := d * bound ; n -:= d; d := d / bound --- saves a temporary
585
\multiply\@nwalph@d by \@nwalph@bound
586
\advance\@nwalph@n by -\@nwalph@d
587
\divide\@nwalph@d by \@nwalph@bound
588
\advance\@nwalph@d by 1 \@alph{\@nwalph@d}%
589
\repeat
590
}}
591
\newcount\nw@chunkcount
592
\nw@chunkcount=\@ne
593
\newcommand{\weblabel}[1]{%
594
\@bsphack
595
\nwblindhyperanchor{#1}%
596
\if@filesw {\let\thepage\relax
597
\def\protect{\noexpand\noexpand\noexpand}%
598
\edef\@tempa{\write\@auxout{\string
599
\newsublabel{#1}{{}{\number\nw@chunkcount}}}}%
600
\expandafter}\@tempa
601
\global\advance\nw@chunkcount by \@ne
602
\if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
603
\def\nwopt@webnumbering{%
604
\let\sublabel=\weblabel
605
\def\nwpageword{chunk}\def\nwpagesword{chunks}%
606
\def\nwpageprep{in}}
607
% \nwindexdefn{printable name}{identifying label}{label of chunk}
608
% \nwindexuse{printable name}{identifying label}{label of chunk}
609
610
\def\nwindexdefn#1#2#3{\@auxix{\protect\nwixd}{#2}{#3}}
611
\def\nwindexuse#1#2#3{\@auxix{\protect\nwixu}{#2}{#3}}
612
613
\def\@auxix#1#2#3{% {marker}{id label}{subpage label}
614
\@bsphack\if@filesw {\let\nwixd\relax\let\nwixu\relax
615
\def\protect{\noexpand\noexpand\noexpand}%
616
\edef\@tempa{\write\@auxout{\string\nwixadd{#1}{#2}{#3}}}%
617
\expandafter}\@tempa
618
\if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
619
% \nwixadd{marker}{idlabel}{subpage label}
620
\def\nwixadd#1#2#3{%
621
\@ifundefined{nwixl@#2}%
622
{\global\@namedef{nwixl@#2}{#1{#3}}}%
623
{\expandafter\nwix@cons\csname nwixl@#2\endcsname{#1{#3}}}}
624
\def\@nwsubscriptident#1#2{\mbox{$\mbox{#1}_{\mathrm{\subpageref{#2}}}$}}
625
\def\@nwnosubscriptident#1#2{#1}
626
\def\@nwhyperident#1#2{\leavevmode\nwhyperreference{#2}{#1}}
627
\def\nwopt@subscriptidents{%
628
\let\nwlinkedidentq\@nwsubscriptident
629
\let\nwlinkedidentc\@nwsubscriptident
630
}
631
\def\nwopt@nosubscriptidents{%
632
\let\nwlinkedidentq\@nwnosubscriptident
633
\let\nwlinkedidentc\@nwnosubscriptident
634
}
635
\def\nwopt@hyperidents{%
636
\let\nwlinkedidentq\@nwhyperident
637
\let\nwlinkedidentc\@nwhyperident
638
}
639
\def\nwopt@nohyperidents{%
640
\let\nwlinkedidentq\@nwnosubscriptident
641
\let\nwlinkedidentc\@nwnosubscriptident
642
}
643
\def\nwopt@subscriptquotedidents{%
644
\let\nwlinkedidentq\@nwsubscriptident
645
}
646
\def\nwopt@nosubscriptquotedidents{%
647
\let\nwlinkedidentq\@nwnosubscriptident
648
}
649
\def\nwopt@hyperquotedidents{%
650
\let\nwlinkedidentq\@nwhyperident
651
}
652
\def\nwopt@nohyperquotedidents{%
653
\let\nwlinkedidentq\@nwnosubscriptident
654
}
655
\nwopt@hyperidents
656
\newcount\@commacount
657
\def\commafy#1{%
658
{\nwix@listcount{#1}\@commacount=\nwix@counter
659
\let\@comma@each=\\%
660
\ifcase\@commacount\let\\=\@comma@each\or\let\\=\@comma@each\or
661
\def\\{\def\\{ \@nwlangdepand\ \@comma@each}\@comma@each}\else
662
\def\\{\def\\{, %
663
\advance\@commacount by \m@ne
664
\ifnum\@commacount=1 \@nwlangdepand~\fi\@comma@each}\@comma@each}\fi
665
#1}}
666
\def\nwix@cons#1#2{% {list}{\marker{element}}
667
{\toks0=\expandafter{#1}\def\@tempa{#2}\toks2=\expandafter{\@tempa}%
668
\xdef#1{\the\toks0 \the\toks2 }}}
669
\def\nwix@uses#1{% {label}
670
\def\nwixu{\\}\let\nwixd\@gobble\@nameuse{nwixl@#1}}
671
\def\nwix@defs#1{% {label}
672
\def\nwixd{\\}\let\nwixu\@gobble\@nameuse{nwixl@#1}}
673
\newcount\nwix@counter
674
\def\nwix@listcount#1{% {list with \\}
675
{\count@=0
676
\def\\##1{\advance\count@ by \@ne }%
677
#1\global\nwix@counter=\count@ }}
678
\def\nwix@usecount#1{\nwix@listcount{\nwix@uses{#1}}}
679
\def\nwix@defcount#1{\nwix@listcount{\nwix@defs{#1}}}
680
\def\nwix@id@defs#1{% index pair
681
{{\Tt \@car#1\@nil}%
682
\def\\##1{~\subpageref{##1}}\nwix@defs{\@cdr#1\@nil}}}
683
\def\nwidentuses#1{% list of index pairs
684
\nwcodecomment{\@nwlangdepuss\ \let\\=\nwix@id@defs\commafy{#1}.}}
685
\def\nwix@totaluses#1{% list of index pairs
686
{\count@=0
687
\def\\##1{\nwix@usecount{\@cdr##1\@nil}\advance\count@ by\nwix@counter}%
688
#1\global\nwix@counter\count@ }}
689
\def\nwix@id@uses#1#2{% {ident}{label}
690
\nwix@usecount{#2}\ifnum\nwix@counter>0
691
{\advance\leftskip by \codemargin
692
\nwcodecomment{{\Tt #1}, \@nwlangdepusd\ \nwpageprep\ \@pagesl{\nwix@uses{#2}}.}}%
693
\else
694
\ifnw@hideunuseddefs\else
695
{\advance\leftskip by \codemargin \nwcodecomment{{\Tt #1}, \@nwlangdepnvu.}}%
696
\fi
697
\fi}
698
\def\nwidentdefs#1{% list of index pairs
699
\ifnw@hideunuseddefs\nwix@totaluses{#1}\else\nwix@listcount{#1}\fi
700
\ifnum\nwix@counter>0
701
\nwcodecomment{\@nwlangdepdfs:}%
702
{\def\\##1{\nwix@id@uses ##1}#1}%
703
\fi}
704
\newif\ifnw@hideunuseddefs\nw@hideunuseddefsfalse
705
\def\nwopt@hideunuseddefs{\nw@hideunuseddefstrue}
706
\def\nwopt@noidentxref{%
707
\let\nwidentdefs\@gobble
708
\let\nwidentuses\@gobble}
709
\def\nw@underlinedefs{% {list with \nwixd, \nwixu}
710
\let\\=\relax\def\nw@comma{, }
711
\def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}%
712
\def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}}
713
714
\def\nw@indexline#1#2{%
715
{\indent {\Tt #1}: \nw@underlinedefs\@nameuse{nwixl@#2}\par}}
716
717
\newenvironment{thenowebindex}{\parindent=-10pt \parskip=\z@
718
\advance\leftskip by 10pt
719
\advance\rightskip by 0pt plus1in\par\@afterindenttrue
720
\def\\##1{\nw@indexline##1}}{}
721
\def\nowebindex{%
722
\@ifundefined{nwixs@i}%
723
{\@warning{The \string\nowebindex\space is empty}}%
724
{\begin{thenowebindex}\@nameuse{nwixs@i}\end{thenowebindex}}}
725
\def\nowebindex@external{%
726
{\let\nwixadds@c=\@gobble
727
\def\nwixadds@i##1{\nw@indexline##1}%
728
\def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}%
729
\begin{thenowebindex}\@input{\jobname.nwi}\end{thenowebindex}}}
730
\def\nwixlogsorted#1#2{% list data
731
\@bsphack\if@filesw
732
\toks0={#2}\immediate\write\@auxout{\string\nwixadds{#1}{\the\toks0}}
733
\if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
734
\def\nwixadds#1#2{%
735
\@ifundefined{nwixs@#1}%
736
{\global\@namedef{nwixs@#1}{\\{#2}}}%
737
{\expandafter\nwix@cons\csname nwixs@#1\endcsname{\\{#2}}}}
738
\let\nwixaddsx=\@gobbletwo
739
\def\nwopt@externalindex{%
740
\ifx\nwixadds\@gobbletwo % already called
741
\else
742
\let\nwixaddsx=\nwixadds \let\nwixadds=\@gobbletwo
743
\let\nowebindex=\nowebindex@external
744
\let\nowebchunks=\nowebchunks@external
745
\fi}
746
\def\nowebchunks{%
747
\@ifundefined{nwixs@c}%
748
{\@warning{The are no \string\nowebchunks}}%
749
{\begin{thenowebchunks}\@nameuse{nwixs@c}\end{thenowebchunks}}}
750
\def\nowebchunks@external{%
751
{\let\nwixadds@i=\@gobble
752
\def\nwixadds@c##1{\nw@onechunk##1}%
753
\def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}%
754
\begin{thenowebchunks}\@input{\jobname.nwi}\end{thenowebchunks}}}
755
\@namedef{r@nw@notdef}{{0}{(\@nwlangdepnvd)}}
756
\def\nw@chunkunderlinedefs{% {list of labels with \nwixd, \nwixu}
757
\let\\=\relax\def\nw@comma{, }
758
\def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}%
759
\def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}}
760
\def\nw@onechunk#1#2#3{% {name}{label of first definition}{list with \nwixd, \nwixu}
761
\@ifundefined{r@#2}{}{%
762
\indent\LA #1~{\nwtagstyle\subpageref{#2}}\RA
763
\if@nwlongchunks{~\nw@chunkunderlinedefs#3}\fi\par}}
764
\newenvironment{thenowebchunks}{\vskip3pt
765
\parskip=\z@\parindent=-10pt \advance\leftskip by 10pt
766
\advance\rightskip by 0pt plus10pt \@afterindenttrue
767
\def\\##1{\nw@onechunk##1}}{}
768
\newif\if@nwlongchunks
769
\@nwlongchunksfalse
770
\let\nwopt@longchunks\@nwlongchunkstrue
771
\newcommand\@nw@hyper@ref{\hyperreference} % naras
772
\newcommand\@nw@hyper@anc{\blindhyperanchor} % naras
773
\newcommand\@nw@hyperref@ref[2]{\hyperlink{noweb.#1}{#2}} % nr
774
\newcommand\@nw@hyperref@anc[1]{\hypertarget{noweb.#1}{\relax}} % nr
775
%%\renewcommand\@nw@hyperref@ref[2]{{#2}} % nr
776
%%\renewcommand\@nw@hyperref@anc[1]{} % nr
777
\newcommand\nwhyperreference{%
778
\@ifundefined{hyperlink}
779
{\@ifundefined{hyperreference}
780
{\global\let\nwhyperreference\@gobble}
781
{\global\let\nwhyperreference\@nw@hyper@ref}}
782
{\global\let\nwhyperreference\@nw@hyperref@ref}%
783
\nwhyperreference
784
}
785
786
\newcommand\nwblindhyperanchor{%
787
\@ifundefined{hyperlink}
788
{\@ifundefined{hyperreference}
789
{\global\let\nwblindhyperanchor\@gobble}
790
{\global\let\nwblindhyperanchor\@nw@hyper@anc}}
791
{\global\let\nwblindhyperanchor\@nw@hyperref@anc}%
792
\nwblindhyperanchor
793
}
794
\newcommand\nwanchorto{%
795
\begingroup\let\do\@makeother\dospecials
796
\catcode`\{=1 \catcode`\}=2 \nw@anchorto}
797
\newcommand\nw@anchorto[1]{\endgroup\def\nw@next{#1}\nw@anchortofin}
798
\newcommand\nw@anchortofin[1]{#1\footnote{See URL \texttt{\nw@next}.}}
799
\let\nwanchorname\@gobble
800
\newif\ifhtml
801
\htmlfalse
802
\let\nwixident=\relax
803
\def\nwbackslash{\char92}
804
\def\nwlbrace{\char123}
805
\def\nwrbrace{\char125}
806
\def\nwopt@english{%
807
\def\@nwlangdepdef{This definition is continued}%
808
\def\@nwlangdepcud{This code is used}%
809
\def\@nwlangdeprtc{Root chunk (not used in this document)}%
810
\def\@nwlangdepcwf{This code is written to file}%
811
\def\@nwlangdepchk{chunk}%
812
\def\@nwlangdepchks{chunks}%
813
\def\@nwlangdepin{in}%
814
\def\@nwlangdepand{and}%
815
\def\@nwlangdepuss{Uses}%
816
\def\@nwlangdepusd{used}%
817
\def\@nwlangdepnvu{never used}%
818
\def\@nwlangdepdfs{Defines}%
819
\def\@nwlangdepnvd{never defined}%
820
}
821
\let\nwopt@american\nwopt@english
822
\def\nwopt@portuges{%
823
\def\@nwlangdepdef{Defini\c{c}\~ao continuada em}%
824
% This definition is continued
825
\def\@nwlangdepcud{C\'odigo usado em}%
826
% This code is used
827
\def\@nwlangdeprtc{Fragmento de topo (sem uso no documento)}%
828
% Root chunk (not used in this document)
829
\def\@nwlangdepcwf{Este c\'odigo foi escrito no ficheiro}%
830
% This code is written to file
831
\def\@nwlangdepchk{fragmento}%
832
% chunk
833
\def\@nwlangdepchks{fragmentos}%
834
% chunks
835
\def\@nwlangdepin{no(s)}%
836
% in
837
\def\@nwlangdepand{e}%
838
% and
839
\def\@nwlangdepuss{Usa}%
840
% Uses
841
\def\@nwlangdepusd{usado}%
842
% used
843
\def\@nwlangdepnvu{nunca usado}%
844
% never used
845
\def\@nwlangdepdfs{Define}%
846
% Defines
847
\def\@nwlangdepnvd{nunca definido}%
848
% never defined
849
}
850
\def\nwopt@frenchb{%
851
\def\@nwlangdepdef{Cette d\'efinition suit}%
852
% This definition is continued
853
\def\@nwlangdepcud{Ce code est employ\'e}%
854
% This code is used
855
\def\@nwlangdeprtc{Morceau racine (pas employ\'e dans ce document)}%
856
% Root chunk (not used in this document)
857
\def\@nwlangdepcwf{Ce code est \'ecrit aux fichier}%
858
% This code is written to file
859
\def\@nwlangdepchk{le morceau}%
860
% chunk
861
\def\@nwlangdepchks{les morceaux}%
862
% chunks
863
\def\@nwlangdepin{dans}%
864
% in
865
\def\@nwlangdepand{et}%
866
% and
867
\def\@nwlangdepuss{Il emploie}%
868
% Uses
869
\def\@nwlangdepusd{employ\'{e}}%
870
% used
871
\def\@nwlangdepnvu{jamais employ\'{e}}%
872
% never used
873
\def\@nwlangdepdfs{Il d\'{e}fine}%
874
% Defines
875
% Cannot use the accent here: \def\@nwlangdepnvd{jamais d\'{e}fini}%
876
\def\@nwlangdepnvd{jamais defini}%
877
% never defined
878
}
879
\let\nwopt@french\nwopt@frenchb
880
\def\nwopt@german{%
881
\def\@nwlangdepdef{Diese Definition wird fortgesetzt}%
882
% This definition is continued
883
\def\@nwlangdepcud{Dieser Code wird benutzt}%
884
% This code is used
885
\def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}%
886
% Root chunk (not used in this document)
887
\def\@nwlangdepcwf{Dieser Code schreibt man zum File}%
888
% This code is written to file
889
\def\@nwlangdepchk{Teil}%
890
% chunk
891
\def\@nwlangdepchks{Teils}%
892
% chunks
893
\def\@nwlangdepin{im}%
894
% in
895
\def\@nwlangdepand{und}%
896
% and
897
\def\@nwlangdepuss{Benutztt}%
898
% Uses
899
\def\@nwlangdepusd{benutzt}%
900
% used
901
\def\@nwlangdepnvu{nicht benutzt}%
902
% never used
903
\def\@nwlangdepdfs{Definiert}%
904
% Defines
905
\def\@nwlangdepnvd{nicht definiert}%
906
% never defined
907
}
908
\let\nwopt@ngerman\nwopt@german
909
\ifx\languagename\undefined % default is English
910
\noweboptions{english}
911
\else
912
\@ifundefined{nwopt@\languagename}
913
{\noweboptions{english}}
914
{\expandafter\noweboptions\expandafter{\languagename}}
915
\fi
916
% spadcommands are the actual text that you type at the axiom prompt
917
\newcommand{\spadcommand}[1]%
918
{\begin{flushleft}{\tt #1}\end{flushleft}\vskip .1cm }
919
920
% spadgraph are the actual text that you type at the axiom prompt for draw
921
\newcommand{\spadgraph}[1]%
922
{\begin{flushleft}{\tt #1}\end{flushleft}\vskip .1cm }
923
924
% returnType is the type signature returned by the axiom interpreter
925
\newcommand{\returnType}[1]%
926
{\begin{flushright}{\tt #1}\end{flushright}\vskip .1cm}
927
928
% The book begins with some introductory material that is not really
929
% listed as a chapter. This creates a header similar to \chapter.
930
\newcommand{\pseudoChapter}[1]%
931
{\vskip .5in \noindent {\Huge{\bf #1}}\vskip .5in}
932
933
% The book begins with some introductory material that is not really
934
% listed as a section. This creates a header similar to \section.
935
\newcommand{\pseudoSection}[1]%
936
{\vskip .25in \noindent {\large{\bf #1}}\vskip .25in}
937
938
% spadofFrom records the operation in the index and the domain in the index
939
\newcommand{\spadopFrom}[2]{\index{library!operations!#1 @\begingroup \string\tt{} #1 \endgroup}\index{#2}``{\tt #1}''}
940
941
% spadfunFrom records the function name and domain in the index
942
\newcommand{\spadfunFrom}[2]{{\bf #1}\index{#1 @\begingroup \string\bf{} #1 \endgroup}\index{#2}}
943
944
\newcommand\AXIOM{\vskip\parindent\indent{\bf AXIOM}\vskip\parindent\noindent\ignorespaces}
945
\newcommand\maxima{\vskip\parindent\noindent{\bf MAXIMA}\vskip\parindent\noindent\ignorespaces}
946
\newcommand\yacas{\vskip\parindent\noindent{\bf YACAS}\vskip\parindent\noindent\ignorespaces}
947
948