Closed DanGrayson closed 4 years ago
Writing the front page documentation of a package is essentially like designing a website. We could probably provide examples to make this easier, or maybe add an optional SimpleDoc tag for grouping?
This would be a good application of "Subnodes", an option to "document" and is available in SimpleDoc, as it is how a sequential book is organized, too.
Added in the SimpleDoc PR. Subnode can be used within Description. The syntax is more advanced, in particular, it supports nesting and @...@ replacement.
As an example, this:
Subnodes
:Special characters
:Wildcard
@TT "."@ -- match any character except the newline character
:Anchors
@TT "^"@ -- match the beginning of the string or the beginning of a line
@TT "$"@ -- match the end of the string or the end of a line
Turns into this:
If the line doesn't start with ":" or "@", then it is treated as a documentation key and passed through TOH as usual.
Frank Schreyer and David Eisenbud suggest that a package's documentation should be able to put the documentation nodes for functions into various subheadings, as manually illustrated here: https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-1.14/share/doc/Macaulay2/K3Carpets/html/.