# beginDocumentation -- start documentation section of a package

## Synopsis

• Usage:
beginDocumentation()
• Consequences:
• Initiates the documentation section of a package. If the documentation has previously been processed and stored, then the rest of the file after the invocation of beginDocumentation will be skipped. Otherwise the packages SimpleDoc and Text will be loaded and the rest of the file will be loaded.

## Description

Documentation for a package, and tests for the package, should be placed after this point in a package file. This way, documentation can be loaded separately, Macaulay2 examples in the documentation can be run, and the whole documentation can be stored in a database.

For an example, see an example of a package.

To write documentation without using the function beginDocumentation, which is just an optimization, use needsPackage to load the packages SimpleDoc and Text.