TANGLE(1)

πŸ“¦ version 2026.0, in alpine 3.24

πŸ’… TANGLE(1) β€” the manual page, bestie edition ✨

okay so this is the tangle page from the General Commands Manual, and honestly? it's giving legendary. sit down, grab a strawberry drink πŸ“, we're learning literate programming.


🌸 NAME 🌸

tangle, otangle β€” translate a literate programming WEB to Pascal. yes that's the whole vibe. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

tangle [options] webfile[.web] [{changefile[.ch]|-} [outfile[.p]]]

✨ DESCRIPTION ✨

So tangle takes a WEB literate programming source document and converts it into a Pascal program. That's it. That's the job. πŸŽ€

And like, besides feeding the Pascal output straight into a Pascal compiler, these days the Pascal output is often translated to C instead β€” that's literally how the TeX family of programs gets compiled in TeX Live. iconic behavior fr fr.

The WEB language lets you make one single document containing everything you need to produce both a compilable Pascal program and a well-formatted document describing the program in as much detail as the writer could ever want. no cap. But heads up: the user of WEB must be familiar with both TeX and Pascal (iykyk). WEB also gives you a relatively simple β€” though adequate β€” macro facility that lets a Pascal program be written in small modules, in an arbitrary order. chaos, but make it structured πŸ’….

The command line should have one, two or three filenames on it. The first one is taken as the WEB file, and .web gets added if there's no extension. 🫢

If a second filename is given, it's taken as a change file, and .ch gets added if there's no extension. The change file overrides parts of the WEB file, as described in the WEB system documentation. If there's no second filename, there's no change file. periodt.

If a third filename is given, it's taken as the Pascal output file, and .p gets added if there's no extension. Wanna specify an output file with no change? Use - for the second argument β€” that means an empty change file, and listen, it is not stdin, bestie, do not come for me 😭. If no third filename is given, the name of the Pascal file is formed by adding .p to the root of the WEB file name.

The output file gets packed into lines of 72 characters or less, and the only concession to readability is terminating lines at semicolons when that can be done conveniently. minimal effort, maximum slay.

If the WEB program uses the built-in string handling feature (double-quoted strings), then a second output file appears: a string pool file, whose name is always formed by adding .pool to the root of the Pascal file name. 🧚

Now, the otangle variant supports a larger character range. It was written for the Omega project β€” the first TeX supporting Unicode β€” which is now provided as the aleph(1) descendant program. ancestral queen energy πŸ‘‘


πŸ’– OPTIONS πŸ’–

See tex(1) for details of command-line parsing.

⚠️ Some of these options may render the output unsuitable for processing by a Pascal compiler. be brave, but be aware.
  • --help β€” Print help message and exit. the classic.
  • --length number β€” Compare only the first number characters of identifiers when checking for collisions. The default is 32; the original tangle used 7. glow-up tbh.
  • --loose β€” When checking for collisions between identifiers, honor the settings of the --lowercase, --mixedcase, --uppercase, and --underline options. This is the default. chill vibes.
  • --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. no mercy 😀
  • --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.

And then the plot twist: otangle supports only the --help and --version options. that's it, that's the whole menu for that one πŸ™ˆ


🌈 ENVIRONMENT 🌈

These programs look for the input files using the environment variable WEBINPUTS. If it's not set, it uses the system default. See the Kpathsea manual at https://tug.org/kpathsea for the details of the searching β€” the receipts are all there, bestie πŸ”


πŸ‘‘ SEE ALSO πŸ‘‘

These latter two are by far the largest extant examples of WEB programs. like, absolutely massive. respect the grind. πŸ”₯


πŸŽ€ AUTHORS πŸŽ€

WEB was designed by Donald E. Knuth, based on an earlier system called DOC (implemented by Ignacio Zabala), inspired by considerable earlier work β€” notably Pierre-Arnoul de Marneffe's concept of "holon programming" (https://github.com/holon-scribe/holon-programming). the lore is deep πŸ“šβœ¨

The updates for Omega were written by John Plaice and Yannis Haralambous.

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.

Public discussion list and bug reports: https://lists.tug.org/tex-k


and that's the whole page, bestie!! 🫢 this one ships as Web2C 2026, dated 25 January 2026 β€” so like, shoutout to the entire Web2C 2026 era for keeping tangle alive and thriving. go write something literate. you ate. πŸ’œ

πŸ“¦ where this page comes from