|MAN(7)||Miscellaneous Information Manual||MAN(7)|
manlanguage was the standard formatting language for AT&T UNIX manual pages from 1979 to 1989. Do not use it to write new manual pages: it is a purely presentational language and lacks support for semantic markup. Use the mdoc(7) language, instead.
man document, lines beginning with
the control character ‘.’ are called “macro
lines”. The first word is the macro name. It usually consists of two
capital letters. For a list of portable macros, see
MACRO OVERVIEW. The words following
the macro name are arguments to the macro.
Lines not beginning with the control character are called “text lines”. They provide free-form text to be printed; the formatting of the text depends on the respective processing context:
.SH Macro lines change control state. Text lines are interpreted within the current state.
Many aspects of the basic syntax of the
man language are based on the
roff(7) language; see the
LANGUAGE SYNTAX and MACRO SYNTAX
sections in the roff(7) manual for details,
in particular regarding comments, escape sequences, whitespace, and
.TH PROGNAME 1 1979-01-10 .SH NAME \fBprogname\fR \(en one line about what it does
|TH||set the title: name section date [source [volume]]|
|AT||display AT&T UNIX version in the page footer (<= 1 argument)|
|UC||display BSD version in the page footer (<= 1 argument)|
|SH||section header (one line)|
|SS||subsection header (one line)|
|PP||start an undecorated paragraph (no arguments)|
|RS, RE||reset the left margin: [width]|
|IP||indented paragraph: [head [width]]|
|TP||tagged paragraph: [width]|
|PD||set vertical paragraph distance: [height]|
|in||additional indent: [width]|
|SB||small boldface font|
|SM||small roman font|
|BI||alternate between boldface and italic fonts|
|BR||alternate between boldface and roman fonts|
|IB||alternate between italic and boldface fonts|
|IR||alternate between italic and roman fonts|
|RB||alternate between roman and boldface fonts|
|RI||alternate between roman and italic fonts|
.BI bold italic bold italic
tarequest. mandoc(1), it does the same as the roff(7) fi request (switch to fill mode). mandoc(1), it does the same as the roff(7)
nfrequest (switch to no-fill mode).
The width argument is a roff(7) scaling width. If specified, it's saved for later paragraph left margins; if unspecified, the saved or default width is used.
This macro is portable, but deprecated because it has no good representation in HTML output, usually ending up indistinguishable from PP.BI.
The width argument is a roff(7) scaling width defining the left margin. It's saved for later paragraph left-margins; if unspecified, the saved or default width is used.
The head argument is used as a leading term, flushed to the left margin. This is useful for bulleted paragraphs and so on.BI. PP. MT. This is a non-standard GNU extension.
The key is usually a command-line flag and value its argument.PP.
The height argument is a
roff(7) scaling width. It defaults to
1v. If the unit is omitted,
v is assumed.
The syntax is as follows:
The width argument is a roff(7) scaling width. If not specified, the saved or default width is used.
See also RE.
This is a non-standard GNU extension and very rarely used even in GNU manual pages. Formatting is similar to IP.
Conventionally, the document name is given
in all caps. The section is usually a single digit, in
a few cases followed by a letter. The recommended date
format is YYYY-MM-DD as specified in the ISO-8601
standard; if the argument does not conform, it is printed verbatim. If the
date is empty or not specified, the current date is
used. The optional source string specifies the
organisation providing the utility. When unspecified,
mandoc(1) uses its
-Ios argument. The volume
string replaces the default volume title of the
.TH CVS 5 1992-02-12 GNU
. TP [width ] head \" one line body
The width argument is a roff(7) scaling width. If specified, it's saved for later paragraph left-margins; if unspecified, the saved or default width is used.TP, except that no vertical spacing is inserted before the paragraph. This is a non-standard GNU extension and very rarely used even in GNU manual pages. BSD releases. The optional first argument specifies which release it is from. UR. This is a non-standard GNU extension. SY. This is a non-standard GNU extension.
If width is signed, the new offset is relative. Otherwise, it is absolute. This value is reset upon the next paragraph, section, or sub-section.
manmacros are classified by scope: line scope or block scope. Line macros are only scoped to the current line (and, in some situations, the subsequent line). Block macros are scoped to the current line and subsequent lines until closed by another block macro.
is equivalent to ‘.I foo’. If next-line macros are invoked consecutively, only the last is used. If a next-line macro is followed by a non-next-line macro, an error is raised.
The syntax is as follows:
.YO [body...] [body...]
The syntax is as follows:
.YO [head...] [head...] [body...]
The closure of body scope may be to the section, where a macro is closed by SH; sub-section, closed by a section or SS; or paragraph, closed by a section, sub-section, HP, IP, LP, P, PP, RE, SY, or TP. No closure refers to an explicit block closing macro.
As a rule, block macros may not be nested; thus, calling a block macro while another block macro scope is open, and the open scope is not implicitly closed, is syntactically incorrect.
|Macro||Arguments||Head Scope||Body Scope||Notes|
If a block macro is next-line scoped, it may only be followed by in-line macros for decorating text.
mandocuments, both Physical markup macros and roff(7) ‘
\f’ font escape sequences can be used to choose fonts. In text lines, the effect of manual font selection by escape sequences only lasts until the next macro invocation; in macro lines, it only lasts until the end of the macro scope. Note that macros like BR open and close a font scope for each argument. man(1), mandoc(1), eqn(7), mandoc_char(7), mdoc(7), roff(7), tbl(7)
manlanguage first appeared as a macro package for the roff typesetting system in Version 7 AT&T UNIX. It was later rewritten by James Clark as a macro package for groff. Eric S. Raymond wrote the extended
manmacros for groff in 2007. The stand-alone implementation that is part of the mandoc(1) utility written by Kristaps Dzonsons appeared in OpenBSD 4.6.
manreference was written by Kristaps Dzonsons <email@example.com>.
|January 1, 2019||OpenBSD-current|