version 1.92, 2010/04/07 18:50:35 |
version 1.93, 2010/04/07 19:37:54 |
Line 31 language is used to format |
|
Line 31 language is used to format |
|
.Bx |
.Bx |
.Ux |
.Ux |
manuals. In this reference document, we describe its syntax, structure, |
manuals. In this reference document, we describe its syntax, structure, |
and usage. Our reference implementation is |
and usage. Our reference implementation is mandoc; the |
.Xr mandoc 1 . |
|
The |
|
.Sx COMPATIBILITY |
.Sx COMPATIBILITY |
section describes compatibility with |
section describes compatibility with other troff \-mdoc implementations. |
.Xr groff 1 . |
|
. |
. |
.Pp |
.Pp |
An |
An |
|
|
.Sx \&Ux . |
.Sx \&Ux . |
. |
. |
.Ss \&Cd |
.Ss \&Cd |
Configuration declaration (suggested for use in section four and nine |
Configuration declaration. This denotes strings accepted by |
manuals). This denotes strings accepted by |
|
.Xr config 8 . |
.Xr config 8 . |
.Pp |
.Pp |
Examples: |
Examples: |
|
|
. |
. |
. |
. |
.Sh COMPATIBILITY |
.Sh COMPATIBILITY |
This section documents compatibility with other roff implementations, at |
This section documents compatibility between mandoc and other other |
this time limited to |
troff implementations, at this time limited to GNU troff |
.Xr groff 1 . |
.Pq Qq groff . |
The term |
The term |
.Qq historic groff |
.Qq historic groff |
refers to those versions before the |
refers to groff versions before the |
.Pa doc.tmac |
.Pa doc.tmac |
file re-write |
file re-write |
.Pq somewhere between 1.15 and 1.19 . |
.Pq somewhere between 1.15 and 1.19 . |
. |
. |
.Pp |
.Pp |
|
Heirloom troff, the other significant troff implementation accepting |
|
\-mdoc, is similar to historic groff. |
|
. |
|
.Pp |
.Bl -dash -compact |
.Bl -dash -compact |
.It |
.It |
The comment syntax |
The comment syntax |
.Sq \e." |
.Sq \e." |
is no longer accepted. |
is no longer accepted. |
|
. |
.It |
.It |
In |
In groff, the |
.Xr groff 1 , |
|
the |
|
.Sx \&Pa |
.Sx \&Pa |
macro does not format its arguments when used in the FILES section under |
macro does not format its arguments when used in the FILES section under |
certain list types. This irregular behaviour has been discontinued. |
certain list types. mandoc does. |
|
. |
.It |
.It |
Historic |
Historic groff does not print a dash for empty |
.Xr groff 1 |
|
does not print a dash for empty |
|
.Sx \&Fl |
.Sx \&Fl |
arguments. This behaviour has been discontinued. |
arguments. mandoc and newer groff implementations do. |
.It |
.It |
.Xr groff 1 |
groff behaves irregularly when specifying |
behaves strangely (even between versions) when specifying |
|
.Sq \ef |
.Sq \ef |
escapes within line-macro scopes. These aberrations have been |
.Sx Text Decoration |
normalised. |
within line-macro scopes. mandoc follows a consistent system. |
|
. |
.It |
.It |
Negative scaling units are now truncated to zero instead of creating |
In mandoc, negative scaling units are truncated to zero; groff would |
interesting conditions, such as with |
move to prior lines. Furthermore, the |
.Sx \&sp |
|
.Fl 1i . |
|
Furthermore, the |
|
.Sq f |
.Sq f |
scaling unit, while accepted, is rendered as the default unit. |
scaling unit, while accepted, is rendered as the default unit. |
|
. |
.It |
.It |
In quoted literals, groff allowed pair-wise double-quotes to produce a |
In quoted literals, groff allowed pair-wise double-quotes to produce a |
standalone double-quote in formatted output. This idiosyncratic |
standalone double-quote in formatted output. This idiosyncratic |
behaviour is no longer applicable. |
behaviour is not applicable in mandoc. |
|
. |
.It |
.It |
Display types |
Display types |
.Sx \&Bd |
.Sx \&Bd |
|
|
and |
and |
.Fl right |
.Fl right |
are aliases for |
are aliases for |
.Fl left . |
.Fl left |
The |
in manodc. Furthermore, the |
.Fl file Ar file |
.Fl file Ar file |
argument is ignored. Since text is not right-justified, |
argument is ignored. Lastly, since text is not right-justified in |
|
mandoc (or even groff), |
.Fl ragged |
.Fl ragged |
and |
and |
.Fl filled |
.Fl filled |
Line 1971 are aliases, as are |
|
Line 1969 are aliases, as are |
|
.Fl literal |
.Fl literal |
and |
and |
.Fl unfilled . |
.Fl unfilled . |
|
. |
.It |
.It |
Blocks of whitespace are stripped from both macro and free-form text |
In mandoc, blocks of whitespace are stripped from both macro and |
lines (except when in literal mode), while groff would retain whitespace |
free-form text lines (except when in literal mode); groff would retain |
in free-form text lines. |
whitespace in free-form text lines. |
|
. |
.It |
.It |
Historic groff has many un-callable macros. Most of these (excluding |
Historic groff has many un-callable macros. Most of these (excluding |
some block-level macros) are now callable, conforming to the |
some block-level macros) are now callable. |
non-historic groff version. |
. |
.It |
.It |
The vertical bar |
The vertical bar |
.Sq \(ba |
.Sq \(ba |
made historic groff |
made historic groff |
.Qq go orbital |
.Qq go orbital |
but is a proper delimiter in this implementation. |
but has been a proper delimiter since then. |
|
. |
.It |
.It |
.Sx \&It |
.Sx \&It Fl nested |
.Fl nested |
|
is assumed for all lists (it wasn't in historic groff): any list may be |
is assumed for all lists (it wasn't in historic groff): any list may be |
nested and |
nested and |
.Fl enum |
.Fl enum |
lists will restart the sequence only for the sub-list. |
lists will restart the sequence only for the sub-list. |
|
. |
.It |
.It |
Some manuals use |
Some manuals use |
.Sx \&Li |
.Sx \&Li |
incorrectly by following it with a reserved character and expecting the |
incorrectly by following it with a reserved character and expecting the |
delimiter to render. This is not supported. |
delimiter to render. This is not supported in mandoc. |
|
. |
.It |
.It |
In groff, the |
In groff, the |
.Sx \&Fo |
.Sx \&Fo |
macro only produces the first parameter. This is no longer the case. |
macro only produces the first parameter. This is not the case in |
|
mandoc. |
|
. |
|
.It |
|
In groff, the |
|
.Sx \&Cd , |
|
.Sx \&Er , |
|
and |
|
.Sx \&Ex |
|
macros were stipulated only to occur in certain manual sections. mandoc |
|
does not have these restrictions. |
.El |
.El |
. |
. |
. |
. |