-.\" $Id: mdocterm.1,v 1.26 2009/03/19 11:49:00 kristaps Exp $
+.\" $Id: mandoc.1,v 1.1 2009/03/19 16:17:27 kristaps Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@openbsd.org>
.\"
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 19 2009 $
-.Dt mdocterm 1
+.Dt mandoc 1
.Os
.\" SECTION
.Sh NAME
-.Nm mdocterm
-.Nd mdoc macro compiler
+.Nm mandoc
+.Nd format and display BSD manuals
.\" SECTION
.Sh SYNOPSIS
-.Nm mdocterm
+.Nm mandoc
.Op Fl V
.Op Fl f Ns Ar option...
.Op Fl W Ns Ar err...
+.Op Fl T Ns Ar output
.Op Ar infile...
.\" SECTION
.Sh DESCRIPTION
.Nm
utility formats a BSD
.Dq mdoc
-manual page for display on the terminal. The arguments are as follows:
+manual page for display. The arguments are as follows:
.Bl -tag -width XXXXXXXXXXXX
.\" ITEM
-.It Fl V
-Print version and exit.
-.\" ITEM
.It Fl f Ns Ar option...
Override default compiler behaviour. See
.Sx Compiler Options
for details.
.\" ITEM
+.It Fl T
+Output format. See
+.Sx Output Formats
+for available formats. Defaults to
+.Fl T Ns Ar ascii .
+.\" ITEM
+.It Fl V
+Print version and exit.
+.\" ITEM
.It Fl W Ns Ar err...
Print warning messages. May be set to
.Fl W Ns Ar all
.El
.\" PARAGRAPH
.Pp
-The
-.Nm
-utility is a formatting front-end for
-.Xr mdoc 3 ,
-which parses the
-.Dq mdoc
-input, documented at
-.Xr mdoc 7
-and
-.Xr mdoc.samples 7 ,
-into an abstract syntax tree.
-.\" PARAGRAPH
-.Pp
By default,
.Nm
-reads from stdin and prints nroff
-.Qq backspace
-terminal-encoded output to stdout, at this time to a fixed column with
-of 78 characters.
+reads from stdin and prints 78-column backspace-encoded output to stdout
+as if
+.Fl T Ns Ar ascii
+were provided.
.\" PARAGRAPH
.Pp
-.Ex -std mdocterm
+.Ex -std mandoc
+.\" SUB-SECTION
+.Ss Output Formats
+The
+.Nm
+utility accepts the following
+.Fl T
+arguments:
+.Bl -tag -width XXXXXXXXXXXX -offset XXXX
+.It Ar ascii
+Produce 7-bit ASCII output, backspace-encoded for bold and underline
+styles. This is the default.
+.It Ar tree
+Produce an indented parse tree.
+.It Ar lint
+Parse only: produce no output.
+.El
.\" SUB-SECTION
.Ss Compiler Options
Default compiler behaviour may be overriden with the
.Fl f
-flag. The available options are as follows:
+flag.
.Bl -tag -width XXXXXXXXXXXX -offset XXXX
.It Fl f Ns Ar ign-scope
When rewinding the scope of a block macro, forces the compiler to ignore
options may be grouped and delimited with a comma. Using
.Fl f Ns Ar ign-scope,ign-escape ,
for example, will try to ignore scope and character-escape errors.
-.\" SUB-SECTION
-.Ss Character Escapes
-The
-.Nm
-utility correctly renders all
-.Sx Special Characters
-in
-.Xr mdoc 7
-in 7-bit ASCII.
-.Pp
-In the general sense,
-.Nm
-will make a
-.Pq best-effort
-to render complex characters; however, if a manual is using considerable
-special characters, some meaning may be lost in translation.
.\" SECTION
.Sh EXAMPLES
-To display this manual page:
-.\" PARAGRAPH
-.Pp
-.D1 % mdocterm \-Wall,error mdocterm.1
+To page this manual page on the terminal:
.\" PARAGRAPH
.Pp
-To pipe a manual page to the pager:
-.Pp
-.D1 % mdocterm mdocterm.1 | less
+.D1 % mandoc \-Wall,error mandoc.1 2>&1 | less
.\" SECTION
.Sh SEE ALSO
-.Xr mdoc 7 ,
-.Xr mdoc 3
+.Xr mdoc 7
.\"
.Sh AUTHORS
The
.An Kristaps Dzonsons Aq kristaps@openbsd.org .
.\" SECTION
.Sh CAVEATS
-See
-.Xr mdoc 3
-for a list of bugs, caveats, and incomplete macros regarding the
-document parse.
-.Pp
The
.Nm
utility doesn't yet know how to display the following:
.It
The
.Sq \&Xo/Xc
-pair isn't supported (and never will be).
+pair isn't supported.
.It
The
.Sq \&Sm
macro has no effect, yet.
.El
+.Pp
+Other macros still aren't supported by virtue of nobody complaining
+about their absence. Please report any omissions: this is a work in
+progress.