Brief thoughts installing Norman Ramsey’s noweb. Which being the best literate programming tool out there, from my limited experience, although I’d like to make a big shout out to FunnelWeb, written by a friend of mine also from Adelaide.
I’m using Mac OS X, but I doubt the procedure below wouldn’t also work under Linux. Need to sort out how to do this on Windows, though, so I can use noweb with a new student I’ll be working with. The wayback machine has some instructions but I haven’t tried them yet.
For now I am going to take Norman’s advice and write here for using/installing noweb2, the current stable release. (Updating version 3 to a modern version of Lua and packaging it up for LuaTeX would be the ultimate. But not yet.)
The big, huge, important point when installing noweb is that you do not want to use the deprecated awk version over the new (relatively) and exciting Icon version.
So first download binaries of Icon from the University of Arizona and add it to your default path. (Side note: why does the Icon Makefile when compiling from source require a switch for the platform? Isn’t that easily automatically detectable?) Installing binaries is a matter of personal taste but I moved the Icon binary distribution to ~/bin/icon-v950
and then added
export PATH=~/bin/icon-v950/bin:${PATH}
to my .bash_profile
. Then download noweb and configure its Makefile in src/
appropriately:
- Change the line
LIBSRC=awk
toLIBSRC=icon
- Chage the line
ICONC=iconc
toICONC=icont
Set the
TEXINPUTS
line toTEXINPUTS=$(shell kpsewhich -expand-var='$$TEXMFLOCAL')/tex/latex/noweb
Then hit the familiar
cd src/
make all
sudo make install
and you should be set. I’m a bit confused about the correct procedure for getting man pages found automatically, so I also had to include the following in .bash_profile
export MANPATH=${MANPATH}:/usr/local/noweb/man
in order to get man noweb
and so on working. There’s a lot of documentation in these man pages that you do not want to miss out on!
Finally, to check that it’s all working, let’s compile the PDF documentation for the (La)TeX support:
cd tex/
noweave -autodefs tex -index -delay support.nw > support.tex
pdflatex support && pdflatex support
Skim over the resulting support.pdf document and witness yourself the amazing abilities of literate programming. (Especially notice the improvements over LaTeX’s docscript format.) But don’t use that document to try and work out how to customise noweb with LaTeX; the user-friendly documentation is inside man nowebstyle
.
And now to start using it for work rather than playing around with getting it installed.