1TANGLE(1) General Commands Manual TANGLE(1)
2
3
4
6 tangle - translate WEB to Pascal
7
9 tangle [options] webfile[.web] [ { changefile[.ch] |-} [ outfile[.p] ]
10 ]
11
13 This manual page is not meant to be exhaustive. The complete documen‐
14 tation for this version of TeX can be found in the info file or manual
15 Web2C: A TeX implementation.
16
17 The tangle program converts a Web source document into a Pascal program
18 that may be compiled in the usual way with the on-line Pascal compiler
19 (e.g., pc(1)). The output file is packed into lines of 72 characters
20 or less, with the only concession to readability being the termination
21 of lines at semicolons when this can be done conveniently.
22
23 The Web language allows you to prepare a single document containing all
24 the information that is needed both to produce a compilable Pascal pro‐
25 gram and to produce a well-formatted document describing the program in
26 as much detail as the writer may desire. The user of Web must be fa‐
27 miliar with both TeX and Pascal. Web also provides a relatively sim‐
28 ple, although adequate, macro facility that permits a Pascal program to
29 be written in small easily-understood modules.
30
31 The command line should have one, two or three names on it. The first
32 is taken as the Web file (and .web is added if there is no extension).
33 If there is second name, it is a change file (and .ch is added if there
34 is no extension). The change file overrides parts of the Web file, as
35 described in the Web system documentation.
36
37 If there is a third name, it is the Pascal output file (and .p is added
38 if there is no extension). In this case you can specify an empty change
39 file with '-' as the second argument. Otherwise the name of the Pascal
40 file is formed by adding .p to the root of the Web file name.
41
42 An optional second output file is a string pool file, whose name is
43 formed by adding .pool to the root of the Pascal file name.
44
46 This version of tangle understands the following options. Note that
47 some of these options may render the output unsuitable for processing
48 by a Pascal compiler.
49
50 --help Print help message and exit.
51
52 --length number
53 Compare only the first number characters of identifiers when
54 checking for collisions. The default is 32, the original tangle
55 used 7.
56
57 --loose
58 When checking for collisions between identifiers, honor the set‐
59 tings of the --lowercase, --mixedcase, --uppercase, and --under‐
60 line options. This is the default.
61
62 --lowercase
63 Convert all identifiers to lowercase.
64
65 --mixedcase
66 Retain the case of identifiers. This is the default.
67
68 --strict
69 When checking for collisions between identifiers, strip under‐
70 lines and convert all identifiers to uppercase first.
71
72 --underline
73 Retain underlines (also known as underscores) in identifiers.
74
75 --uppercase
76 Convert all identifiers to uppercase. This is the behaviour of
77 the original tangle.
78
79 --version
80 Print version information and exit.
81
83 The environment variable WEBINPUTS is used to search for the input
84 files, or the system default if WEBINPUTS is not set. See tex(1) for
85 the details of the searching.
86
88 pc(1), pxp(1) (for formatting tangle output when debugging), tex(1).
89
90 Donald E. Knuth, The Web System of Structured Documentation.
91
92 Donald E. Knuth, Literate Programming, Computer Journal 27, 97-111,
93 1984.
94
95 Wayne Sewell, Weaving a Program, Van Nostrand Reinhold, 1989, ISBN
96 0-442-31946-0.
97
98 Donald E. Knuth, TeX: The Program (Volume B of Computers and Typeset‐
99 ting), Addison-Wesley, 1986, ISBN 0-201-13437-3.
100
101 Donald E. Knuth, Metafont: The Program (Volume D of Computers and Type‐
102 setting), Addison-Wesley, 1986, ISBN 0-201-13438-1.
103
104 These last two are by far the largest extant examples of Web programs.
105
106 There is an active Internet electronic mail discussion list on the sub‐
107 ject of literate programming; send a subscription request to litprog-
108 request@shsu.edu to join.
109
111 Web was designed by Donald E. Knuth, based on an earlier system called
112 DOC (implemented by Ignacio Zabala). The tangle and weave programs are
113 themselves written in Web. The system was originally ported to Unix at
114 Stanford by Howard Trickey, and at Cornell by Pavel Curtis.
115
116
117
118Web2C 2022 02 March 2022 TANGLE(1)