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 The environment variable WEBINPUTS is used to search for the input
79 files, or the system default if WEBINPUTS is not set. See tex(1) for
80 the details of the searching.
81
83 pc(1), pxp(1) (for formatting tangle output when debugging), tex(1).
84
85 Donald E. Knuth, The Web System of Structured Documentation.
86
87 Donald E. Knuth, Literate Programming, Computer Journal 27, 97-111,
88 1984.
89
90 Wayne Sewell, Weaving a Program, Van Nostrand Reinhold, 1989, ISBN
91 0-442-31946-0.
92
93 Donald E. Knuth, TeX: The Program (Volume B of Computers and Typeset‐
94 ting), Addison-Wesley, 1986, ISBN 0-201-13437-3.
95
96 Donald E. Knuth, Metafont: The Program (Volume D of Computers and Type‐
97 setting), Addison-Wesley, 1986, ISBN 0-201-13438-1.
98
99 These last two are by far the largest extant examples of Web programs.
100
101 There is an active Internet electronic mail discussion list on the sub‐
102 ject of literate programming; send a subscription request to litprog-
103 request@shsu.edu to join.
104
106 Web was designed by Donald E. Knuth, based on an earlier system called
107 DOC (implemented by Ignacio Zabala). The tangle and weave programs are
108 themselves written in Web. The system was originally ported to Unix at
109 Stanford by Howard Trickey, and at Cornell by Pavel Curtis.
110
111
112
113Web2C 2019 16 June 2015 TANGLE(1)