=================================================================== RCS file: /cvs/mandoc/demandoc.1,v retrieving revision 1.1 retrieving revision 1.3 diff -u -p -r1.1 -r1.3 --- mandoc/demandoc.1 2011/09/01 10:46:28 1.1 +++ mandoc/demandoc.1 2011/09/01 22:09:50 1.3 @@ -1,4 +1,4 @@ -.\" $Id: demandoc.1,v 1.1 2011/09/01 10:46:28 kristaps Exp $ +.\" $Id: demandoc.1,v 1.3 2011/09/01 22:09:50 kristaps Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons .\" @@ -22,11 +22,12 @@ .Nd emit only text of UNIX manuals .Sh SYNOPSIS .Nm demandoc +.Op Fl w .Op Ar .Sh DESCRIPTION The .Nm -utility emits only the text portions of +utility emits only the text portions of well-formed .Xr mdoc 7 and .Xr man 7 @@ -34,6 +35,14 @@ and manual files. Its arguments are as follows: .Bl -tag -width Ds +.It Fl w +Output a word list. +This outputs each word of text on its own line. +A +.Qq word , +in this case, refers to whitespace-delimited terms beginning with at +least two letters after opening punctuation and not consisting of any +escape sequences. .It Ar The input files. .El @@ -43,9 +52,22 @@ If is not provided, .Nm accepts standard input. +If a document is not well-formed, it is skipped. .Pp +By default, .Nm -output preserves the line numbering and column position of its input. +parses its input and outputs only text nodes, preserving line column +position. +Escape sequences are omitted from the output. +.Pp +The +.Fl i , +.Fl k , +.Fl m , +and +.Fl p +flags are silently discarded for calling compatibility with the +historical deroff. .Sh EXIT STATUS The .Nm @@ -66,6 +88,13 @@ The output databases are corrupt and should be removed .Xr mandoc 1 , .Xr man 7 .Xr mdoc 7 +.Sh HISTORY +.Nm +replaces the historical deroff utility for handling modern +.Xr man 7 +and +.Xr mdoc 7 +documents. .Sh AUTHORS The .Nm