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

document -- package item: documentation node

Synopsis

Description

There are two basic types of documentation. The first type documents a function or a method, as in resolution(Module). The second type of documentation is for overviews or functions with methods, as in chain complexes or resolution respectively. The headings Usage, Function, Inputs, Outputs, and Consequences, are useful only for documentation of the first type.

Here is a template for a typical documentation node.

document {
     Key => key,
     Headline => "one line description", -- not needed for overviews
     Usage => "usage",
     BaseFunction => "function", -- usually not needed
     SourceCode => {METHOD1,...}, -- usually not needed
     Inputs => {
          inputs
          },
     Consequences => {
          effects
          },
     Outputs => {
          outputs
          },
     "A list of strings containings names of files in the auxiliary 
     directory of the package can go here; the files will be visible
     in the current directory while example code is run.",
     ExampleFiles => {"datafile1", "datafile2"},
     "There can be explanatory prose here in the form of a hypertext list.",
     EXAMPLE lines \/\/\/
                m2code
                m2code
                m2code
          \/\/\/,
     "There can be explanatory prose here in the form of a hypertext list.",
     Caveat => {"warning"},
     SeeAlso => {"other things"},
     Subnodes => {
          "subheading a",
          TO "node 1", 
          TO "node 2",
          "subheading b",
          TO "node 3", 
          ...
          },
     }

Hypertext markup items that you may use:

See also

Ways to use document :