-
Notifications
You must be signed in to change notification settings - Fork 5
/
cwebman-texlive.ch
270 lines (260 loc) · 10.3 KB
/
cwebman-texlive.ch
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
CHANGES for CWEBMAN.TEX by Andreas Scherer, September 2023.
This set of changes adapts CWEBMAN.TEX for TeX Live. It requires that the
change files CWEBMAN-PATCH.CH and CWEBMAN-EXTENSIONS.CH be applied first.
For a complete history of the changes made to CWEBMAN.TEX see CWEBMAN-PATCH.CH.
------------------------------------------------------------------------------
@x l.4
\input cwebmac
\pdffalse\acrohintfalse
@y
\input cwebmac
\ifhint \input hiplainpage \fi
@z
------------------------------------------------------------------------------
@x l.28
\outer\def\section #1.{\penalty-500\bigskip
\centerline{\sectionfont\def\.##1{{\twelvett##1}} #1}\nobreak\vskip 6pt
\everypar{\hskip-\parindent\everypar{}}}
@y
\ifacro
\pdfpagewidth=\pagewidth \advance\pdfpagewidth by 2cm
\pdfpageheight=\pageheight \advance\pdfpageheight by 3cm
\ifpdflua \pdfhorigin=1cm \pdfvorigin=1cm
\else \advance\pdfpageheight by 1cm \global\pageshift=-1.54cm
\global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
\fi
\newcount\destcount \destcount=1\relax
\def\subsections{0}
\outer\def\section #1.{\penalty-500\bigskip
\centerline{\sectionfont\def\.##1{{\twelvett##1}}
\ifacro\vbox to 0pt{\kern-2.5ex\relax
\ifpdflua\pdfdest num \destcount fith\relax
\else\special{pdf: dest (\the\destcount) [ @thispage /FitH @ypos ]}\fi
\def\.##1{##1}\def\TeX{TeX}%
\ifpdflua\pdfoutline goto num \destcount
\ifnum\subsections>0 count -\subsections\fi {#1}\relax
\else\special{pdf: outline 0 << /Title (#1)
/A << /S /GoTo /D (\the\destcount) >> >>}\fi
\gdef\subsections{0}%
\global\advance\destcount by 1\relax
\kern2.5ex\relax
}\fi #1}\nobreak\vskip 6pt
\everypar{\hskip-\parindent\everypar{}}}
\def\appA{15}
\def\appB{16}
\def\appC{17}
\def\Appendix#1{\leavevmode
\ifacro\ifpdflua
\pdfstartlink attr{/Border[0 0 0]} goto num\csname app#1\endcsname\relax
\Blue\hbox{Appendix}~#1\Black
\pdfendlink
\else
\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{\hbox{Appendix}~#1}%
\special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
depth \thedepth << /Type /Annot /Subtype /Link /Border [0 0 0]
/A << /S /GoTo /D (\csname app#1\endcsname) >> >>}\box0\relax
\fi\else Appendix~#1\fi}
\newcount\subdestcount \subdestcount=151\relax
\outer\def\subsection #1.{\ifacro
\ifpdflua\pdfdest num \subdestcount fith\relax
\pdfoutline goto num \subdestcount {#1}\relax
\else\special{pdf: dest (\the\subdestcount) [ @thispage /FitH @ypos ]}%
\special{pdf: outline 1 << /Title (#1)
/A << /S /GoTo /D (\the\subdestcount) >> >>}\fi
\global\advance\subdestcount by 1\relax
\fi}
@z
------------------------------------------------------------------------------
@x l.34 and l.73 of CWEBMAN-PATCH.CH
\def\runninghead{{\ninett CWEB} USER MANUAL (@VERSION@)}
@y
\def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}}
\def\runninghead{{\ninett CWEB} USER MANUAL (Version 4.12 [\TeX~Live])}
@z
------------------------------------------------------------------------------
@x l.80 of CWEBMAN-PATCH.CH
\footnote*{This document describes the extended \.{CWEB} (@VERSION@).}}
@y
\footnote*{This document describes the extended \.{CWEB} (Version 4.12 [\TeX~Live]).}}
@z
------------------------------------------------------------------------------
@x l.79
Internet page \.{http://www-cs-faculty.stanford.edu/\char`\~knuth/cweb.html}
@y
Internet page
\pdfURL{\.{http://www-cs-faculty.stanford.edu/\char`\~knuth/cweb.html}}%
{http://www-cs-faculty.stanford.edu/\TILDE/knuth/cweb.html}
@z
------------------------------------------------------------------------------
@x l.84
\.{https://github.com/ascherer/cweb} with the really current news.
@y
\pdfURL{\.{https://github.com/ascherer/cweb}}%
{https://github.com/ascherer/cweb}
with the really current news.
@z
------------------------------------------------------------------------------
@x l.102
should be sent to the \TeX-related mailing list \.{tex-k@tug.org}.
@y
should be sent to the \TeX-related mailing list
\pdfURL{\.{tex-k@tug.org}}%
{mailto:tex-k@tug.org}.
@z
------------------------------------------------------------------------------
@x l.104
Readers who are familiar with Knuth's memo ``The \.{WEB} System of Structured
Documentation'' will be able
@y
Readers who are familiar with Knuth's memo ``\pdfURL{The \.{WEB} System of
Structured Documentation}{../web/webman.pdf}'' will be able
@z
------------------------------------------------------------------------------
@x l.523
email address in a \.{CWEB} file (e.g., \.{tex-k@@tug.org}).
@y
email address in a \.{CWEB} file (e.g.,
\pdfURL{\.{tex-k@@tug.org}}%
{mailto:tex-k@tug.org}).
@z
------------------------------------------------------------------------------
@x l.918 and l.12 of CWEBMAN-EXTENSIONS.CH
\cwebfootnote{In this extended implementation, if an \.{@i}nclude file can
not be found in the current directory, \.{CWEB} will look in standard
directories like the \CEE/ preprocessor. Multiple search paths may be
specified in the environment variable \.{CWEBINPUTS}, concatenated with
\.{PATH\_SEPARATOR}s (on \UNIX/ commonly known as~`\.:'). If the environment
variable is not set, some decent default paths are used instead.}
@y
\cwebfootnote{In this extended implementation, if an \.{@i}nclude file can not
be found in the current directory, \.{CWEB} will use the conventions of the
\Kpathsea/ library as outlined in {\pdffalse\acrohintfalse section~\X93:File
lookup with \Kpathsea/\X~of} \pdfURL{appendix~D}{common-changes.pdf} to look
for it.
% FIXME
(This is true for any other input or change file lookup.)}
@z
------------------------------------------------------------------------------
@x l.1025
except for error messages.
@y
except for error messages.%
\cwebfootnote{\.{CWEB} in \TeX~Live runs `\.{--quiet}ly', i.\,e.,
options `\.{b}', `\.{h}', and `\.{p}' are `off' by default.}
@z
------------------------------------------------------------------------------
@x l.1031 and l.33 of CWEBMAN-EXTENSIONS.CH
\option i Indent parameters in function declarations. (On by default;
@y
\option d Set the debugging variable \\{kpathsea\_debug} to the numeric
value $N\in[0,127]$ of this option. See section~95 % FIXME
of \pdfURL{appendix~D}{common-changes.pdf} for details.
\hfil\vskip\normallineskip
\option i Indent parameters in function declarations. (On by default;
@z
------------------------------------------------------------------------------
@x l.1123
Sometimes things don't work as smoothly, and you get a bunch of
@y
\pdffalse\acrohintfalse
Sometimes things don't work as smoothly, and you get a bunch of
@z
------------------------------------------------------------------------------
@x l.1131
`$\\{main}(\\{argc},\39\\{argv}{}$)'.
@y
`$\\{main}(\\{argc},\39\\{argv}{}$)'.
\ifx\pdf+\pdftrue\fi \ifxetex\pdftrue\fi
\ifpdflua\ifnum\pdfoutput>0\pdftrue\fi\fi
\ifpdf\acrohinttrue\fi \ifhint\acrohinttrue\fi
@z
------------------------------------------------------------------------------
@x l.79 of CWEBMAN-EXTENSIONS.CH.
\pdfURL{the project homepage}{https://hint.userweb.mwn.de/hint/hintview.html}.%
@y
\pdfURL{\.{https://hint.userweb.mwn.de/hint/hintview.html}}%
{https://hint.userweb.mwn.de/hint/hintview.html}.%
@z
------------------------------------------------------------------------------
@x l.1176 and l.86 of CWEBMAN-EXTENSIONS.CH.
\pdfURL{the Stanford repository}{http://ftp.cs.stanford.edu/pub/ctwill}.%
\cwebfootnote{This extended version of \.{CWEB} comes with an up-to-date
@y
\pdfURL{\.{http://ftp.cs.stanford.edu/pub/ctwill}}%
{http://ftp.cs.stanford.edu/pub/ctwill}.%
\cwebfootnote{\TeX~Live comes with an up-to-date
@z
------------------------------------------------------------------------------
@x l.1180
As an example of a real program written in \.{CWEB}, Appendix~A
@y
As an example of a real program written in \.{CWEB}, \Appendix A
@z
------------------------------------------------------------------------------
@x l.1185
Appendix B displays the files that set \TEX/ up to accept
the output of \.{CWEAVE}, and Appendix~C discusses how to use some of those
@y
\Appendix B displays the files that set \TEX/ up to accept
the output of \.{CWEAVE}, and \Appendix C discusses how to use some of those
@z
------------------------------------------------------------------------------
@x l.1197
\section Appendix A: Excerpts from a \.{CWEB} Program.
@y
\def\subsections{4}
\section Appendix A: Excerpts from a \.{CWEB} Program.
\subsection CWEB file format.
@z
------------------------------------------------------------------------------
@x l.1201
generated sections 27--31 of the file \.{common.w}, which contains
@y
generated sections 27--31 of the file
\pdfURL{\.{common.w}}{common.pdf}, which contains
@z
------------------------------------------------------------------------------
@x l.1272
\def\runninghead{APPENDIX A --- TRANSLATION BY {\ninett CTANGLE}}
@y
\def\runninghead{APPENDIX A --- TRANSLATION BY {\ninett CTANGLE}}
\subsection Translation by CTANGLE.
@z
------------------------------------------------------------------------------
@x l.1340
\def\runninghead{APPENDIX A --- TRANSLATION BY {\ninett CWEAVE}}
@y
\def\runninghead{APPENDIX A --- TRANSLATION BY {\ninett CWEAVE}}
\subsection Translation by CWEAVE.
@z
------------------------------------------------------------------------------
@x l.1429
\def\runninghead{APPENDIX A --- FINAL DOCUMENT}
And here's what the same excerpt looks like when typeset.
(Can you spot the typographical nicety used in the \.{CWEB} code?)
\let\K=\leftarrow
@y
\def\runninghead{APPENDIX A --- FINAL DOCUMENT}
\subsection Final document.
\pdffalse\acrohintfalse
And here's what the same excerpt looks like when typeset.
(Can you spot the typographical niceties used in the \.{CWEB} code?)
\let\K=\leftarrow
\def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}
@z
------------------------------------------------------------------------------
@x l.1511
\vfil\eject\titletrue
@y
\vfill\eject\titletrue
\ifx\pdf+\pdftrue\fi \ifxetex\pdftrue\fi
\ifpdflua\ifnum\pdfoutput>0 \pdftrue\fi\fi
\ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
@z
------------------------------------------------------------------------------
@x l.1613 and l.86 of CWEBMAN-PATCH.CH
\.{ { }\\vskip 15pt \\centerline\{(@VERSION@)\}{ }\\vfill\}}\cr}$$
@y
\.{ { }\\vskip 15pt \\centerline\{(Version 4.12)\}{ }\\vfill\}}\cr}$$
@z
------------------------------------------------------------------------------