Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
115 lines (87 sloc) 4.89 KB
│ ChezWEB: A WEB system for Scheme │
Copyright (c) 2012 Aaron W. Hsu <>.
ChezWEB is a system for doing Knuthian style WEB programming in Scheme, and
more particularly, it is implemented in Chez Scheme. It has a number of
novel features, and is designed to provide a level of integration with
Scheme that is not to be found in other Literate Programming systems. In
particular, it implements hygienic named sections that perserve hygiene and
scoping in the presence of definitions and the like.
I have provided the quickstart information first, and you can find the rest
of the documentation further down.
Installing ChezWEB from Binary
If you have a binary package of ChezWEB, you can simply drop the chezweave
and cheztangle programs wherever you want to install them. You must make
sure that chezwebmac.tex is in your TEX search path. The recommended
location for this is in your TEXMFLOCAL directory under tex/generic. You
will need to run texhash afterwards to ensure that the TeX indexes are up to
date. The other files are for your perusal and use if you need them, but
only the two program files and the TeX file are necessary to actually use
Installing ChezWEB from Source
The fastest way to install ChezWEB is to use the make file provided. There
are a few constants defined at the top of the file, which you can change for
your particular installation, but otherwise, it should be as easy as:
$ make build install
You should make sure you edit the constants to do what you want and to
install everything where you want them installed. The makefile assumes that
you already have a version of Chez Scheme installed.
A more complete installation line might look like this:
$ make build install \
PREFIX=<your_prefix> \
TEXDIR=... \
DOCDIR=... \
BINDIR=... \
You can learn more about these values by running the installit script
without any arguments. There are three main components to the ChezWEB
1) ChezWEAVE and ChezTANGLE programs
2) chezwebmac.tex macros
3) Runtime library for independent use
To get this all working, we have to execute three build scripts to link it
all up, followed by one install script.
bootstrap Bootstraps the ChezWEB system
tangleit Tangles the actual ChezWEB programs
weaveit Weaves the ChezWEB documentation
installit Installs all the components
Building ChezWEB without the compiler
If you only have Petite Chez Scheme, you can still use ChezWEB. There are
two things to change. Firstly, build the system using the 'petite' target
instead of the 'build' target. Secondly, make sure that your CHEZWEBHOME
environment variable points to the LIBDIR that you specified.
System Requirements
ChezWEB is tested on (Petite) Chez Scheme 8.4+, as it is built on R6RS and
relies on certain features introduced after version 8.0. Earlier versions
may run, but there is no guarantee, and you should really be using the
latest version of Chez Scheme 8.x.
If you want to actually do the weaving of the main ChezWEB document and
get some reasonable output, which includes running the weaveit program,
you will need to have a properly configured TeX Live installation with
a working MetaPost. There have been some reports of misconfigured
TeX Live installations which result in MetaPost not working, which will
cause errors in the weaveit part of the build. You do not actually
need to do this step if you just want to use the system, but you will
not get the documentation. I recommend that you just make sure you
have a working MetaPost.
A copy of the CWEB manual is included with this distribution. It provides
a basic overview of how a system like this should normally work. It does
not focus on ChezWEB specifically, which is a known problem that I hope to
rectify soon. If there are any volunteers....
Obtaining ChezWEB
Please visit the ChezWEB home page for the latest information on retrieving
Please contact Aaron W. Hsu <> if you have any
questions about the system, or if you have patches to commit. I
welcome any additions and contributions!
Jump to Line
Something went wrong with that request. Please try again.