Comparison with doc

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:

* Keywords:
The Document package requires that keywords be on a line by themselves (after removing comments from the line), except for the always_print keywords. The doc routine does not have this requirement.

In addition to these differences, there are some other differences between Document and doc:

* Self-Documentation:
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.
* Language Options:
Document has options which allow the user to specify the source code language.
* Extensibility:
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 formatting language.
* Philosophy:
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.
Michael L. Hall