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