intro/sections
—
recommended standard sections
For a utility program, you need the following sections in the following order:
- NAME (always)
- SYNOPSIS (always)
- DESCRIPTION (always)
- ENVIRONMENT (sometimes)
- FILES (sometimes)
- EXIT STATUS (always)
- EXAMPLES (usually)
- DIAGNOSTICS (sometimes)
- SEE ALSO (usually)
- STANDARDS (often)
- HISTORY (usually)
- AUTHORS (usually)
For a library function, you need the following sections in the following order:
- NAME (always)
- SYNOPSIS (always)
- DESCRIPTION (always)
- RETURN VALUES (always)
- EXAMPLES (usually)
- ERRORS (somtimes)
- SEE ALSO (usually)
- STANDARDS (often)
- HISTORY (usually)
- AUTHORS (usually)
Other standard sections may be useful, too.
The MANUAL STRUCTURE section in the
mdoc(7)
manual.