To create a valid manual page, these three macros, in this order,
are required:
-tag -width "xxxx.Os OPERATINGxSYSTEM [version/release]" -compact
Li ".Dd " Ar "Month day, year"
Document date.
Li ".Dt " Ar "DOCUMENT_TITLE [section] [volume]"
Title, in upper case.
Li ".Os " Ar "OPERATING_SYSTEM [version/release]"
Operating system
Tn BSD .
Section headers, paragraph breaks, lists and displays.
-tag -width flag -compact
Li .Sh
Section Headers.
Valid headers, in the order of presentation:
-tag -width "RETURN VALUES" -compact
Ar NAME
Name section, should include the
.Nm
or
.Fn
and the
.Nd
macros.
Ar SYNOPSIS
Usage.
Ar DESCRIPTION
General description, should include
options and parameters.
Ar RETURN VALUES
Sections two and three function calls.
Ar ENVIRONMENT
Describe environment variables.
Ar FILES
Files associated with the subject.
Ar EXAMPLES
Examples and suggestions.
Ar DIAGNOSTICS
Normally used for section four device interface diagnostics.
Ar ERRORS
Sections two and three error and signal
handling.
Ar SEE ALSO
Cross references and citations.
Ar STANDARDS
Conformance to standards if applicable.
Ar HISTORY
If a standard is not applicable, the history
of the subject should be given.
Ar BUGS
Gotchas and caveats.
Ar other
Customized headers may be added at
the authors discretion.
Li .Ss
Subsection Headers.
Li .Pp
Paragraph Break.
Vertical space (one line).
Li .D1
(D-one) Display-one
Indent and display one text line.
Li .Dl
(D-ell) Display-one literal.
Indent and display one line of literal text.
Li .Bd
Begin-display block.
Display options:
-tag -width "xoffset string " -compact
Fl ragged
Unjustified (ragged edges).
Fl filled
Justified.
Fl literal
Literal text or code.
Fl file Ar name
Read in named
file
and display.
Fl offset Ar string
Offset display.
Acceptable
string
values:
-tag -width indent-two -compact
Ar left
Align block on left (default).
Ar center
Approximate center margin.
Ar indent
Six constant width spaces (a tab).
Ar indent-two
Two tabs.
Ar right
Left aligns block 2 inches from
right.
Ar xx Ns Cm n
Where
xx
is a number from
4 Ns Cm n
to
99 Ns Cm n .
Ar Aa
Where
Aa
is a callable macro name.
Ar string
The width of
string
is used.
Li .Ed
End-display (matches .Bd).
Li .Bl
Begin-list.
Create lists or columns. Options:
-tag -width flag -compact
Ar List-types
-column xbullet -compact
Fl bullet Ta "Bullet Item List"
Fl item Ta "Unlabeled List"
Fl enum Ta "Enumerated List"
Fl tag Ta "Tag Labeled List"
Fl diag Ta "Diagnostic List"
Fl hang Ta "Hanging Labeled List"
Fl ohang Ta "Overhanging Labeled List"
Fl inset Ta "Inset or Run-on Labeled List"
List-parameters
-tag -width "xcompact " -compact
Fl offset
(All lists.) See
.Bd
begin-display above.
Fl width
( Fl tag
and
hang
lists only.)
See
.Bd .
Fl compact
(All lists.)
Suppresses blank lines.
Li .El
End-list.
Li .It
List item.
The manual and general text domain macros are special in that
most of them are parsed for callable macros
for example:
-tag -width ".Op Fl s Ar filex" -offset indent
Li ".Op Fl s Ar file"
Produces
Fl s Ar file
In this example, the option enclosure macro
.Op
is parsed, and calls the callable content macro
Fl
which operates on the argument
s
and then calls the callable content macro
Ar
which operates on the argument
file .
Some macros may be callable, but are not parsed and vice versa.
These macros are indicated in the
parsed
and
callable
columns below.
Unless stated, manual domain macros share a common syntax:
.Va argument [\ .\ ,\ ;\ :\ (\ )\ [\ ]\ argument \...\ ]
Note :
Opening and closing
punctuation characters are only recognized as such if they are presented
one at a time.
The string
"),"
is not recognized as punctuation and will be output with a leading white
space and in what ever font the calling macro uses.
The
argument list
"] ) ,"
is recognized as three sequential closing punctuation characters
and a leading white space is not output between the characters
and the previous argument (if any).
The special meaning of a punctuation character may be escaped
with the string
\e& .
For example the following string,
-tag -width "&.Ar file1\ , file2\ , file3\ )\ ." -offset indent
Li ".Ar file1\ , file2\ , file3\ )\ ."
Produces
file1 , file2 , file3 ) .
1i
-column "Name" "Parsed" Callable" -compact
Em Name Parsed Callable Description
Li Ad Ta Yes Ta Yes Ta "Address. (This macro may be deprecated.)"
Li An Ta Yes Ta Yes Ta "Author name."
Li Ar Ta Yes Ta Yes Ta "Command line argument."
Li Cd Ta No Ta No Ta "Configuration declaration (section four only)."
Li Cm Ta Yes Ta Yes Ta "Command line argument modifier."
Li Dv Ta Yes Ta Yes Ta "Defined variable (source code)."
Li Er Ta Yes Ta Yes Ta "Error number (source code)."
Li Ev Ta Yes Ta Yes Ta "Environment variable."
Li Fa Ta Yes Ta Yes Ta "Function argument."
Li Fd Ta Yes Ta Yes Ta "Function declaration."
Li Fn Ta Yes Ta Yes Ta "Function call (also .Fo and .Fc)."
Li Ic Ta Yes Ta Yes Ta "Interactive command."
Li Li Ta Yes Ta Yes Ta "Literal text."
Li Nm Ta Yes Ta Yes Ta "Command name."
Li Op Ta Yes Ta Yes Ta "Option (also .Oo and .Oc)."
Li Ot Ta Yes Ta Yes Ta "Old style function type (Fortran only)."
Li Pa Ta Yes Ta Yes Ta "Pathname or file name."
Li St Ta Yes Ta Yes Ta "Standards (-p1003.2, -p1003.1 or -ansiC)"
Li Va Ta Yes Ta Yes Ta "Variable name."
Li Vt Ta Yes Ta Yes Ta "Variable type (Fortran only)."
Li Xr Ta Yes Ta Yes Ta "Manual Page Cross Reference."
-column "Name" "Parsed" Callable" -compact
Em "Name Parsed Callable Description"
Li %A Ta Yes Ta No Ta "Reference author."
Li %B Ta Yes Ta Yes Ta "Reference book title."
Li %C Ta No Ta No Ta "Reference place of publishing (city)."
Li %D Ta No Ta No Ta "Reference date."
Li %J Ta Yes Ta Yes Ta "Reference journal title."
Li %N Ta No Ta No Ta "Reference issue number."
Li %O Ta No Ta No Ta "Reference optional information."
Li %P Ta No Ta No Ta "Reference page number(s)."
Li %R Ta No Ta No Ta "Reference report Name."
Li %T Ta Yes Ta Yes Ta "Reference article title."
Li %V Ta No Ta No Ta "Reference volume."
Li Ac Ta Yes Ta Yes Ta "Angle close quote."
Li Ao Ta Yes Ta Yes Ta "Angle open quote."
Li Ap Ta Yes Ta Yes Ta "Apostrophe."
Li Aq Ta Yes Ta Yes Ta "Angle quote."
Li At Ta No Ta No Ta Tn "AT&T UNIX"
Li Bc Ta Yes Ta Yes Ta "Bracket close quote."
Li Bf Ta No Ta No Ta "Begin font mode."
Li Bo Ta Yes Ta Yes Ta "Bracket open quote."
Li Bq Ta Yes Ta Yes Ta "Bracket quote."
Li Bx Ta Yes Ta Yes Ta Bx .
Li Db Ta No Ta No Ta "Debug (default is \\*qoff\\*q)"
Li Dc Ta Yes Ta Yes Ta "Double close quote."
Li Do Ta Yes Ta Yes Ta "Double open quote."
Li Dq Ta Yes Ta Yes Ta "Double quote."
Li Ec Ta Yes Ta Yes Ta "Enclose string close quote."
Li Ef Ta No Ta No Ta "End font mode."
Li Em Ta Yes Ta Yes Ta "Emphasis (traditional English)."
Li Eo Ta Yes Ta Yes Ta "Enclose string open quote."
Li Fx Ta No Ta No Ta Tn "FreeBSD operating system"
Li No Ta Yes Ta Yes Ta "Normal text (no-op)."
Li Ns Ta Yes Ta Yes Ta "No space."
Li Pc Ta Yes Ta Yes Ta "Parenthesis close quote."
Li Pf Ta Yes Ta No Ta "Prefix string."
Li Po Ta Yes Ta Yes Ta "Parenthesis open quote."
Li Pq Ta Yes Ta Yes Ta "Parentheses quote."
Li Qc Ta Yes Ta Yes Ta "Straight Double close quote."
Li Ql Ta Yes Ta Yes Ta "Quoted literal."
Li Qo Ta Yes Ta Yes Ta "Straight Double open quote."
Li Qq Ta Yes Ta Yes Ta "Straight Double quote."
Li Re Ta No Ta No Ta "Reference end."
Li Rs Ta No Ta No Ta "Reference start."
Li Rv Ta No Ta No Ta "Return values (sections two and three only)."
Li Sc Ta Yes Ta Yes Ta "Single close quote."
Li So Ta Yes Ta Yes Ta "Single open quote."
Li Sq Ta Yes Ta Yes Ta "Single quote."
Li Sm Ta No Ta No Ta "Space mode (default is \\*qon\\*q)"
Li Sx Ta Yes Ta Yes Ta "Section Cross Reference."
Li Sy Ta Yes Ta Yes Ta "Symbolic (traditional English)."
Li Tn Ta Yes Ta Yes Ta "Trade or type name (small Caps)."
Li Ux Ta Yes Ta Yes Ta Ux
Li Xc Ta Yes Ta Yes Ta "Extend argument list close."
Li Xo Ta Yes Ta Yes Ta "Extend argument list open."