docstrip

Most LaTeX packages (but not only such software) have their source code in a format that is sometimes called .dtx (after the most common extension) and other times docstrip (after the program used to process it). Features of this format is that code in different languages can occur in the same source file and that the source file as a whole can be made a LaTeX document which documents the software (hence a form of literate programming).

The docstrip module in tcllib implements the basic functionality of docstrip-the-program in Tcl. It also has a command docstrip::sourcefrom that lets a Tcl interpreter source code directly from the .dtx source, instead of having docstrip-the-program write it to file as is the traditional set-up. The current (2006) distribution of infix makes use of this feature.

Documentation: