In the past, the Document package was able to process source
code formatted for the doc routine (written by Mark Gray), but
this capability has been de-selected. This section remains for
historical reasons, but will be deleted eventually.
Even when operating in the ``docstyle'' option, there might have been
slight differences between the output of the two routines:
- The Document package requires that keywords
be on a line by themselves (after
removing comments from the line), except for the
keywords. The doc routine does not have this
In addition to these differences, there are some other differences between
Document and doc:
Michael L. Hall
- Document allows the commands necessary to
process the documentation to be imbedded in the
file as well as the documentation itself. This
feature can also be used to include commands
which will self-test or run the source code.
Multiple Output Files:
- Document allows output to multiple
files from a single source file. This allows
the user to re-arrange the structure of the
documentation to suit his purposes.
- Document has options which allow the user to
specify the source code language.
- Document can easily be extended to include new
source code languages. The doc routine
is somewhat restricted to a single formatting
language, whereas Document is independent of
- Document makes a distinction between the keywords
(i.e. the language of the Document package), the
source code language, and the formatting language. The
doc routine does not make this distinction, and
uses elements of the source code language and the
formatting language as keywords.