-.\" $Id: mandoc.1,v 1.33 2009/08/20 12:26:15 kristaps Exp $
+.\" $Id: mandoc.1,v 1.38 2009/09/21 13:44:56 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: August 20 2009 $
+.Dd $Mdocdate: September 21 2009 $
.Dt MANDOC 1
.Os
.
.
.Sh SYNOPSIS
.Nm mandoc
-.Op Fl V
.Op Fl f Ns Ar option...
.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 V
+.Op Fl W Ns Ar err...
.Op Ar infile...
.
.
.
.Bl -tag -width Ds
.It Fl f Ns Ar option...
-Override default compiler behaviour. See
+Comma-separated compiler options. See
.Sx Compiler Options
for details.
.
for available formats. Defaults to
.Fl m Ns Ar andoc .
.
+.It Fl o Ns Ar format
+Comma-separated output options. See
+.Sx Output Options
+for details.
+.
.It Fl T Ns Ar output
Output format. See
.Sx Output Formats
Print version and exit.
.
.It Fl W Ns Ar err...
-Configure warning messages. Use
+Comma-separated warning options. Use
.Fl W Ns Ar all
to print warnings,
.Fl W Ns Ar error
Produce 7-bit ASCII output, backspace-encoded for bold and underline
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
Produce an indented parse tree.
.
.
.
.Ss Compiler Options
-Default compiler behaviour may be overriden with the
+Default compiler behaviour may be overridden with the
.Fl f
flag.
.
over a large set of manuals passed on the command line.
.El
.
-.Pp
-As with the
-.Fl W
-flag, multiple
-.Fl f
-options may be grouped and delimited with a comma. Using
-.Fl f Ns Ar ign-scope,no-ign-escape ,
-for example, will try to ignore scope and not ignore character-escape
-errors.
-.
+.Ss Output Options
+For the time being, only
+.Fl T Ns Ar html
+is the only mode with output options:
+.Bl -tag -width Ds
+.It Fl o Ns Ar style=style.css
+The file
+.Ar style.css
+is used for an external style-sheet. This must be a valid absolute or
+relative URI.
+.It Fl o Ns Ar base=http://base/
+The URL
+.Ar http://base/
+is used as a base URL for all relative links. This is useful when
+linking between documents via the
+.Sq \&Xr
+macro.
+.El
.
.Sh EXAMPLES
To page manuals to the terminal:
.D1 % mandoc mandoc.1 mdoc.3 mdoc.7 | less
.
.Pp
+To produce HTML manuals with
+.Pa http://localhost/
+as the base URI:
+.Pp
+.D1 % mandoc \-Thtml -obase=http://localhost/ mdoc.7 > mdoc.7.html
+.Pp
To check over a large set of manuals:
.
.Pp
.It
The
.Sq \&na
-and
-.Sq \&Dt
.Xr man 7
-macros in
+macro in
.Fl T Ns Ar ascii
-have no effect.
+has no effect.
.
.It
Words aren't hyphenated.