version 1.37, 2009/09/21 13:06:13 |
version 1.45, 2009/10/26 15:44:51 |
|
|
.Nm mandoc |
.Nm mandoc |
.Op Fl f Ns Ar option... |
.Op Fl f Ns Ar option... |
.Op Fl m Ns Ar format |
.Op Fl m Ns Ar format |
.Op Fl o Ns Ar option... |
.Op Fl O Ns Ar option... |
.Op Fl T Ns Ar output |
.Op Fl T Ns Ar output |
.Op Fl V |
.Op Fl V |
.Op Fl W Ns Ar err... |
.Op Fl W Ns Ar err... |
Line 54 Input format. See |
|
Line 54 Input format. See |
|
for available formats. Defaults to |
for available formats. Defaults to |
.Fl m Ns Ar andoc . |
.Fl m Ns Ar andoc . |
. |
. |
.It Fl o Ns Ar format |
.It Fl O Ns Ar option... |
Comma-separated output options. See |
Comma-separated output options. See |
.Sx Output Options |
.Sx Output Options |
for details. |
for details. |
Line 228 When rewinding the scope of a block macro, forces the |
|
Line 228 When rewinding the scope of a block macro, forces the |
|
scope violations. This can seriously mangle the resulting tree. |
scope violations. This can seriously mangle the resulting tree. |
.Pq mdoc only |
.Pq mdoc only |
. |
. |
|
.It Fl f Ns Ar ign-escape |
|
Ignore invalid escape sequences. |
|
This is the default, but the option can be used to override an earlier |
|
.Fl f Ns Ar strict . |
|
. |
.It Fl f Ns Ar no-ign-escape |
.It Fl f Ns Ar no-ign-escape |
Don't ignore invalid escape sequences. |
Don't ignore invalid escape sequences. |
. |
. |
Line 255 For the time being, only |
|
Line 260 For the time being, only |
|
.Fl T Ns Ar html |
.Fl T Ns Ar html |
is the only mode with output options: |
is the only mode with output options: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl o Ns Ar style=style.css |
.It Fl O Ns Ar style=style.css |
The file |
The file |
.Ar style.css |
.Ar style.css |
is used for an external style-sheet. This must be a valid absolute or |
is used for an external style-sheet. This must be a valid absolute or |
relative URI. |
relative URI. |
.It Fl o Ns Ar base=http://base/ |
.It Fl O Ns Ar includes=fmt |
The URL |
The string |
.Ar http://base/ |
.Ar fmt , |
is used as a base URL for all relative links. This is useful when |
for example, |
linking between documents via the |
.Ar ../src/%I.html , |
|
is used as a template for linked header files (usually via the |
|
.Sq \&In |
|
macro). Instances of |
|
.Sq \&%I |
|
are replaced with the include filename. The default is not to present a |
|
hyperlink. |
|
.It Fl O Ns Ar man=fmt |
|
The string |
|
.Ar fmt , |
|
for example, |
|
.Ar ../html%S/%N.%S.html , |
|
is used as a template for linked manuals (usually via the |
.Sq \&Xr |
.Sq \&Xr |
macro. |
macro). Instances of |
|
.Sq \&%N |
|
and |
|
.Sq %S |
|
are replaced with the linked manual's name and section, respectively. |
|
If no section is included, section 1 is assumed. The default is not to |
|
present a hyperlink. |
.El |
.El |
. |
. |
.Sh EXAMPLES |
.Sh EXAMPLES |
Line 277 To page manuals to the terminal: |
|
Line 300 To page manuals to the terminal: |
|
.D1 % mandoc mandoc.1 mdoc.3 mdoc.7 | less |
.D1 % mandoc mandoc.1 mdoc.3 mdoc.7 | less |
. |
. |
.Pp |
.Pp |
|
To produce HTML manuals with |
|
.Ar style.css |
|
as the style-sheet: |
|
.Pp |
|
.D1 % mandoc \-Thtml -ostyle=style.css mdoc.7 > mdoc.7.html |
|
.Pp |
To check over a large set of manuals: |
To check over a large set of manuals: |
. |
. |
.Pp |
.Pp |
|
|
.It |
.It |
Sentences are unilaterally monospaced. |
Sentences are unilaterally monospaced. |
.El |
.El |
|
. |
|
.Ss HTML output |
|
.Bl -bullet -compact |
|
.It |
|
The |
|
.Xr mdoc 7 |
|
.Sq \&Bl \-hang |
|
and |
|
.Sq \&Bl \-tag |
|
list types render similarly (no break following overreached left-hand |
|
side) due to the expressive constraints of HTML. |
|
. |
|
.It |
|
The |
|
.Xr man 7 |
|
.Sq IP |
|
and |
|
.Sq TP |
|
lists render similarly. |
|
.El |
.\" SECTION |
.\" SECTION |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr mandoc_char 7 , |
.Xr mandoc_char 7 , |
.Xr mdoc 7 , |
.Xr mdoc 7 , |
.Xr man 7 |
.Xr man 7 |
.\" SECTION |
. |
.Sh AUTHORS |
.Sh AUTHORS |
The |
The |
.Nm |
.Nm |
utility was written by |
utility was written by |
.An Kristaps Dzonsons Aq kristaps@kth.se . |
.An Kristaps Dzonsons Aq kristaps@kth.se . |
|
. |
|
.Sh CAVEATS |
|
In |
|
.Fl T Ns Ar html , |
|
the maximum size of an element attribute is determined by |
|
.Dv BUFSIZ , |
|
which is usually 1024 bytes. Be aware of this when setting long link |
|
formats with |
|
.Fl O Ns Ar man=fmt . |