version 1.36, 2009/09/15 08:16:20 |
version 1.46, 2009/11/05 10:16:01 |
|
|
. |
. |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm mandoc |
.Nm mandoc |
.Op Fl V |
|
.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 W Ns Ar err... |
.Op Fl O Ns Ar option... |
.Op Fl T Ns Ar output |
.Op Fl T Ns Ar output |
|
.Op Fl V |
|
.Op Fl W Ns Ar err... |
.Op Ar infile... |
.Op Ar infile... |
. |
. |
. |
. |
Line 43 manual pages for display. The arguments are as follow |
|
Line 44 manual pages for display. The arguments are as follow |
|
. |
. |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl f Ns Ar option... |
.It Fl f Ns Ar option... |
Override default compiler behaviour. See |
Comma-separated compiler options. See |
.Sx Compiler Options |
.Sx Compiler Options |
for details. |
for details. |
. |
. |
Line 53 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 option... |
|
Comma-separated output options. See |
|
.Sx Output Options |
|
for details. |
|
. |
.It Fl T Ns Ar output |
.It Fl T Ns Ar output |
Output format. See |
Output format. See |
.Sx Output Formats |
.Sx Output Formats |
Line 63 for available formats. Defaults to |
|
Line 69 for available formats. Defaults to |
|
Print version and exit. |
Print version and exit. |
. |
. |
.It Fl W Ns Ar err... |
.It Fl W Ns Ar err... |
Configure warning messages. Use |
Comma-separated warning options. Use |
.Fl W Ns Ar all |
.Fl W Ns Ar all |
to print warnings, |
to print warnings, |
.Fl W Ns Ar error |
.Fl W Ns Ar error |
|
|
Produce 7-bit ASCII output, backspace-encoded for bold and underline |
Produce 7-bit ASCII output, backspace-encoded for bold and underline |
styles. This is the default. |
styles. This is the default. |
. |
. |
|
.It Fl T Ns Ar html |
|
Produce strict HTML-4.01 output, with a sane default style. |
|
. |
.It Fl T Ns Ar tree |
.It Fl T Ns Ar tree |
Produce an indented parse tree. |
Produce an indented parse tree. |
. |
. |
Line 219 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 241 Don't halt when encountering parse errors. Useful wit |
|
Line 255 Don't halt when encountering parse errors. Useful wit |
|
over a large set of manuals passed on the command line. |
over a large set of manuals passed on the command line. |
.El |
.El |
. |
. |
.Pp |
.Ss Output Options |
As with the |
For the time being, only |
.Fl W |
.Fl T Ns Ar html |
flag, multiple |
is the only mode with output options: |
.Fl f |
.Bl -tag -width Ds |
options may be grouped and delimited with a comma. Using |
.It Fl O Ns Ar style=style.css |
.Fl f Ns Ar ign-scope,no-ign-escape , |
The file |
for example, will try to ignore scope and not ignore character-escape |
.Ar style.css |
errors. |
is used for an external style-sheet. This must be a valid absolute or |
|
relative URI. |
|
.It Fl O Ns Ar includes=fmt |
|
The string |
|
.Ar fmt , |
|
for example, |
|
.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 |
|
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 |
. |
. |
. |
|
.Sh EXAMPLES |
.Sh EXAMPLES |
To page manuals to the terminal: |
To page manuals to the terminal: |
. |
. |
Line 260 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 |
Line 275 Each input and output format is separately noted. |
|
Line 321 Each input and output format is separately noted. |
|
. |
. |
. |
. |
.Ss ASCII output |
.Ss ASCII output |
.Bl -bullet -compact -width Ds |
.Bl -bullet -compact |
.It |
.It |
The |
The |
.Sq \e~ |
.Sq \e~ |
|
|
.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 . |
|
.Pp |
|
The |
|
.Fl T Ns Ar html |
|
utility doesn't support the |
|
.Sq \ef |
|
and |
|
.Sq \es |
|
text decorations documented in |
|
.Xr mdoc 7 |
|
and |
|
.Xr man 7 . |