version 1.176, 2011/01/22 14:05:33 |
version 1.181, 2011/03/07 01:35:51 |
|
|
.\" $Id$ |
.\" $Id$ |
.\" |
.\" |
.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> |
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> |
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> |
.\" |
.\" |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" Permission to use, copy, modify, and distribute this software for any |
Line 52 Other lines are interpreted within the current state. |
|
Line 52 Other lines are interpreted within the current state. |
|
.Nm |
.Nm |
documents may contain only graphable 7-bit ASCII characters, the space |
documents may contain only graphable 7-bit ASCII characters, the space |
character, and, in certain circumstances, the tab character. |
character, and, in certain circumstances, the tab character. |
All manuals must have |
|
.Ux |
|
line terminators. |
|
.Pp |
.Pp |
If the first character of a line is a space, that line is printed |
If the first character of a line is a space, that line is printed |
with a leading newline. |
with a leading newline. |
Line 200 Thus, the following produces |
|
Line 197 Thus, the following produces |
|
.Ed |
.Ed |
.Pp |
.Pp |
In free-form mode, quotes are regarded as opaque text. |
In free-form mode, quotes are regarded as opaque text. |
.Ss Dates |
|
There are several macros in |
|
.Nm |
|
that require a date argument. |
|
The canonical form for dates is the American format: |
|
.Pp |
|
.D1 Cm Month Day , Year |
|
.Pp |
|
The |
|
.Cm Day |
|
value is an optionally zero-padded numeral. |
|
The |
|
.Cm Month |
|
value is the full month name. |
|
The |
|
.Cm Year |
|
value is the full four-digit year. |
|
.Pp |
|
Reduced form dates are broken-down canonical form dates: |
|
.Pp |
|
.D1 Cm Month , Year |
|
.D1 Cm Year |
|
.Pp |
|
Some examples of valid dates follow: |
|
.Pp |
|
.D1 "May, 2009" Pq reduced form |
|
.D1 "2009" Pq reduced form |
|
.D1 "May 20, 2009" Pq canonical form |
|
.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 list indentation with the following: |
stipulating a two-inch list indentation with the following: |
|
|
By doing so, front-ends 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 |
.Ns Sq \&) , |
.Po |
|
.Sq \&) , |
.Sq \&] , |
.Sq \&] , |
.Sq \&' , |
.Sq \&' , |
.Sq \&" ) . |
.Sq \&" |
|
.Pc . |
.Pp |
.Pp |
The proper spacing is also intelligently preserved if a sentence ends at |
The proper spacing is also intelligently preserved if a sentence ends at |
the boundary of a macro line. |
the boundary of a macro line. |
|
|
Publication date of an |
Publication date of an |
.Sx \&Rs |
.Sx \&Rs |
block. |
block. |
This should follow the reduced or canonical form syntax described in |
Recommended formats of arguments are |
.Sx Dates . |
.Ar month day , year |
|
or just |
|
.Ar year . |
.Ss \&%I |
.Ss \&%I |
Publisher or issuer name of an |
Publisher or issuer name of an |
.Sx \&Rs |
.Sx \&Rs |
Line 1470 This is the mandatory first macro of any |
|
Line 1443 This is the mandatory first macro of any |
|
manual. |
manual. |
Its syntax is as follows: |
Its syntax is as follows: |
.Pp |
.Pp |
.D1 Pf \. Sx \&Dd Op Ar date |
.D1 Pf \. Sx \&Dd Ar month day , year |
.Pp |
.Pp |
The |
The |
.Ar date |
.Ar month |
may be either |
is the full English month name, the |
.Ar $\&Mdocdate$ , |
.Ar day |
which signifies the current manual revision date dictated by |
is an optionally zero-padded numeral, and the |
|
.Ar year |
|
is the full four-digit year. |
|
.Pp |
|
Other arguments are not portable; the |
|
.Xr mandoc 1 |
|
utility handles them as follows: |
|
.Bl -dash -offset 3n -compact |
|
.It |
|
To have the date automatically filled in by the |
|
.Ox |
|
version of |
.Xr cvs 1 , |
.Xr cvs 1 , |
or instead a valid canonical date as specified by |
the special string |
.Sx Dates . |
.Dq $\&Mdocdate$ |
If a date does not conform or is empty, the current date is used. |
can be given as an argument. |
|
.It |
|
A few alternative date formats are accepted as well |
|
and converted to the standard form. |
|
.It |
|
If a date string cannot be parsed, it is used verbatim. |
|
.It |
|
If no date string is given, the current date is used. |
|
.El |
.Pp |
.Pp |
Examples: |
Examples: |
.Dl \&.Dd $\&Mdocdate$ |
.Dl \&.Dd $\&Mdocdate$ |
Line 2206 Suppress a space. |
|
Line 2198 Suppress a space. |
|
Following invocation, text is interpreted as free-form text until a |
Following invocation, text is interpreted as free-form text until a |
macro is encountered. |
macro is encountered. |
.Pp |
.Pp |
|
This has no effect when invoked at the start of a macro line. |
|
.Pp |
Examples: |
Examples: |
.Dl \&.Fl o \&Ns \&Ar output |
.Dl \&.Fl o \&Ns \&Ar output |
.Pp |
.Pp |
Line 2770 does not start a new line. |
|
Line 2764 does not start a new line. |
|
\*[hist] |
\*[hist] |
.It |
.It |
.Sx \&Dd |
.Sx \&Dd |
without an argument prints |
with non-standard arguments behaves very strangely. |
.Dq Epoch . |
When there are three arguments, they are printed verbatim. |
In mandoc, it resolves to the current date. |
Any other number of arguments is replaced by the current date, |
|
but without any arguments the string |
|
.Dq Epoch |
|
is printed. |
.It |
.It |
.Sx \&Fl |
.Sx \&Fl |
does not print a dash for an empty argument. |
does not print a dash for an empty argument. |
Line 2906 This is not supported by mandoc. |
|
Line 2903 This is not supported by mandoc. |
|
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr man 1 , |
.Xr man 1 , |
.Xr mandoc 1 , |
.Xr mandoc 1 , |
|
.Xr eqn 7 , |
.Xr man 7 , |
.Xr man 7 , |
.Xr mandoc_char 7 |
.Xr mandoc_char 7 |
.Xr roff 7 , |
.Xr roff 7 , |