version 1.96, 2011/01/24 23:17:19 |
version 1.101, 2011/07/03 22:57:32 |
Line 53 Other lines are interpreted within the current state. |
|
Line 53 Other lines are interpreted within the current state. |
|
.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 |
|
.Ux |
|
line termination. |
|
.Pp |
.Pp |
Blank lines are acceptable; where found, the output will assert a |
Blank lines are acceptable; where found, the output will assert a |
vertical space. |
vertical space. |
Line 121 rendered as an empty line. |
|
Line 118 rendered as an empty line. |
|
.Pp |
.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. |
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 |
.Ss Scaling Widths |
Many macros support scaled widths for their arguments, such as |
Many macros support scaled widths for their arguments, such as |
stipulating a two-inch paragraph indentation with the following: |
stipulating a two-inch paragraph indentation with the following: |
Line 217 appears as the first macro. |
|
Line 205 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 .SH LIBRARY |
\&.\e\*q .SH LIBRARY |
\&.\e\*q For sections 2 & 3 only. |
\&.\e\*q For sections 2 & 3 only. |
\&.\e\*q Not used in OpenBSD. |
\&.\e\*q 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\*q .SH IMPLEMENTATION NOTES |
Line 766 The paragraph left-margin width is reset to the defaul |
|
Line 758 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 |
Line 852 Begin literal mode: all subsequent free-form lines hav |
|
Line 845 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 . |
|
Literal mode is implicitly ended by |
|
.Sx \&SH |
|
or |
|
.Sx \&SS . |
.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 922 In GNU troff, this would result in strange behaviour. |
|
Line 919 In GNU troff, this would result in strange behaviour. |
|
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr man 1 , |
.Xr man 1 , |
.Xr mandoc 1 , |
.Xr mandoc 1 , |
|
.Xr eqn 7 , |
.Xr mandoc_char 7 , |
.Xr mandoc_char 7 , |
.Xr mdoc 7 , |
.Xr mdoc 7 , |
.Xr roff 7 , |
.Xr roff 7 , |