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
|
.TH TANGLE 1 "16 June 2015" "Web2C 2020"
.\"=====================================================================
.if n .ds MF Metafont
.if t .ds MF Metafont
.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
.if n .ds TX TeX
.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP
.el .ds OX TeX
.\" BX definition must follow TX so BX can use TX
.if t .ds BX \fRB\s-2IB\s0\fP\*(TX
.if n .ds BX BibTeX
.\" LX definition must follow TX so LX can use TX
.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX
.if n .ds LX LaTeX
.if n .ds WB Web
.if t .ds WB W\s-2EB\s0
.\"=====================================================================
.SH NAME
tangle \- translate WEB to Pascal
.SH SYNOPSIS
.B tangle
.RI [ options ]
.IR webfile [ \fB.web\fP ]
.RI [ changefile [ \fB.ch\fP ]]
.\"=====================================================================
.SH DESCRIPTION
This manual page is not meant to be exhaustive. The complete
documentation for this version of \*(TX can be found in the info file
or manual
.IR "Web2C: A TeX implementation" .
.PP
The
.B tangle
program converts a \*(WB
source document into a Pascal program that may be compiled in the usual
way with the on-line Pascal compiler (e.g.,
.BR pc (1)).
The output file is packed into lines of 72 characters or less, with
the only concession to readability being the termination of lines at
semicolons when this can be done conveniently.
.PP
The \*(WB language allows you to prepare a single document containing all
the information that is needed both to produce a compilable Pascal
program and to produce a well-formatted document describing the program
in as much detail as the writer may desire. The user of \*(WB must be
familiar with both \*(TX and Pascal. \*(WB also provides a relatively
simple, although adequate, macro facility that permits a Pascal program
to be written in small easily-understood modules.
.PP
The command line should have either one or two names on it.
The first is taken as the \*(WB file (and
.B .web
is added if there is no
extension).
If there is another name, it is a change file (and
.B .ch
is added if there is
no extension). The change file overrides parts of the \*(WB file,
as described in the \*(WB system documentation.
.PP
The output files are a Pascal file and a string pool file,
whose names are formed by adding
.B .p
and
.B .pool
respectively to the root of the \*(WB file name.
.\"=====================================================================
.SH "OPTIONS"
This version of
.B tangle
understands the following options. Note that some of these options
may render the output unsuitable for processing by a Pascal compiler.
.TP
.B --help
Print help message and exit.
.TP
.BI --length \ number
Compare only the first
.I number
characters of identifiers when checking for collisions. The default
is 32, the original
.B tangle
used 7.
.TP
.B --loose
When checking for collisions between identifiers, honor the settings
of the
.BR --lowercase ,
.BR --mixedcase ,
.BR --uppercase ,
and
.B --underline
options. This is the default.
.TP
.B --lowercase
Convert all identifiers to lowercase.
.TP
.B --mixedcase
Retain the case of identifiers. This is the default.
.TP
.B --strict
When checking for collisions between identifiers, strip underlines and
convert all identifiers to uppercase first.
.TP
.B --underline
Retain underlines (also known as underscores) in identifiers.
.TP
.B --uppercase
Convert all identifiers to uppercase. This is the behaviour of the
original
.BR tangle .
.TP
.B --version
Print version information and exit.
.\"=====================================================================
.SH ENVIRONMENT
The environment variable WEBINPUTS is used to search for the input files,
or the system default if WEBINPUTS is not set. See
.BR tex (1)
for the details of the searching.
.\"=====================================================================
.SH "SEE ALSO"
.BR pc (1),
.BR pxp (1)
(for formatting
.B tangle
output when debugging),
.BR tex (1).
.PP
Donald E. Knuth,
.IR "The \*(WB System of Structured Documentation" .
.PP
Donald E. Knuth,
.IR "Literate Programming" ,
Computer Journal
.BR 27 ,
97\-111, 1984.
.PP
Wayne Sewell,
.IR "Weaving a Program" ,
Van Nostrand Reinhold, 1989, ISBN 0-442-31946-0.
.PP
Donald E. Knuth,
.I "\*(OX: The Program"
(Volume B of
.IR "Computers and Typesetting" ),
Addison-Wesley, 1986, ISBN 0-201-13437-3.
.PP
Donald E. Knuth,
.I "\*(MF: The Program"
(Volume D of
.IR "Computers and Typesetting" ),
Addison-Wesley, 1986, ISBN 0-201-13438-1.
.PP
These last two are by far the largest extant examples of \*(WB
programs.
.PP
There is an active Internet electronic mail discussion list on the
subject of literate programming; send a subscription request to
.I litprog-request@shsu.edu
to join.
.\"=====================================================================
.SH AUTHORS
\*(WB was designed by Donald E. Knuth, based on an earlier system
called DOC (implemented by Ignacio Zabala).
The
.B tangle
and
.B weave
programs are themselves written in \*(WB. The system
was originally ported to Unix at Stanford by Howard Trickey, and at
Cornell by Pavel Curtis.
|