TANGLE(1)
π TANGLE β section 1 of the general commands manual π
okay so, bestie, lemme put you on π this is the manual page for tangle, a literal icon of the literate-programming world. It lives in the General Commands Manual, it's section 1, and it's about to change your whole workflow, fr fr.
β¨ NAME β¨
tangle β translate WEB to Pascal π¦
πΈ SYNOPSIS πΈ
tangle [options] webfile[.web] [{changefile[.ch]|-} [outfile[.p]]]
π DESCRIPTION π
ngl, this manual page is not meant to be exhaustive. The complete documentation for this version of TeX lives in the info file or the manual Web2C: A TeX implementation. Go read that if you want the whole lore, iykyk.
The tangle program converts a Web source document into a Pascal program, and then you compile it the usual way with the on-line Pascal compiler (like pc(1), hey bestie π). The output file gets packed into lines of 72 characters or less, and the only concession to readability is that lines get terminated at semicolons when this can be done conveniently. That's it. That's the aesthetic. π
The Web language lets you prepare a single document containing all the information 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 way that is so main character energy. β¨
But heads up β the user of Web must be familiar with both TeX and Pascal. No skipping prerequisites, bestie, that's the vibe check. Web also provides a relatively simple, although adequate, macro facility that permits a Pascal program to be written in small easily-understood modules. Modular queen. π
So the command line should have one, two or three names on it:
- The first is taken as the Web file (and
.webis added if there is no extension). - If there's a second name, it's a change file (and
.chis added if there is no extension). The change file overrides parts of the Web file, as described in the Web system documentation. - If there's a third name, it's the Pascal output file (and
.pis added if there is no extension). In this case you can specify an empty change file with-as the second argument. Otherwise, the name of the Pascal file is formed by adding.pto the root of the Web file name.
An optional second output file is a string pool file, whose name is formed by adding .pool to the root of the Pascal file name. Cute, right? π
π₯ OPTIONS π₯
This version of tangle understands the following options. Note that some of these options may render the output unsuitable for processing by a Pascal compiler β like, read that twice, bestie, it's not a drill π¨
--helpβ Print help message and exit. Slay.--lengthnumber β Compare only the first number characters of identifiers when checking for collisions. The default is 32; the original tangle used 7. Glow-up fr.--looseβ When checking for collisions between identifiers, honor the settings of the--lowercase,--mixedcase,--uppercase, and--underlineoptions. This is the default.--lowercaseβ Convert all identifiers to lowercase.--mixedcaseβ Retain the case of identifiers. This is the default.--strictβ When checking for collisions between identifiers, strip underlines and convert all identifiers to uppercase first. Strict mode is giving discipline π--underlineβ Retain underlines (also known as underscores) in identifiers.--uppercaseβ Convert all identifiers to uppercase. This is the behaviour of the original tangle.--versionβ Print version information and exit.
π ENVIRONMENT π
The environment variable WEBINPUTS is used to search for the input files, or the system default if WEBINPUTS is not set. See tex(1) for the details of the searching. Go off, environment variable π«Ά
π¦ SEE ALSO π¦
Also, the required reading, no cap π:
- Donald E. Knuth, The Web System of Structured Documentation.
- Donald E. Knuth, Literate Programming, Computer Journal 27, 97-111, 1984.
- Wayne Sewell, Weaving a Program, Van Nostrand Reinhold, 1989, ISBN
0-442-31946-0. - Donald E. Knuth, TeX: The Program (Volume B of Computers and Typesetting), Addison-Wesley, 1986, ISBN
0-201-13437-3. - Donald E. Knuth, Metafont: The Program (Volume D of Computers and Typesetting), Addison-Wesley, 1986, ISBN
0-201-13438-1.
Those last two are by far the largest extant examples of Web programs. Literally massive. π
There is an active Internet electronic mail discussion list on the subject of literate programming; send a subscription request to litprog-request@shsu.edu to join. Join the group chat bestie, it's giving community πΈ
π AUTHORS π
Web was designed by Donald E. Knuth, based on an earlier system called DOC (implemented by Ignacio Zabala). The tangle and weave programs are themselves written in Web. The system was originally ported to Unix at Stanford by Howard Trickey, and at Cornell by Pavel Curtis. Legends only. π
and that's the whole page, bestie π go forth and tangle, you're gonna eat
This page is brought to you by Web2C 2025, dated 02 March 2022 β version info and date, delivered with love, mwah πβ¨
π¦ where this page comes from
- alpine 3.24: texlive-doc 2026.0-r0 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: texlive-web 12:svn77830-105.fc44 Β· Knuth-CTAN
- fedora 44: texlive-web 12:svn77830-111.fc44 Β· Knuth-CTAN
- opensuse-leap 16.0: texlive-web 2025.221.4.5svn73848-160000.3.1 Β· SUSE-TeX
- ubuntu resolute: texlive-binaries 2025.20250727.75242+ds-5build1 Β· TeX-Live
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms