next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc > The Macaulay2 language > packages > creating a package > writing documentation

writing documentation


Documentation for user defined packages and Macaulay2 itself is written using the document function, using a straightforward hypertext markup language. It is then formatted via installPackage as the documentation built in to Macaulay2, the online HTML documentation, and the info pages. Much of the format and structure of the documentation is automatically generated. Each documentation entry must be part of a package, and occur after the beginDocumentation section of the package.

Documentation templates

Each documentation entry is either an overview topic, or documentation of an individual feature, such as a symbol, a function name, a function call (that is, a function name, together with specific types of its arguments), an optional argument to a function, or a package

The easiest way to write documentation for an entry is to start with one of the following examples or templates, and then modify it.

The documentation writing cycle

Start with the package that you wish to document, and select one, or several of the above examples or templates. Cycle through the following steps as you refine your documentation.

Documentation style conventions

There are a few stylistic conventions that should be noted:

See also