The macros are described in two groups, the first
includes the structural and physical page layout macros.
The second contains the manual and general text domain
macros which differentiate the
-mdoc
package from other
troff
formatting packages.
Valid headers, in the order of presentation:
- NAME
-
Name section, should include the
`.groff
'
or
`.Fn and
'
the
`. - macros.
'
- SYNOPSIS
-
Usage.
- DESCRIPTION
-
General description, should include
options and parameters.
- RETURN VALUES
-
Sections two and three function calls.
- ENVIRONMENT
-
Describe environment variables.
- FILES
-
Files associated with the subject.
- EXAMPLES
-
Examples and suggestions.
- DIAGNOSTICS
-
Normally used for section four device interface diagnostics.
- ERRORS
-
Sections two and three error and signal
handling.
- SEE ALSO
-
Cross references and citations.
- STANDARDS
-
Conformance to standards if applicable.
- HISTORY
-
If a standard is not applicable, the history
of the subject should be given.
- BUGS
-
Gotchas and caveats.
- 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:
- -ragged
-
Unjustified (ragged edges).
- -filled
-
Justified.
- -literal
-
Literal text or code.
- -file name
-
Read in named
file
and display.
- -offset string
-
Offset display.
Acceptable
string
values:
- left
-
Align block on left (default).
- center
-
Approximate center margin.
- indent
-
Six constant width spaces (a tab).
- indent-two
-
Two tabs.
- right
-
Left aligns block 2 inches from
right.
- xx n
-
Where
xx
is a number from
4 n
to
99 n
- Aa Where
-
Aa is a callable macro name.
- string
-
The width of
string
is used.
Li .Ed
End-display (matches .Bd).
Li .Bl
Begin-list.
Create lists or columns. Options:
- List-types
-
- -bullet Ta Bullet Item List
-
- -item Ta Unlabeled List
-
- -enum Ta Enumerated List
-
- -tag Ta Tag Labeled List
-
- -diag Ta Diagnostic List
-
- -hang Ta Hanging Labeled List
-
- -ohang Ta Overhanging Labeled List
-
- -inset Ta Inset or Run-on Labeled List
-
- List-parameters
-
- -offset
-
(All lists.) See
`.
'
begin-display
above.
- -width
-
( -tag
and
-hang
lists only.)
See
`.
'
- -compact
-
(All lists.)
Suppresses blank lines.
Li .El
End-list.
Li .It
List item.
MANUAL AND GENERAL TEXT DOMAIN MACROS
The manual and general text domain macros are special in that
most of them are parsed for callable macros
for example:
- .[-s file
]
-
Produces
[-s file
]
In this example, the option enclosure macro
`.[is]
'
parsed, and calls the callable content macro
`-
'
which
operates on the argument
`s'
and then calls the callable content macro
`file ...
'
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:
.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
`\&'
For example the following string,
- .file1 , file2 , file3 ) .
-
Produces
file1 , file2 , file3 )
Manual Domain Macros
- Name Parsed Callable Description
-
- Ta Yes Ta Yes Ta Address. (This macro may be deprecated.)
-
- Ta Yes Ta Yes Ta Command line argument.
-
- Ta Ta Ta Configuration declaration (section four only).
-
- Ta Yes Ta Yes Ta Command line argument modifier.
-
- Ta Yes Ta Yes Ta Defined variable (source code).
-
- Er Ta Yes Ta Yes Ta Error number (source code).
-
- Ta Yes Ta Yes Ta Environment variable.
-
- Fa Ta Yes Ta Yes Ta Function argument.
-
- Fd Ta Yes Ta Yes Ta Function declaration.
-
- Fn Ta Yes Ta Yes Ta Function call (also .Fo and .Fc).
-
- Ta Yes Ta Yes Ta Interactive command.
-
- Ta Yes Ta Yes Ta Literal text.
-
- Ta Yes Ta Yes Ta Command name.
-
- [Ta Yes Ta Yes Ta Option (also .[and .Oc).
]
-
- Ot Ta Yes Ta Yes Ta Old style function type (Fortran only).
-
- Ta Yes Ta Yes Ta Pathname or file name.
-
- St Ta Yes Ta Yes Ta Standards (-p1003.2, -p1003.1 or -ansiC)
-
- Ta Yes Ta Yes Ta Variable name.
-
- Vt Ta Yes Ta Yes Ta Variable type (Fortran only).
-
- TaYesTaYesTaManualPageCrossReference.
-
General Text Domain Macros
- Name Parsed Callable Description
-
- %A Ta Yes Ta Ta Reference author.
-
- %B Ta Yes Ta Yes Ta Reference book title.
-
- %C Ta Ta Ta Reference place of publishing (city).
-
- %D Ta Ta Ta Reference date.
-
- %J Ta Yes Ta Yes Ta Reference journal title.
-
- %N Ta Ta Ta Reference issue number.
-
- %O Ta Ta Ta Reference optional information.
-
- %P Ta Ta Ta Reference page number(s).
-
- %R Ta Ta Ta Reference report Name.
-
- %T Ta Yes Ta Yes Ta Reference article title.
-
- %V Ta Ta Ta Reference volume.
-
- Ac Ta Yes Ta Yes Ta Angle close quote.
-
- Ao Ta Yes Ta Yes Ta Angle open quote.
-
- Aq Ta Yes Ta Yes Ta Angle quote.
-
- AT&T System
Ta Ta Ta AT&T UNIX
-
- Bc Ta Yes Ta Yes Ta Bracket close quote.
-
- Bf Ta Ta Ta Begin font mode.
-
- Bo Ta Yes Ta Yes Ta Bracket open quote.
-
- Bq Ta Yes Ta Yes Ta Bracket quote.
-
- BSD Ta Yes Ta Yes Ta BSD
-
- Db Ta Ta Ta Debug (default is \*qoff\*q)
-
- Dc Ta Yes Ta Yes Ta Double close quote.
-
- Do Ta Yes Ta Yes Ta Double open quote.
-
- ``Ta Yes Ta Yes Ta Double quote.
''
-
- Ec Ta Yes Ta Yes Ta Enclose string close quote.
-
- Ef Ta Ta Ta End font mode.
-
- Ta Yes Ta Yes Ta Emphasis (traditional English).
-
- Eo Ta Yes Ta Yes Ta Enclose string open quote.
-
- Ta Yes Ta Yes Ta Normal text (no-op).
-
- Ta Yes Ta Yes Ta space.
-
- Pc Ta Yes Ta Yes Ta Parenthesis close quote.
-
- Ta Yes Ta Ta Prefix string.
-
- Po Ta Yes Ta Yes Ta Parenthesis open quote.
-
- (Ta Yes Ta Yes Ta Parentheses quote.
)
-
- Qc Ta Yes Ta Yes Ta Strait Double close quote.
-
- `Ta Yes
'
-
Ta Yes Ta Quoted literal.
- Qo Ta Yes Ta Yes Ta Strait Double open quote.
-
- Qq Ta Yes Ta Yes Ta Strait Double quote.
-