The "Literate Programming Workshop" for the Mac

Revision 1.1:  Copyright Norbert Lindenberg, 1991, 1992. All rights rese=

The Literate Programming Workshop is a shareware application. The right is
granted to anyone not involved in military projects to freely copy,
distribute and test it. After two week's testing, however, you have to
decide whether you want to continue to use it or not. If you want to
continue to use LPW, you have to register your copy. The registration fee
is $50. Send your registration with a check to my address given above.

1.      Introduction

Have you ever tried to integrate documentation with your program source
text, to explain to other programmers (or even to your future self) what
you intend your code to do, or to add some graphics detailing the data
structures? Probably not. Current program editors don't allow graphics, and
they don't help you in writing nicely formatted texts. You could use a word
processor instead, if only you knew how to extract the source code for the

Enter the Literate Programming Workshop. LPW is a program editing
environment for "literate programming", the integrated development of
program source text and documentation in mixed documents. The term
"literate programming" was coined by Donald Knuth, and he also developed
the first system to support it, called WEB. Unfortunately, WEB is a batch
system, built on top of Knuth's TeX document formatting language. LPW, on
the other hand, is a true Macintosh application: fully interactive,
WYSIWYG, and easy to use.

LPW consists of two main components: a word processor for editing documents
which contain both source text and documentation (these documents are
called "module documents" in LPW), and a project management system that
keeps track of all the documents of a software development project and
maintains globally useful information regarding them in "project

As a LPW document has style information about each paragraph (and thus
information about the function of each paragraph), we can use this
information for defining "excerpts", or subset of all the paragraphs in a
document. This subset is selected according to an excerpt definition, in
which you mention all paragraph styles that a paragraph can have to be part
of that subset. For example, to extract the program source text from a
module document, you could define an excerpt "Source Text", giving the
paragraph styles "Procedure Heading", "Procedure Body", and "Type
Declaration", but not "Chapter Heading" or "Body Text". You can define an
arbitrary number of excerpts for a document. Useful examples are a
"Contents" excerpt, containing all chapter or section headings, or a
"Reference" excerpt, containing procedure headings, type declarations, and
their respective documentation.

An excerpt is a partial view on a document that can be displayed on screen,
printed, or saved to disk using the "Save As" command. The latter makes it
possible to prepare source text files for compilation, as well as
customized documentation.

[Link to the Source Code from the Program Library at SHSU (gopher)]