##### Home

This is a literate programming system for Java, quite similar to CWEB and the original WEB system.     (What is literate programming?)

To see what programs written in the Rambutan idiom look like, see the Rambutan manual, which in the best literate programming traditions is also an article in TUGboat and an example program.

If your browser runs Java applets, you should see the example program running below. If not, see here. Try entering N1,N2 and pressing run to see the N1th to N2th primes.

The example is adapted from Knuth's original article on literate programming. The source is included in the Rambutan distribution.

### The distribution

Rambutan is free software under the GNU GPL.

You can download the distribution as a zip archive (currently version 1.22). Installation is pretty simple, and system privileges are not needed. See the README file for instructions.

### The development

I developed Rambutan using Norman Ramsey's Spidery WEB system, plus various modifications.

If you use CWEB a few points may be of interest:

• Rambutan allows multiple output files from tangle, which is pretty much essential for Java.
• It allows multiple-parameter macros (which of course C has, but Java does not). Credit for this and the previous feature belongs to Spidery WEB (especially since Spidery WEB predates Java!)
• If pdftex is used on the woven output, hyperlinks to sections are automatically added.
• I have reorganized the macros so that, while Plain TeX is the default, you can override it easily if you prefer LaTeX, and/or want to quote code in some larger document.
• Finally, the manual should be much easier to read than its ancestors!

### Using with LaTeX

1. Prepare your tex file with javaweave -x MyFile (the -x flag suppresses the index).
2. In the MyFile.tex (or whatever) change the first line from \input javaweb to \input javawebb
3. In the same file, remove the last line, which will be \vfill\end
4. Embed the code within a wrapper.
\documentclass{article}
\begin{document}
\begingroup
\input MyFile
\endgroup
\end{document}