version 1.80, 2010/07/26 10:00:03 |
version 1.110, 2011/09/20 22:46:47 |
Line 39 language, instead. |
|
Line 39 language, instead. |
|
.Pp |
.Pp |
A |
A |
.Nm |
.Nm |
document follows simple rules: lines beginning with the control |
document follows simple rules: lines beginning with the control |
character |
character |
.Sq \&. |
.Sq \&. |
are parsed for macros. |
are parsed for macros. |
Other lines are interpreted within the scope of |
Lines not beginning with the control character are |
prior macros: |
interpreted within the scope of prior macros: |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
\&.SH Macro lines change control state. |
\&.SH Macro lines change control state. |
Other lines are interpreted within the current state. |
Text lines are interpreted within the current state. |
.Ed |
.Ed |
.Sh INPUT ENCODING |
.Sh LANGUAGE SYNTAX |
.Nm |
.Nm |
documents may contain only graphable 7-bit ASCII characters, the |
documents may contain only graphable 7-bit ASCII characters, the |
space character, and the tab character. |
space character, and the tab character. |
All manuals must have |
The back-space character |
.Ux |
.Sq \e |
line termination. |
indicates the start of an escape sequence for |
.Pp |
.Sx Comments , |
Blank lines are acceptable; where found, the output will assert a |
.Sx Predefined Strings , |
vertical space. |
and |
|
.Sx Special Characters . |
.Ss Comments |
.Ss Comments |
Text following a |
Text following an escaped double-quote |
.Sq \e\*q , |
.Sq \e\(dq , |
whether in a macro or free-form text line, is ignored to the end of |
whether in a macro or text line, is ignored to the end of |
line. |
line. |
A macro line with only a control character and comment escape, |
A macro line beginning with a control character and comment escape |
.Sq \&.\e\*q , |
.Sq \&.\e\(dq |
is also ignored. |
is also ignored. |
Macro lines with only a control character and optionally whitespace are |
Furthermore, |
|
macro lines with only a control character and optional trailing |
|
whitespace are |
stripped from input. |
stripped from input. |
|
.Pp |
|
Examples: |
|
.Bd -literal -offset indent -compact |
|
\&.\e\(dq This is a comment line. |
|
\&.\e\(dq The next line is ignored: |
|
\&. |
|
\&.Em Emphasis \e\(dq This is also a comment. |
|
.Ed |
.Ss Special Characters |
.Ss Special Characters |
Special characters may occur in both macro and free-form lines. |
Special characters are used to encode special glyphs and are rendered |
|
differently across output media. |
|
They may occur in both macro and text lines. |
Sequences begin with the escape character |
Sequences begin with the escape character |
.Sq \e |
.Sq \e |
followed by either an open-parenthesis |
followed by either an open-parenthesis |
Line 79 for two-character sequences; an open-bracket |
|
Line 92 for two-character sequences; an open-bracket |
|
.Sq \&[ |
.Sq \&[ |
for n-character sequences (terminated at a close-bracket |
for n-character sequences (terminated at a close-bracket |
.Sq \&] ) ; |
.Sq \&] ) ; |
or a single one-character sequence. |
or a single one character sequence. |
|
.Pp |
|
Examples: |
|
.Bl -tag -width Ds -offset indent -compact |
|
.It Li \e(em |
|
Two-letter em dash escape. |
|
.It Li \ee |
|
One-letter backslash escape. |
|
.El |
|
.Pp |
See |
See |
.Xr mandoc_char 7 |
.Xr mandoc_char 7 |
for a complete list. |
for a complete list. |
Examples include |
|
.Sq \e(em |
|
.Pq em-dash |
|
and |
|
.Sq \ee |
|
.Pq back-slash . |
|
.Ss Text Decoration |
.Ss Text Decoration |
Terms may be text-decorated using the |
Terms may be text-decorated using the |
.Sq \ef |
.Sq \ef |
escape followed by an indicator: B (bold), I (italic), R (Roman), or P |
escape followed by an indicator: B (bold), I (italic), R (regular), or P |
(revert to previous mode): |
(revert to previous mode). |
.Pp |
A numerical representation 3, 2, or 1 (bold, italic, and regular, |
.D1 \efBbold\efR \efIitalic\efP |
|
.Pp |
|
A numerical representation 3, 2, or 1 (bold, italic, and Roman, |
|
respectively) may be used instead. |
respectively) may be used instead. |
A text decoration is only valid, if specified in free-form text, until |
A text decoration is only valid, if specified in free-form text, until |
the next macro invocation; if specified within a macro, it's only valid |
the next macro invocation; if specified within a macro, it's only valid |
Line 109 open and close a font scope with each argument. |
|
Line 122 open and close a font scope with each argument. |
|
The |
The |
.Sq \ef |
.Sq \ef |
attribute is forgotten when entering or exiting a macro block. |
attribute is forgotten when entering or exiting a macro block. |
|
.Pp |
|
Examples: |
|
.Bl -tag -width Ds -offset indent -compact |
|
.It Li \efBbold\efR |
|
Write in bold, then switch to regular font mode. |
|
.It Li \efIitalic\efP |
|
Write in italic, then return to previous font mode. |
|
.El |
|
.Ss Predefined Strings |
|
Predefined strings, like |
|
.Sx Special Characters , |
|
mark special output glyphs. |
|
Predefined strings are escaped with the slash-asterisk, |
|
.Sq \e* : |
|
single-character |
|
.Sq \e*X , |
|
two-character |
|
.Sq \e*(XX , |
|
and N-character |
|
.Sq \e*[N] . |
|
.Pp |
|
Examples: |
|
.Bl -tag -width Ds -offset indent -compact |
|
.It Li \e*(Am |
|
Two-letter ampersand predefined string. |
|
.It Li \e*q |
|
One-letter double-quote predefined string. |
|
.El |
|
.Pp |
|
These strings are set using |
|
.Xr roff 7 , |
|
although |
|
.Nm |
|
consists of several pre-set escapes listed in |
|
.Xr mandoc_char 7 . |
.Ss Whitespace |
.Ss Whitespace |
Whitespace consists of the space character. |
Whitespace consists of the space character. |
In free-form lines, whitespace is preserved within a line; unescaped |
In text lines, whitespace is preserved within a line. |
trailing spaces are stripped from input (unless in a literal context). |
|
Blank free-form lines, which may include spaces, are permitted and |
|
rendered as an empty line. |
|
.Pp |
|
In macro lines, whitespace delimits arguments and is discarded. |
In macro lines, whitespace delimits arguments and is discarded. |
If arguments are quoted, whitespace within the quotes is retained. |
|
.Ss Dates |
|
The |
|
.Sx \&TH |
|
macro is the only |
|
.Nm |
|
macro that requires a date. |
|
The form for this date is the ISO-8601 |
|
standard |
|
.Cm YYYY-MM-DD . |
|
.Ss Scaling Widths |
|
Many macros support scaled widths for their arguments, such as |
|
stipulating a two-inch paragraph indentation with the following: |
|
.Bd -literal -offset indent |
|
\&.HP 2i |
|
.Ed |
|
.Pp |
.Pp |
The syntax for scaled widths is |
Unescaped trailing spaces are stripped from text line input unless in a |
.Sq Li [+-]?[0-9]*.[0-9]*[:unit:]? , |
literal context. |
|
In general, trailing whitespace on any input line is discouraged for |
|
reasons of portability. |
|
In the rare case that a blank character is needed at the end of an |
|
input line, it may be forced by |
|
.Sq \e\ \e& . |
|
.Pp |
|
In general, space characters can be rendered as literal |
|
characters by using non-breaking space escapes or |
|
.Sx Quotation . |
|
If the first character of a text line is a space, that line is printed |
|
with a leading newline. |
|
.Ss Quotation |
|
Macro arguments may be quoted with double-quotes to so that the |
|
enclosed text is one literal term. |
|
Quoted text, even if whitespace or if it would cause a macro invocation |
|
when unquoted, is considered literal text. |
|
.Pp |
|
A quoted argument begins with a double-quote preceded by whitespace. |
|
The next double-quote not pairwise adjacent to another double-quote |
|
terminates the literal, regardless of surrounding whitespace. |
|
.Pp |
|
Examples: |
|
.Bl -tag -width Ds -offset indent -compact |
|
.It Li .BR a \(dqb c\(dq d |
|
Group arguments |
|
.Qq b c |
|
into one un-bolded argument. |
|
If unspecified, |
|
.Qq a |
|
and |
|
.Qq c |
|
will be in bold, |
|
.Qq b |
|
and |
|
.Qq d |
|
in regular font mode. |
|
Furthermore, will be preserved between |
|
.Qq b |
|
and |
|
.Qq c . |
|
.El |
|
.Ss Scaling Widths |
|
Many macros support scaled widths for their arguments. |
|
The syntax for a scaled width is |
|
.Sq Li [+-]?[0-9]*.[0-9]*[:unit:] , |
where a decimal must be preceded or proceeded by at least one digit. |
where a decimal must be preceded or proceeded by at least one digit. |
Negative numbers, while accepted, are truncated to zero. |
Negative numbers, while accepted, are truncated to zero. |
|
.Pp |
The following scaling units are accepted: |
The following scaling units are accepted: |
.Pp |
.Pp |
.Bl -tag -width Ds -offset indent -compact |
.Bl -tag -width Ds -offset indent -compact |
Line 177 Using anything other than |
|
Line 251 Using anything other than |
|
or |
or |
.Sq v |
.Sq v |
is necessarily non-portable across output media. |
is necessarily non-portable across output media. |
|
See |
|
.Sx COMPATIBILITY . |
.Pp |
.Pp |
If a scaling unit is not provided, the numerical value is interpreted |
If a scaling unit is not provided, the numerical value is interpreted |
under the default rules of |
under the default rules of |
Line 184 under the default rules of |
|
Line 260 under the default rules of |
|
for vertical spaces and |
for vertical spaces and |
.Sq u |
.Sq u |
for horizontal ones. |
for horizontal ones. |
.Em Note : |
.Pp |
this differs from |
Examples: |
.Xr mdoc 7 , |
.Bl -tag -width Ds -offset indent -compact |
which, if a unit is not provided, will instead interpret the string as |
.It \&.HP 2i |
literal text. |
two-inch tagged list indentation |
|
.Pq see Sx \&HP |
|
.It \&.sp 2v |
|
two vertical spaces |
|
.Pq see Sx \&sp |
|
.El |
.Ss Sentence Spacing |
.Ss Sentence Spacing |
When composing a manual, make sure that sentences end at the end of |
Sentences should terminate at the end of an input line. |
a line. |
By doing this, a formatter will be able to apply the proper amount of |
By doing so, front-ends will be able to apply the proper amount of |
|
spacing after the end of sentence (unescaped) period, exclamation mark, |
spacing after the end of sentence (unescaped) period, exclamation mark, |
or question mark followed by zero or more non-sentence closing |
or question mark followed by zero or more non-sentence closing |
delimiters |
delimiters |
|
|
.Sq \&' , |
.Sq \&' , |
.Sq \&" |
.Sq \&" |
.Pc . |
.Pc . |
|
.Pp |
|
Examples: |
|
.Bd -literal -offset indent -compact |
|
Do not end sentences mid-line like this. Instead, |
|
end a sentence like this. |
|
A new sentence gets a new line. |
|
.Ed |
.Sh MANUAL STRUCTURE |
.Sh MANUAL STRUCTURE |
Each |
Each |
.Nm |
.Nm |
Line 214 appears as the first macro. |
|
Line 301 appears as the first macro. |
|
Beyond |
Beyond |
.Sx \&TH , |
.Sx \&TH , |
at least one macro or text node must appear in the document. |
at least one macro or text node must appear in the document. |
Documents are generally structured as follows: |
.Pp |
|
The following is a well-formed skeleton |
|
.Nm |
|
file for a utility |
|
.Qq progname : |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
\&.TH FOO 1 2009-10-10 |
\&.TH PROGNAME 1 2009-10-10 |
\&.SH NAME |
\&.SH NAME |
\efBfoo\efR \e(en a description goes here |
\efBprogname\efR \e(en a description goes here |
\&.\e\*q The next is for sections 2 & 3 only. |
\&.\e\(dq .SH LIBRARY |
\&.\e\*q .SH LIBRARY |
\&.\e\(dq For sections 2 & 3 only. |
|
\&.\e\(dq Not used in OpenBSD. |
\&.SH SYNOPSIS |
\&.SH SYNOPSIS |
\efBfoo\efR [\efB\e-options\efR] arguments... |
\efBprogname\efR [\efB\e-options\efR] arguments... |
\&.SH DESCRIPTION |
\&.SH DESCRIPTION |
The \efBfoo\efR utility processes files... |
The \efBfoo\efR utility processes files... |
\&.\e\*q .SH IMPLEMENTATION NOTES |
\&.\e\(dq .SH IMPLEMENTATION NOTES |
\&.\e\*q The next is for sections 2, 3, & 9 only. |
\&.\e\(dq Not used in OpenBSD. |
\&.\e\*q .SH RETURN VALUES |
\&.\e\(dq .SH RETURN VALUES |
\&.\e\*q The next is for sections 1, 6, 7, & 8 only. |
\&.\e\(dq For sections 2, 3, & 9 only. |
\&.\e\*q .SH ENVIRONMENT |
\&.\e\(dq .SH ENVIRONMENT |
\&.\e\*q .SH FILES |
\&.\e\(dq For sections 1, 6, 7, & 8 only. |
\&.\e\*q The next is for sections 1 & 8 only. |
\&.\e\(dq .SH FILES |
\&.\e\*q .SH EXIT STATUS |
\&.\e\(dq .SH EXIT STATUS |
\&.\e\*q .SH EXAMPLES |
\&.\e\(dq For sections 1, 6, & 8 only. |
\&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only. |
\&.\e\(dq .SH EXAMPLES |
\&.\e\*q .SH DIAGNOSTICS |
\&.\e\(dq .SH DIAGNOSTICS |
\&.\e\*q The next is for sections 2, 3, & 9 only. |
\&.\e\(dq For sections 1, 4, 6, 7, & 8 only. |
\&.\e\*q .SH ERRORS |
\&.\e\(dq .SH ERRORS |
\&.\e\*q .SH SEE ALSO |
\&.\e\(dq For sections 2, 3, & 9 only. |
\&.\e\*q .BR foo ( 1 ) |
\&.\e\(dq .SH SEE ALSO |
\&.\e\*q .SH STANDARDS |
\&.\e\(dq .BR foo ( 1 ) |
\&.\e\*q .SH HISTORY |
\&.\e\(dq .SH STANDARDS |
\&.\e\*q .SH AUTHORS |
\&.\e\(dq .SH HISTORY |
\&.\e\*q .SH CAVEATS |
\&.\e\(dq .SH AUTHORS |
\&.\e\*q .SH BUGS |
\&.\e\(dq .SH CAVEATS |
\&.\e\*q .SH SECURITY CONSIDERATIONS |
\&.\e\(dq .SH BUGS |
|
\&.\e\(dq .SH SECURITY CONSIDERATIONS |
|
\&.\e\(dq Not used in OpenBSD. |
.Ed |
.Ed |
.Pp |
.Pp |
The sections in a |
The sections in a |
Line 338 If not adhering to any standards, the |
|
Line 432 If not adhering to any standards, the |
|
.Em HISTORY |
.Em HISTORY |
section should be used. |
section should be used. |
.It Em HISTORY |
.It Em HISTORY |
The history of any manual without a |
A brief history of the subject, including where support first appeared. |
.Em STANDARDS |
|
section should be described in this section. |
|
.It Em AUTHORS |
.It Em AUTHORS |
Credits to authors, if applicable, should appear in this section. |
Credits to the person or persons who wrote the code and/or documentation. |
Authors should generally be noted by both name and email address. |
Authors should generally be noted by both name and email address. |
.It Em CAVEATS |
.It Em CAVEATS |
Common misuses and misunderstandings should be explained |
Common misuses and misunderstandings should be explained |
Line 369 Thus, the following are equivalent: |
|
Line 461 Thus, the following are equivalent: |
|
\&.\ \ \ PP |
\&.\ \ \ PP |
.Ed |
.Ed |
.Pp |
.Pp |
|
To include space characters in macro arguments, arguments may be quoted; |
|
see the |
|
.Sq MACRO SYNTAX |
|
section in the |
|
.Xr roff 7 |
|
manual for details. |
|
.Pp |
The |
The |
.Nm |
.Nm |
macros are classified by scope: line scope or block scope. |
macros are classified by scope: line scope or block scope. |
Line 402 The syntax is as follows: |
|
Line 501 The syntax is as follows: |
|
\&.YO \(lBbody...\(rB |
\&.YO \(lBbody...\(rB |
\(lBbody...\(rB |
\(lBbody...\(rB |
.Ed |
.Ed |
.Pp |
.Bl -column "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX" -offset indent |
.Bl -column -compact -offset indent "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX" |
|
.It Em Macro Ta Em Arguments Ta Em Scope Ta Em Notes |
.It Em Macro Ta Em Arguments Ta Em Scope Ta Em Notes |
.It Sx \&AT Ta <=1 Ta current Ta \& |
.It Sx \&AT Ta <=1 Ta current Ta \& |
.It Sx \&B Ta n Ta next-line Ta \& |
.It Sx \&B Ta n Ta next-line Ta \& |
Line 413 The syntax is as follows: |
|
Line 511 The syntax is as follows: |
|
.It Sx \&I Ta n Ta next-line Ta \& |
.It Sx \&I Ta n Ta next-line Ta \& |
.It Sx \&IB Ta n Ta current Ta \& |
.It Sx \&IB Ta n Ta current Ta \& |
.It Sx \&IR Ta n Ta current Ta \& |
.It Sx \&IR Ta n Ta current Ta \& |
.\" .It Sx \&PD Ta n Ta current Ta compat |
|
.It Sx \&R Ta n Ta next-line Ta \& |
.It Sx \&R Ta n Ta next-line Ta \& |
.It Sx \&RB Ta n Ta current Ta \& |
.It Sx \&RB Ta n Ta current Ta \& |
.It Sx \&RI Ta n Ta current Ta \& |
.It Sx \&RI Ta n Ta current Ta \& |
Line 423 The syntax is as follows: |
|
Line 520 The syntax is as follows: |
|
.It Sx \&UC Ta <=1 Ta current Ta \& |
.It Sx \&UC Ta <=1 Ta current Ta \& |
.It Sx \&br Ta 0 Ta current Ta compat |
.It Sx \&br Ta 0 Ta current Ta compat |
.It Sx \&fi Ta 0 Ta current Ta compat |
.It Sx \&fi Ta 0 Ta current Ta compat |
.It Sx \&i Ta n Ta current Ta compat |
.It Sx \&ft Ta 1 Ta current Ta compat |
.It Sx \&in Ta 1 Ta current Ta compat |
.It Sx \&in Ta 1 Ta current Ta compat |
.It Sx \&na Ta 0 Ta current Ta compat |
.It Sx \&na Ta 0 Ta current Ta compat |
.It Sx \&nf Ta 0 Ta current Ta compat |
.It Sx \&nf Ta 0 Ta current Ta compat |
.It Sx \&r Ta 0 Ta current Ta compat |
|
.It Sx \&sp Ta 1 Ta current Ta compat |
.It Sx \&sp Ta 1 Ta current Ta compat |
.\" .It Sx \&Sp Ta <1 Ta current Ta compat |
|
.\" .It Sx \&Vb Ta <1 Ta current Ta compat |
|
.\" .It Sx \&Ve Ta 0 Ta current Ta compat |
|
.El |
.El |
.Pp |
.Pp |
Macros marked as |
Macros marked as |
Line 475 No closure refers to an explicit block closing macro. |
|
Line 568 No closure refers to an explicit block closing macro. |
|
As a rule, block macros may not be nested; thus, calling a block 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 |
while another block macro scope is open, and the open scope is not |
implicitly closed, is syntactically incorrect. |
implicitly closed, is syntactically incorrect. |
.Pp |
.Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX" -offset indent |
.Bl -column -compact -offset indent "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX" |
|
.It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope Ta Em Notes |
.It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope Ta Em Notes |
.It Sx \&HP Ta <2 Ta current Ta paragraph Ta \& |
.It Sx \&HP Ta <2 Ta current Ta paragraph Ta \& |
.It Sx \&IP Ta <3 Ta current Ta paragraph Ta \& |
.It Sx \&IP Ta <3 Ta current Ta paragraph Ta \& |
Line 497 are as mentioned in |
|
Line 589 are as mentioned in |
|
.Pp |
.Pp |
If a block macro is next-line scoped, it may only be followed by in-line |
If a block macro is next-line scoped, it may only be followed by in-line |
macros for decorating text. |
macros for decorating text. |
|
.Sh MACRO OVERVIEW |
|
This overview is sorted such that macros of similar purpose are listed |
|
together, to help find the best macro for any given purpose. |
|
Deprecated macros are not included in the overview, but can be found |
|
in the alphabetical reference below. |
|
.Ss Page header and footer meta-data |
|
.Bl -column "PP, LP, P" description |
|
.It Sx TH Ta set the title: Ar title section date Op Ar source Op Ar volume |
|
.It Sx AT Ta display AT&T UNIX version in the page footer (<= 1 argument) |
|
.It Sx UC Ta display BSD version in the page footer (<= 1 argument) |
|
.El |
|
.Ss Sections and paragraphs |
|
.Bl -column "PP, LP, P" description |
|
.It Sx SH Ta section header (one line) |
|
.It Sx SS Ta subsection header (one line) |
|
.It Sx PP , LP , P Ta start an undecorated paragraph (no arguments) |
|
.It Sx RS , RE Ta reset the left margin: Op Ar width |
|
.It Sx IP Ta indented paragraph: Op Ar head Op Ar width |
|
.It Sx TP Ta tagged paragraph: Op Ar width |
|
.It Sx HP Ta hanged paragraph: Op Ar width |
|
.It Sx \&br Ta force output line break in text mode (no arguments) |
|
.It Sx \&sp Ta force vertical space: Op Ar height |
|
.It Sx fi , nf Ta fill mode and no-fill mode (no arguments) |
|
.It Sx in Ta additional indent: Op Ar width |
|
.El |
|
.Ss Physical markup |
|
.Bl -column "PP, LP, P" description |
|
.It Sx B Ta boldface font |
|
.It Sx I Ta italic font |
|
.It Sx R Ta roman (default) font |
|
.It Sx SB Ta small boldface font |
|
.It Sx SM Ta small roman font |
|
.It Sx BI Ta alternate between boldface and italic fonts |
|
.It Sx BR Ta alternate between boldface and roman fonts |
|
.It Sx IB Ta alternate between italic and boldface fonts |
|
.It Sx IR Ta alternate between italic and roman fonts |
|
.It Sx RB Ta alternate between roman and boldface fonts |
|
.It Sx RI Ta alternate between roman and italic fonts |
|
.El |
.Sh REFERENCE |
.Sh REFERENCE |
This section is a canonical reference to all macros, arranged |
This section is a canonical reference to all macros, arranged |
alphabetically. |
alphabetically. |
Line 511 The optional arguments specify which release it is fro |
|
Line 642 The optional arguments specify which release it is fro |
|
Text is rendered in bold face. |
Text is rendered in bold face. |
.Pp |
.Pp |
See also |
See also |
.Sx \&I , |
.Sx \&I |
.Sx \&R , |
|
.Sx \&b , |
|
.Sx \&i , |
|
and |
and |
.Sx \&r . |
.Sx \&R . |
.Ss \&BI |
.Ss \&BI |
Text is rendered alternately in bold face and italic. |
Text is rendered alternately in bold face and italic. |
Thus, |
Thus, |
Line 534 Whitespace between arguments is omitted in output. |
|
Line 662 Whitespace between arguments is omitted in output. |
|
.Pp |
.Pp |
Examples: |
Examples: |
.Pp |
.Pp |
.D1 \&.BI bold italic bold italic |
.Dl \&.BI bold italic bold italic |
.Pp |
.Pp |
The output of this example will be emboldened |
The output of this example will be emboldened |
.Dq bold |
.Dq bold |
|
|
Text is rendered in italics. |
Text is rendered in italics. |
.Pp |
.Pp |
See also |
See also |
.Sx \&B , |
.Sx \&B |
.Sx \&R , |
|
.Sx \&b , |
|
.Sx \&i , |
|
and |
and |
.Sx \&r . |
.Sx \&R . |
.Ss \&IB |
.Ss \&IB |
Text is rendered alternately in italics and bold face. |
Text is rendered alternately in italics and bold face. |
Whitespace between arguments is omitted in output. |
Whitespace between arguments is omitted in output. |
|
|
Text is rendered in roman (the default font). |
Text is rendered in roman (the default font). |
.Pp |
.Pp |
See also |
See also |
.Sx \&I , |
.Sx \&I |
.Sx \&B , |
|
.Sx \&b , |
|
.Sx \&i , |
|
and |
and |
.Sx \&r . |
.Sx \&B . |
.Ss \&RB |
.Ss \&RB |
Text is rendered alternately in roman (the default font) and bold face. |
Text is rendered alternately in roman (the default font) and bold face. |
Whitespace between arguments is omitted in output. |
Whitespace between arguments is omitted in output. |
|
|
.Ss \&RE |
.Ss \&RE |
Explicitly close out the scope of a prior |
Explicitly close out the scope of a prior |
.Sx \&RS . |
.Sx \&RS . |
|
The default left margin is restored to the state of the original |
|
.Sx \&RS |
|
invocation. |
.Ss \&RI |
.Ss \&RI |
Text is rendered alternately in roman (the default font) and italics. |
Text is rendered alternately in roman (the default font) and italics. |
Whitespace between arguments is omitted in output. |
Whitespace between arguments is omitted in output. |
|
|
and |
and |
.Sx \&IR . |
.Sx \&IR . |
.Ss \&RS |
.Ss \&RS |
Begin a part setting the left margin. |
Temporarily reset the default left margin. |
The left margin controls the offset, following an initial indentation, |
|
to un-indented text such as that of |
|
.Sx \&PP . |
|
This has the following syntax: |
This has the following syntax: |
.Bd -filled -offset indent |
.Bd -filled -offset indent |
.Pf \. Sx \&Rs |
.Pf \. Sx \&RS |
.Op Cm width |
.Op Cm width |
.Ed |
.Ed |
.Pp |
.Pp |
|
|
argument must conform to |
argument must conform to |
.Sx Scaling Widths . |
.Sx Scaling Widths . |
If not specified, the saved or default width is used. |
If not specified, the saved or default width is used. |
|
.Pp |
|
See also |
|
.Sx \&RE . |
.Ss \&SB |
.Ss \&SB |
Text is rendered in small size (one point smaller than the default font) |
Text is rendered in small size (one point smaller than the default font) |
bold face. |
bold face. |
Line 769 The paragraph left-margin width is reset to the defaul |
|
Line 894 The paragraph left-margin width is reset to the defaul |
|
Sets the title of the manual page with the following syntax: |
Sets the title of the manual page with the following syntax: |
.Bd -filled -offset indent |
.Bd -filled -offset indent |
.Pf \. Sx \&TH |
.Pf \. Sx \&TH |
.Cm title section |
.Ar title section date |
.Op Cm date Op Cm source Op Cm volume |
.Op Ar source Op Ar volume |
.Ed |
.Ed |
.Pp |
.Pp |
At least the upper-case document |
Conventionally, the document |
.Cm title |
.Ar title |
and the manual |
is given in all caps. |
.Cm section |
The recommended |
arguments must be provided. |
.Ar date |
The |
format is |
.Cm date |
.Sy YYYY-MM-DD |
argument should be formatted as described in |
as specified in the ISO-8601 standard; |
.Sx Dates , |
if the argument does not conform, it is printed verbatim. |
but will be printed verbatim if it is not. |
If the |
If the date is not specified, the current date is used. |
.Ar date |
The |
is empty or not specified, the current date is used. |
.Cm source |
The optional |
|
.Ar source |
string specifies the organisation providing the utility. |
string specifies the organisation providing the utility. |
The |
The |
.Cm volume |
.Ar volume |
string replaces the default rendered volume, which is dictated by the |
string replaces the default rendered volume, which is dictated by the |
manual section. |
manual section. |
.Pp |
.Pp |
Examples: |
Examples: |
.Pp |
.Pp |
.D1 \&.TH CVS 5 "1992-02-12" GNU |
.Dl \&.TH CVS 5 "1992-02-12" GNU |
.Ss \&TP |
.Ss \&TP |
Begin a paragraph where the head, if exceeding the indentation width, is |
Begin a paragraph where the head, if exceeding the indentation width, is |
followed by a newline; if not, the body follows on the same line after a |
followed by a newline; if not, the body follows on the same line after a |
|
|
.Sx \&P , |
.Sx \&P , |
and |
and |
.Sx \&PP . |
.Sx \&PP . |
.\" . |
|
.\" . |
|
.\" .Ss \&PD |
|
.\" Has no effect. Included for compatibility. |
|
.\" . |
|
.\" . |
|
.Ss \&UC |
.Ss \&UC |
Sets the volume for the footer for compatibility with man pages from |
Sets the volume for the footer for compatibility with man pages from |
BSD releases. |
BSD releases. |
|
|
.Ss \&fi |
.Ss \&fi |
End literal mode begun by |
End literal mode begun by |
.Sx \&nf . |
.Sx \&nf . |
.Ss \&i |
.Ss \&ft |
Italicise arguments. |
Change the current font mode. |
Synonym for |
See |
.Sx \&I . |
.Sx Text Decoration |
.Pp |
for a listing of available font modes. |
See also |
|
.Sx \&B , |
|
.Sx \&I , |
|
.Sx \&R . |
|
.Sx \&b , |
|
and |
|
.Sx \&r . |
|
.Ss \&in |
.Ss \&in |
Indent relative to the current indentation: |
Indent relative to the current indentation: |
.Pp |
.Pp |
Line 868 Begin literal mode: all subsequent free-form lines hav |
|
Line 981 Begin literal mode: all subsequent free-form lines hav |
|
line boundaries preserved. |
line boundaries preserved. |
May be ended by |
May be ended by |
.Sx \&fi . |
.Sx \&fi . |
.Ss \&r |
Literal mode is implicitly ended by |
Fonts and styles (bold face, italics) reset to roman (default font). |
.Sx \&SH |
.Pp |
or |
See also |
.Sx \&SS . |
.Sx \&B , |
|
.Sx \&I , |
|
.Sx \&R , |
|
.Sx \&b , |
|
and |
|
.Sx \&i . |
|
.Ss \&sp |
.Ss \&sp |
Insert vertical spaces into output with the following syntax: |
Insert vertical spaces into output with the following syntax: |
.Bd -filled -offset indent |
.Bd -filled -offset indent |
Line 896 Defaults to 1, if unspecified. |
|
Line 1003 Defaults to 1, if unspecified. |
|
.Pp |
.Pp |
See also |
See also |
.Sx \&br . |
.Sx \&br . |
.\" .Ss \&Sp |
|
.\" A synonym for |
|
.\" .Sx \&sp |
|
.\" .Cm 0.5v . |
|
.\" . |
|
.\" .Ss \&Vb |
|
.\" A synonym for |
|
.\" .Sx \&nf . |
|
.\" Accepts an argument (the height of the formatted space) which is |
|
.\" disregarded. |
|
.\" . |
|
.\" .Ss \&Ve |
|
.\" A synonym for |
|
.\" .Sx \&fi . |
|
.\" . |
|
.Sh COMPATIBILITY |
.Sh COMPATIBILITY |
This section documents areas of questionable portability between |
This section documents areas of questionable portability between |
implementations of the |
implementations of the |
|
|
.Pp |
.Pp |
.Bl -dash -compact |
.Bl -dash -compact |
.It |
.It |
The \es (font size), \em (font colour), and \eM (font filling colour) |
Do not depend on |
font decoration escapes are all discarded in mandoc. |
.Sx \&SH |
|
or |
|
.Sx \&SS |
|
to close out a literal context opened with |
|
.Sx \&nf . |
|
This behaviour may not be portable. |
.It |
.It |
In quoted literals, GNU troff allowed pair-wise double-quotes to produce |
In quoted literals, GNU troff allowed pair-wise double-quotes to produce |
a standalone double-quote in formatted output. |
a standalone double-quote in formatted output. |
It is not known whether this behaviour is exhibited by other formatters. |
It is not known whether this behaviour is exhibited by other formatters. |
.It |
.It |
|
troff suppresses a newline before |
|
.Sq \(aq |
|
macro output; in mandoc, it is an alias for the standard |
|
.Sq \&. |
|
control character. |
|
.It |
The |
The |
|
.Sq \eh |
|
.Pq horizontal position , |
|
.Sq \ev |
|
.Pq vertical position , |
|
.Sq \em |
|
.Pq text colour , |
|
.Sq \eM |
|
.Pq text filling colour , |
|
.Sq \ez |
|
.Pq zero-length character , |
|
.Sq \ew |
|
.Pq string length , |
|
.Sq \ek |
|
.Pq horizontal position marker , |
|
.Sq \eo |
|
.Pq text overstrike , |
|
and |
|
.Sq \es |
|
.Pq text size |
|
escape sequences are all discarded in mandoc. |
|
.It |
|
The |
|
.Sq \ef |
|
scaling unit is accepted by mandoc, but rendered as the default unit. |
|
.It |
|
The |
.Sx \&sp |
.Sx \&sp |
macro does not accept negative values in mandoc. |
macro does not accept negative values in mandoc. |
In GNU troff, this would result in strange behaviour. |
In GNU troff, this would result in strange behaviour. |
.It |
|
The |
|
.Sq \(aq |
|
macro control character, in GNU troff (and prior troffs) suppresses a |
|
newline before macro output; in mandoc, it is an alias for the standard |
|
.Sq \&. |
|
control character. |
|
.El |
.El |
.Sh SEE ALSO |
.Sh SEE ALSO |
|
.Xr man 1 , |
.Xr mandoc 1 , |
.Xr mandoc 1 , |
.Xr mandoc_char 7 |
.Xr eqn 7 , |
|
.Xr mandoc_char 7 , |
|
.Xr mdoc 7 , |
|
.Xr roff 7 , |
|
.Xr tbl 7 |
.Sh HISTORY |
.Sh HISTORY |
The |
The |
.Nm |
.Nm |
Line 956 utility written by Kristaps Dzonsons appeared in |
|
Line 1083 utility written by Kristaps Dzonsons appeared in |
|
This |
This |
.Nm |
.Nm |
reference was written by |
reference was written by |
.An Kristaps Dzonsons Aq kristaps@bsd.lv . |
.An Kristaps Dzonsons , |
|
.Mt kristaps@bsd.lv . |
.Sh CAVEATS |
.Sh CAVEATS |
Do not use this language. |
Do not use this language. |
Use |
Use |