As mentioned above, 3DLDF has been programmed using CWEB, which is a "literate programming" tool developed by Donald E. Knuth and Silvio Levy. See Sources of Information, for a reference to the CWEB manual. Knuth's TeX--The Program and Metafont--The Program both include a section "How to read a WEB" (pp. x-xv, in both volumes).
CWEB files combine source code
and documentation. Running
ctangle on a CWEB file,
main.web, produces the file
C or C++
cweave main.web creates a
TeX file with pretty-printed source code and nicely formatted
documentation. I find that using CWEB makes it more natural to
document my code as I write it, and makes the source files easier to
read when editing them. It does have certain consequences
with regard to compilation, but these are taken care of by
See Adding a File, and Changes, for more
The CWEB files in the directory
3DLDF-126.96.36.199/CWEB/ contain the
source code for 3DLDF. The file
3DLDFprg.web in this directory
is only ever used for cweaving; it is never ctangled and contains no
code for compilation. It does, however, include all of the other
CWEB files, so that
cweave 3DLDFprg.web generates the TeX file
containing the complete documentation of the source code of 3DLDF.
included in the distribution of 3DLDF as a
convenience. However, users may generate them themselves, should there
be some reason for doing so, by entering
from the command line of a shell from the working
Alternatively, the user may generate them
by hand from the working directory
3DLDF-188.8.131.52/CWEB/ in the
dvips -o 3DLDFprg.ps 3DLDFprg(possibly with additional options) generates
lpr -P<print queue
3DLDFprg.psto a printer, on a UNIX or UNIX-like system.
The individual commands may differ, depending on the system you're using.