]> git.cameronkatri.com Git - mandoc.git/blobdiff - mandoc.1
Split mdocterm.c -> main.c terminal.c.
[mandoc.git] / mandoc.1
similarity index 70%
rename from mdocterm.1
rename to mandoc.1
index 6922c618f48fa1a00781ee301c3ea3a29adfe532..7e32f7ffcc4fb3c207d0b4d816220a2a8c8ffbd0 100644 (file)
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $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
@@ -36,17 +37,23 @@ The
 .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
@@ -69,33 +76,36 @@ If unspecified, reads from stdin.
 .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
@@ -114,37 +124,15 @@ flag, multiple
 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
@@ -153,11 +141,6 @@ utility was written by
 .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:
@@ -174,9 +157,13 @@ displays only accept text contents.
 .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.