version 1.17, 2010/12/18 19:32:08 |
version 1.25, 2011/01/25 00:40:14 |
Line 57 To produce other characters in the output, use the esc |
|
Line 57 To produce other characters in the output, use the esc |
|
documented in the |
documented in the |
.Xr mandoc_char 7 |
.Xr mandoc_char 7 |
manual. |
manual. |
.Pp |
|
All manuals must have |
|
.Ux |
|
line terminators. |
|
.Sh REQUEST SYNTAX |
.Sh REQUEST SYNTAX |
A request or macro line consists of: |
A request or macro line consists of: |
.Pp |
.Pp |
Line 86 Thus, the following request lines are all equivalent: |
|
Line 82 Thus, the following request lines are all equivalent: |
|
\&.ig end |
\&.ig end |
\&. ig end |
\&. ig end |
.Ed |
.Ed |
|
.Sh MACRO SYNTAX |
|
Macros can be defined by the |
|
.Sx \&de |
|
request. |
|
When called, they follow the same syntax as requests, except that |
|
macro arguments may optionally be quoted by enclosing them |
|
in double quote characters |
|
.Pq Sq \(dq . |
|
To be recognized as the beginning of a quoted argument, the opening |
|
quote character must be preceded by a space character. |
|
.Pp |
|
A quoted argument may contain whitespace, and pairs of double quote |
|
characters |
|
.Pq Sq Qq |
|
resolve to single double quote characters. |
|
A quoted argument extends to the next double quote character that is not |
|
part of a pair, or to the end of the input line, whichever comes earlier. |
|
Leaving out the terminating double quote character at the end of the line |
|
is discouraged. |
|
For clarity, if more arguments follow on the same input line, |
|
it is recommended to follow the terminating double quote character |
|
by a space character; in case the next character after the terminating |
|
double quote character is anything else, it is regarded as the beginning |
|
of the next, unquoted argument. |
|
.Pp |
|
Both in quoted and unquoted arguments, pairs of backslashes |
|
.Pq Sq \e\e |
|
resolve to single backslashes. |
|
In unquoted arguments, space characters can alternatively be included |
|
by preceding them with a backslash |
|
.Pq Sq \e\~ , |
|
but quoting is usually better for clarity. |
.Sh REQUEST REFERENCE |
.Sh REQUEST REFERENCE |
The |
The |
.Xr mandoc 1 |
.Xr mandoc 1 |
Line 174 The macro can be invoked later using the syntax |
|
Line 202 The macro can be invoked later using the syntax |
|
.Pp |
.Pp |
.D1 Pf . Ar name Op Ar argument Op Ar argument ... |
.D1 Pf . Ar name Op Ar argument Op Ar argument ... |
.Pp |
.Pp |
Arguments are separated by blank characters and can be quoted |
Regarding argument parsing, see |
using double-quotes |
.Sx MACRO SYNTAX |
.Pq Sq \(dq |
above. |
to allow inclusion of blank characters into arguments. |
|
To include the double-quote character into a quoted argument, |
|
escape it from ending the argument by doubling it. |
|
.Pp |
.Pp |
The line invoking the macro will be replaced |
The line invoking the macro will be replaced |
in the input stream by the |
in the input stream by the |
Line 535 This request is intended to have one argument, |
|
Line 560 This request is intended to have one argument, |
|
consisting of an even number of characters. |
consisting of an even number of characters. |
Currently, it is ignored including its arguments, |
Currently, it is ignored including its arguments, |
and the number of arguments is not checked. |
and the number of arguments is not checked. |
|
.Ss \&T& |
|
Re-start a table layout, retaining the options of the prior table |
|
invocation. |
|
See |
|
.Sx \&TS . |
|
.Ss \&TE |
|
End a table context. |
|
See |
|
.Sx \&TS . |
|
.Ss \&TS |
|
Begin a table, which formats input in aligned rows and columns. |
|
See |
|
.Xr tbl 7 |
|
for a description of the tbl language. |
.Sh COMPATIBILITY |
.Sh COMPATIBILITY |
This section documents compatibility between mandoc and other other |
This section documents compatibility between mandoc and other other |
.Nm |
.Nm |
Line 565 using the next-line syntax. |
|
Line 604 using the next-line syntax. |
|
.Xr mandoc 1 , |
.Xr mandoc 1 , |
.Xr man 7 , |
.Xr man 7 , |
.Xr mandoc_char 7 , |
.Xr mandoc_char 7 , |
.Xr mdoc 7 |
.Xr mdoc 7 , |
|
.Xr tbl 7 |
.Rs |
.Rs |
.%A Joseph F. Ossanna |
.%A Joseph F. Ossanna |
.%A Brian W. Kernighan |
.%A Brian W. Kernighan |