In a single line, you can change for the better how you document your computer code. Here's that line:
For more details, read the manual (PDF, 320K). And yes, the manual was written in LaTeX, and contains the complete source code. (Regard it as proof of concept). Here's the manual as a .tex file (Dogwagger404.tex, 95K). You can turn it into a PDF using PDFLaTeX, or you can turn it into a Perl executable, using DogWagger!
Of course, (heh!) you need the Perl script for it to be able to make itself from Dogwagger404.tex, so we have a bit of a chicken-and-egg problem, unless you download the Perl script (about 29K). To prevent hassles with unhappy servers and so on, I've called it Dogwagger404.txt. On Linux/Unix/Mac systems, just run it from the command line. Try the help page first:
perl Dogwagger404.txt --helpUnder MS Windows, you might wish to rename the file to Dogwagger404.pl, and then run the script directly (If Perl is properly set up). Most Linux/Unix systems will have Perl built in, but Windows users may need to install Strawberry Perl or ActivePerl.
Noweb is a great tool, and has been around for years, but it has a couple of limitations (shared by many literate programming tools, and indeed documentation generators):
Yes. In fact, starting at version 4.0.1, Dogwagger was written in LyX. Here's the LyX source code: Dogwagger404.lyx (180K; you will also need the image Dogwagger.png which is at the head of this page, right click it to download it). See how you can simply embed your verbatim statements within Evil Red Text, and export the .lyx document as a .tex file (Pdflatex). You can then run Dogwagger on the .tex file. This is the origin of the Dogwagger404.tex file linked to above.
The one catch is that it's wise to put an extra comment line (% followed by a carriage return) above each "% Dogwagger" statement, as LyX sometimes reformats slightly according to its own rules. You can always still export to LaTeX.
Thanks to Mark Ellison for amendments to version 4.0.4 that allow components of multiple files to be inserted "in any order".
|Date of First Publication: 7/7/2005||Date of Last Update: 2012/05/16||Web page author: Click here|