NAME
macro package
SYNOPSIS
DESCRIPTION
The
package is a set of content-based and domain-based macros
used to format the
x
man pages.
The macro names and their meanings are
listed below for quick reference; for
a detailed explanation on using the package,
see the tutorial sampler
groff_mdoc(7)
Note that this is not the usual macro package for Linux documentation,
although it is used for documentation of several widely-used programs;
see
man(7)
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
package from other
formatting packages.
PAGE STRUCTURE DOMAIN
To create a valid manual page, these three macros, in this order,
are required:
- year
Document date.
- [volume]
Title, in upper case.
- [version/release]
Operating system
Section headers, paragraph breaks, lists and displays.
- .Sh
Section Headers.
Valid headers, in the order of presentation:
- NAME
Name section, should include the
or
and the
macros.
- SYNOPSIS
Usage.
- DESCRIPTION
General description, should include
options and parameters.
- VALUE
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.
- ALSO
Cross references and citations.
- TO
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.
- .Ss
Subsection Headers.
- .Pp
Paragraph Break.
Vertical space (one line).
- .D1
(D-one) Display-one
Indent and display one text line.
- .Dl
(D-ell) Display-one literal.
Indent and display one line of literal text.
- .Bd
Begin-display block.
Display options:
- ragged
Unjustified (ragged edges).
- filled
Justified.
- literal
Literal text or code.
- name
Read in named
and display.
- string
Offset display.
Acceptable
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.
- n
Where
is a number from
to
- Aa
Where
is a callable macro name.
- string
The width of
is used.
- .Ed
End-display (matches .Bd).
- .Bl
Begin-list.
Create lists or columns.
Options:
- List-types
- List
- List
- List
- List
- List
- List
- List
- List
- List-parameters
- offset
(All lists.) See
begin-display above.
- width
and
lists only.)
See
compact
(All lists.)
Suppresses blank lines.
.El
End-list.
.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:
In this example, the option enclosure macro
is parsed, and calls the callable content macro
which operates on the argument
and then calls the callable content macro
which operates on the argument
Some macros may be callable, but are not parsed and vice versa.
These macros are indicated in the
and
columns below.
Unless stated, manual domain macros share a common syntax:
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,
- Description
- deprecated.)
- name.
- argument.
- only).
- modifier.
- code).
- code).
- variable.
- argument.
- declaration.
- .Fc).
- command.
- text.
- name.
- .Oc).
- only).
- filename.
- -ansiC)
- name.
- only).
- Reference.
- Description
- author.
- title.
- (city).
- date.
- title.
- number.
- information.
- number(s).
- Name.
- title.
- volume.
- quote.
- quote.
- Apostrophe.
- quote.
- UNIX
- quote.
- mode.
- quote.
- quote.
- .
- \*qoff\*q)
- quote.
- quote.
- quote.
- quote.
- mode.
- English).
- quote.
- system
- (no-op).
- space.
- quote.
- string.
- quote.
- quote.
- quote.
- literal.
- quote.
- quote.
- end.
- start.
- only).
- quote.
- quote.
- quote.
- \*qon\*q)
- Reference.
- English).
- Caps).
- Ux
- close.
- open.
Macro names ending in
quote remaining items on the argument list.
Macro names ending in
begin a quote which may span more than one line of input and
are close quoted with the matching macro name ending in
Enclosure macros may be nested and are limited to
eight arguments.
Note: the extended argument list macros
and the function enclosure macros
are irregular.
The extended list macros are used when the number of macro arguments
would exceed the
limitation of nine arguments.
The macros UR (starting a URI/URL hypertext reference), UE (ending one),
and UN (identifying a target for a reference) are also available.
See
man(7)
for more information on these macros.
FILES
- tmac.doc
Manual and general text domain macros.
- tmac.doc-common
Common structural macros and definitions.
- tmac.doc-nroff
Site dependent
style file.
- tmac.doc-ditroff
Site dependent
style file.
- tmac.doc-syms
Special defines (such as the standards macro).
SEE ALSO