summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/latex-tds/patch/webman.tex.diff
blob: c3a827ac8ffeaa78d40f909ad13a3e87e6e3aa9f (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
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
*** webman.tex.org	1990-09-06 02:00:00.000000000 +0200
--- webman.tex	2008-07-10 15:03:49.000000000 +0200
***************
*** 13,25 ****
  \def\pb{\.{|...|}}
  \def\lpile{\def\cr{\hfill\endline}\matrix} % I only use \lpile by itself
  
! \outer\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt
!   \noindent{\bf #1.}\quad\ignorespaces}
  
  \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill}
  \def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno}
  \def\runninghead{{\tentt WEB} USER MANUAL}
  
  % This verbatim mode assumes that no ? appears in the text being copied.
  \def\verbatim{\begingroup
    \def\do##1{\catcode`##1=12 } \dospecials
--- 13,76 ----
  \def\pb{\.{|...|}}
  \def\lpile{\def\cr{\hfill\endline}\matrix} % I only use \lpile by itself
  
! \newcount\destcount
! \destcount=1\relax
! 
! \def\bkminfo{}
! \outer\def\section #1.{%
!   \penalty-50\vskip 12pt plus 3pt minus 3pt
!   \noindent
!   \vbox to 0pt{%
!     \kern-2.5ex\relax
!     \pdfdest num\destcount fitbh\relax
!     \def\.##1{##1}%
!     \ifx\bkminfo\empty
!       \pdfoutline goto num\destcount{#1}\relax
!     \else
!       \pdfoutline goto num\destcount{#1 (\bkminfo)}\relax
!     \fi
!     \gdef\bkminfo{}%
!     \global\advance\destcount by 1\relax
!     \kern2.5ex\relax
!   }%
!   {\bf #1.}\quad\ignorespaces
! }
  
  \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill}
  \def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno}
  \def\runninghead{{\tentt WEB} USER MANUAL}
  
+ \pdfinfo{%
+   /Author(Donald E. Knuth)%
+   /Title(WEB User Manual)%
+ }
+ 
+ \def\LinkColor{%
+   \pdfliteral{1 0 0 rg}%
+ }
+ \def\Black{%
+   \pdfliteral{0 g}%
+ }
+ \def\appA{7}
+ \def\appB{8}
+ \def\appC{9}
+ \def\appD{0}
+ \def\appE{0}
+ \def\appF{10}
+ \def\appG{11}
+ \def\appH{12}
+ 
+ \def\appref#1{%
+   \leavevmode
+   \ifnum\csname app#1\endcsname>0 %
+     \pdfstartlink attr{/Border[0 0 0]} goto num\csname app#1\endcsname\relax
+     \LinkColor\hbox{Appendix}~#1\Black
+     \pdfendlink
+   \else
+     Appendix~#1%
+   \fi
+ }
+ 
  % This verbatim mode assumes that no ? appears in the text being copied.
  \def\verbatim{\begingroup
    \def\do##1{\catcode`##1=12 } \dospecials
***************
*** 624,630 ****
  `\.{@\{}' is converted into `\.[', since \PASCAL\ does not allow
  nested comments. Incidentally, module numbers are automatically inserted
  as meta-comments into the \PASCAL\ program, in order to help correlate the
! outputs of \.{WEAVE} and \.{TANGLE} (see Appendix~C\null). Meta-comments
  can be used to put conditional text into a \PASCAL\ program; this helps to
  overcome one of the limitations of \.{WEB}, since the simple macro
  processing routines of \.{TANGLE} do not include the dynamic evaluation of
--- 675,681 ----
  `\.{@\{}' is converted into `\.[', since \PASCAL\ does not allow
  nested comments. Incidentally, module numbers are automatically inserted
  as meta-comments into the \PASCAL\ program, in order to help correlate the
! outputs of \.{WEAVE} and \.{TANGLE} (see \appref C\null). Meta-comments
  can be used to put conditional text into a \PASCAL\ program; this helps to
  overcome one of the limitations of \.{WEB}, since the simple macro
  processing routines of \.{TANGLE} do not include the dynamic evaluation of
***************
*** 757,763 ****
  characters as output if the input consists entirely of ASCII characters.
  
  2. If you have an extended character set, all of the characters listed
! in Appendix C of {\sl The \TeX book\/} can be used in strings. But you should
  stick to standard ASCII characters if you want to write programs that will
  be useful to all the poor souls out there who don't have extended
  character sets.
--- 808,814 ----
  characters as output if the input consists entirely of ASCII characters.
  
  2. If you have an extended character set, all of the characters listed
! in \appref C of {\sl The \TeX book\/} can be used in strings. But you should
  stick to standard ASCII characters if you want to write programs that will
  be useful to all the poor souls out there who don't have extended
  character sets.
***************
*** 890,912 ****
  to time.
  \section Appendices.
  The basic ideas of \.{WEB} can be understood most easily by looking at
! examples of ``real'' programs. Appendix~A shows the \.{WEB} input that
! generated modules 55--59 of the \.{WEAVE} program; Appendix~B shows the
! corresponding \TeX\ code output by \.{WEAVE}; and Appendix~C shows excerpts
  from the corresponding \PASCAL\ code output by \.{TANGLE}.
  
  The complete webs for \.{WEAVE} and \.{TANGLE} appear as the bulk of this
! report, in Appendices D and~E. The reader should first compare Appendix~A
! to the corresponding portion of Appendix~D; then the same material should
  be compared to Appendices B and~C. Finally, if time permits, the reader may
  enjoy studying the complete programs in Appendices D and~E, since \.{WEAVE}
  and \.{TANGLE} contain several interesting aspects, and since an attempt
  has been made in these appendices to evolve a style of programming that
  makes good use of the \.{WEB} language.
  
! Finally, Appendix F is the `\.{webmac}' file that sets \TeX\ up to accept
! the output of \.{WEAVE}; Appendix~G discusses how to use some of its macros
! to vary the output formats; and Appendix~H discusses what needs to be done
  when \.{WEAVE} and \.{TANGLE} are installed in a new operating environment.
  \section Performance statistics.
  The programs in Appendices D and E will optionally keep statistics on
--- 941,963 ----
  to time.
  \section Appendices.
  The basic ideas of \.{WEB} can be understood most easily by looking at
! examples of ``real'' programs. \appref A shows the \.{WEB} input that
! generated modules 55--59 of the \.{WEAVE} program; \appref B shows the
! corresponding \TeX\ code output by \.{WEAVE}; and \appref C shows excerpts
  from the corresponding \PASCAL\ code output by \.{TANGLE}.
  
  The complete webs for \.{WEAVE} and \.{TANGLE} appear as the bulk of this
! report, in Appendices D and~E. The reader should first compare \appref A
! to the corresponding portion of \appref D; then the same material should
  be compared to Appendices B and~C. Finally, if time permits, the reader may
  enjoy studying the complete programs in Appendices D and~E, since \.{WEAVE}
  and \.{TANGLE} contain several interesting aspects, and since an attempt
  has been made in these appendices to evolve a style of programming that
  makes good use of the \.{WEB} language.
  
! Finally, \appref F is the `\.{webmac}' file that sets \TeX\ up to accept
! the output of \.{WEAVE}; \appref G discusses how to use some of its macros
! to vary the output formats; and \appref H discusses what needs to be done
  when \.{WEAVE} and \.{TANGLE} are installed in a new operating environment.
  \section Performance statistics.
  The programs in Appendices D and E will optionally keep statistics on
***************
*** 985,992 ****
  }}
  \eject
  \def\runninghead{APPENDIX A --- {\tentt WEB} FILE FORMAT}
  \section Appendix A.
! This excerpt from \.{WEAVE.WEB} produced modules 55--59 in Appendix~D.
  Note that some of the lines are indented to show the program structure.
  The indentation is ignored by \.{WEAVE} and \.{TANGLE}, but users find
  that \.{WEB} files are quite readable if they have some such indentation.
--- 1036,1044 ----
  }}
  \eject
  \def\runninghead{APPENDIX A --- {\tentt WEB} FILE FORMAT}
+ \def\bkminfo{WEB file format}
  \section Appendix A.
! This excerpt from \.{WEAVE.WEB} produced modules 55--59 in \appref D.
  Note that some of the lines are indented to show the program structure.
  The indentation is ignored by \.{WEAVE} and \.{TANGLE}, but users find
  that \.{WEB} files are quite readable if they have some such indentation.
***************
*** 1057,1064 ****
  \endgroup
  \vfill\eject
  \def\runninghead{APPENDIX B --- TRANSLATION BY {\tentt WEAVE}}
  \section Appendix B.
! This excerpt from \.{WEAVE.TEX} corresponds to Appendix A.
  
  % I've inserted \vfill's here at the blank lines, to squeeze this on one page!
  \begingroup \def\tt{\eighttt} \baselineskip9pt
--- 1109,1117 ----
  \endgroup
  \vfill\eject
  \def\runninghead{APPENDIX B --- TRANSLATION BY {\tentt WEAVE}}
+ \def\bkminfo{Translation by weave}
  \section Appendix B.
! This excerpt from \.{WEAVE.TEX} corresponds to \appref A.
  
  % I've inserted \vfill's here at the blank lines, to squeeze this on one page!
  \begingroup \def\tt{\eighttt} \baselineskip9pt
***************
*** 1139,1144 ****
--- 1192,1198 ----
  \endgroup
  \eject
  \def\runninghead{APPENDIX C --- TRANSLATION BY {\tentt TANGLE}}
+ \def\bkminfo{Translation by tangle}
  \section Appendix C.
  The \.{TANGLE} processor converts \.{WEAVE.WEB} into a syntactically
  correct (but not very pretty) \PASCAL\ program \.{WEAVE.PAS}.
***************
*** 1458,1470 ****
  opposite sides of each sheet.
  
  \point 6. The \.{\\title} macro will appear at the top of each page
! in small caps. For example, Appendix~D was produced after saying
  `\.{\\def\\title\{WEAVE\}}'.
  
  \point 7. The first page usually is assigned page number 1.
  To start on page 16, with contents
  on page 15, say this: `\.{\\def\\contentspagenumber\{15\}}
! \.{\\pageno=\\contentspagenumber} \.{\\advance\\pageno by 1}'. (Appendix~D
  was generated that way.)
  
  \point 8. The macro \.{\\iftitle} will suppress the header line if it is
--- 1512,1524 ----
  opposite sides of each sheet.
  
  \point 6. The \.{\\title} macro will appear at the top of each page
! in small caps. For example, \appref D was produced after saying
  `\.{\\def\\title\{WEAVE\}}'.
  
  \point 7. The first page usually is assigned page number 1.
  To start on page 16, with contents
  on page 15, say this: `\.{\\def\\contentspagenumber\{15\}}
! \.{\\pageno=\\contentspagenumber} \.{\\advance\\pageno by 1}'. (\appref D
  was generated that way.)
  
  \point 8. The macro \.{\\iftitle} will suppress the header line if it is
***************
*** 1475,1484 ****
  Two macros are provided to give flexibility to the table of
  contents: \.{\\topofcontents} is invoked just before the contents
  info is read, and \.{\\botofcontents} is invoked just after.
! For example, Appendix~D was produced with the following definitions:
  $$\lpile{\.{\\def\\topofcontents\{\\null\\vfill}\cr
    \.{ { }\\titlefalse \% include headline on the contents page}\cr
!   \.{ { }\\def\\rheader\{\\mainfont Appendix D\\hfil 15\}}\cr
    \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont WEAVE\}{ }processor\}}\cr
    \.{ { }\\vskip 15pt \\centerline\{(Version 4)\}{ }\\vfill\}}\cr}$$
  Redefining \.{\\rheader}, which is the headline for right-hand pages,
--- 1529,1538 ----
  Two macros are provided to give flexibility to the table of
  contents: \.{\\topofcontents} is invoked just before the contents
  info is read, and \.{\\botofcontents} is invoked just after.
! For example, \appref D was produced with the following definitions:
  $$\lpile{\.{\\def\\topofcontents\{\\null\\vfill}\cr
    \.{ { }\\titlefalse \% include headline on the contents page}\cr
!   \.{ { }\\def\\rheader\{\\mainfont \appref D\\hfil 15\}}\cr
    \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont WEAVE\}{ }processor\}}\cr
    \.{ { }\\vskip 15pt \\centerline\{(Version 4)\}{ }\\vfill\}}\cr}$$
  Redefining \.{\\rheader}, which is the headline for right-hand pages,
***************
*** 1487,1493 ****
  
  \point 9. Data for the table of contents is written to a file that
  is read after the indexes have been \TeX ed; there's one line of data
! for every starred module. For example, when Appendix~D was being generated,
  a file \.{CONTENTS.TEX} containing
  $$\lpile{\.{\\Z \{{ }Introduction\}\{1\}\{16\}}\cr
    \.{\\Z \{{ }The character set\}\{11\}\{19\}}\cr}$$
--- 1541,1547 ----
  
  \point 9. Data for the table of contents is written to a file that
  is read after the indexes have been \TeX ed; there's one line of data
! for every starred module. For example, when \appref D was being generated,
  a file \.{CONTENTS.TEX} containing
  $$\lpile{\.{\\Z \{{ }Introduction\}\{1\}\{16\}}\cr
    \.{\\Z \{{ }The character set\}\{11\}\{19\}}\cr}$$
***************
*** 1579,1585 ****
  \.{TANGLE.PAS}, and \.{WEBMAC.TEX}. The tape will probably also contain an
  example change file \.{TANGLE.CH}.
  \step(2) Look at the sections of \.{TANGLE} that are listed under ``system
! dependencies'' in the index of Appendix~E above, and figure out what changes
  (if any) will be needed for your system.
  \step(3) Make a change file \.{TANGLE.CH} that contains the changes of~(2);
  do not change your copy of \.{TANGLE.WEB}, leave it intact. (The
--- 1633,1639 ----
  \.{TANGLE.PAS}, and \.{WEBMAC.TEX}. The tape will probably also contain an
  example change file \.{TANGLE.CH}.
  \step(2) Look at the sections of \.{TANGLE} that are listed under ``system
! dependencies'' in the index of \appref E above, and figure out what changes
  (if any) will be needed for your system.
  \step(3) Make a change file \.{TANGLE.CH} that contains the changes of~(2);
  do not change your copy of \.{TANGLE.WEB}, leave it intact. (The
***************
*** 1605,1622 ****
  working \.{TANGLE} program.
  \step(7) Make a change file \.{WEAVE.CH} analogous to (3), but this time
  consider the system-dependent parts of \.{WEAVE} that are listed in
! the index to Appendix~D.
  \step(8) Run \.{TANGLE} on \.{WEAVE.WEB} and your \.{WEAVE.CH}, obtaining
  \.{WEAVE.PAS}.
  \step(9) Use \PASCAL\ on \.{WEAVE.PAS} to make a running \.{WEAVE} program.
  \step(10) Run \.{WEAVE} on \.{TANGLE.WEB} and \.{TANGLE.CH} to produce
  \.{TANGLE.TEX}.
  \step(11) Run \TeX\ on \.{TANGLE.TEX}, obtaining a listing analogous to
! Appendix~E. This listing will incorporate your changes.
  \step(12) Run \.{WEAVE} on \.{WEAVE.WEB} and your \.{WEAVE.CH} to produce
  \.{WEAVE.TEX}.
  \step(13) Run \TeX\ on \.{WEAVE.TEX}, obtaining a listing analogous to
! Appendix~D that incorporates your changes.
  
  \yskip\noindent
  This description assumes that you already have a working \TeX82 system.
--- 1659,1676 ----
  working \.{TANGLE} program.
  \step(7) Make a change file \.{WEAVE.CH} analogous to (3), but this time
  consider the system-dependent parts of \.{WEAVE} that are listed in
! the index to \appref D.
  \step(8) Run \.{TANGLE} on \.{WEAVE.WEB} and your \.{WEAVE.CH}, obtaining
  \.{WEAVE.PAS}.
  \step(9) Use \PASCAL\ on \.{WEAVE.PAS} to make a running \.{WEAVE} program.
  \step(10) Run \.{WEAVE} on \.{TANGLE.WEB} and \.{TANGLE.CH} to produce
  \.{TANGLE.TEX}.
  \step(11) Run \TeX\ on \.{TANGLE.TEX}, obtaining a listing analogous to
! \appref E. This listing will incorporate your changes.
  \step(12) Run \.{WEAVE} on \.{WEAVE.WEB} and your \.{WEAVE.CH} to produce
  \.{WEAVE.TEX}.
  \step(13) Run \TeX\ on \.{WEAVE.TEX}, obtaining a listing analogous to
! \appref D that incorporates your changes.
  
  \yskip\noindent
  This description assumes that you already have a working \TeX82 system.