1*0a6a1f1dSLionel Sambuc.\" Id: demandoc.1,v 1.7 2013/07/13 19:41:16 schwarze Exp 292395e9cSLionel Sambuc.\" 392395e9cSLionel Sambuc.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> 492395e9cSLionel Sambuc.\" 592395e9cSLionel Sambuc.\" Permission to use, copy, modify, and distribute this software for any 692395e9cSLionel Sambuc.\" purpose with or without fee is hereby granted, provided that the above 792395e9cSLionel Sambuc.\" copyright notice and this permission notice appear in all copies. 892395e9cSLionel Sambuc.\" 992395e9cSLionel Sambuc.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1092395e9cSLionel Sambuc.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1192395e9cSLionel Sambuc.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1292395e9cSLionel Sambuc.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1392395e9cSLionel Sambuc.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1492395e9cSLionel Sambuc.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1592395e9cSLionel Sambuc.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1692395e9cSLionel Sambuc.\" 17*0a6a1f1dSLionel Sambuc.Dd July 13, 2013 1892395e9cSLionel Sambuc.Dt DEMANDOC 1 1992395e9cSLionel Sambuc.Os 2092395e9cSLionel Sambuc.Sh NAME 2192395e9cSLionel Sambuc.Nm demandoc 2292395e9cSLionel Sambuc.Nd emit only text of UNIX manuals 2392395e9cSLionel Sambuc.Sh SYNOPSIS 2492395e9cSLionel Sambuc.Nm demandoc 2592395e9cSLionel Sambuc.Op Fl w 2692395e9cSLionel Sambuc.Op Ar 2792395e9cSLionel Sambuc.Sh DESCRIPTION 2892395e9cSLionel SambucThe 2992395e9cSLionel Sambuc.Nm 3092395e9cSLionel Sambucutility emits only the text portions of well-formed 3192395e9cSLionel Sambuc.Xr mdoc 7 3292395e9cSLionel Sambucand 3392395e9cSLionel Sambuc.Xr man 7 3492395e9cSLionel Sambuc.Ux 3592395e9cSLionel Sambucmanual files. 3692395e9cSLionel Sambuc.Pp 3792395e9cSLionel SambucBy default, 3892395e9cSLionel Sambuc.Nm 3992395e9cSLionel Sambucparses standard input and outputs only text nodes, preserving line 4092395e9cSLionel Sambucand column position. 4192395e9cSLionel SambucEscape sequences are omitted from the output. 4292395e9cSLionel Sambuc.Pp 4392395e9cSLionel SambucIts arguments are as follows: 4492395e9cSLionel Sambuc.Bl -tag -width Ds 4592395e9cSLionel Sambuc.It Fl w 4692395e9cSLionel SambucOutput a word list. 4792395e9cSLionel SambucThis outputs each word of text on its own line. 4892395e9cSLionel SambucA 4992395e9cSLionel Sambuc.Qq word , 5092395e9cSLionel Sambucin this case, refers to whitespace-delimited terms beginning with at 5192395e9cSLionel Sambucleast two letters and not consisting of any escape sequences. 5292395e9cSLionel SambucWords have their leading and trailing punctuation 5392395e9cSLionel Sambuc.Pq double-quotes, sentence punctuation, etc. 5492395e9cSLionel Sambucstripped. 5592395e9cSLionel Sambuc.It Ar 5692395e9cSLionel SambucThe input files. 5792395e9cSLionel Sambuc.El 5892395e9cSLionel Sambuc.Pp 5992395e9cSLionel SambucIf a document is not well-formed, it is skipped. 6092395e9cSLionel Sambuc.Pp 6192395e9cSLionel SambucThe 6292395e9cSLionel Sambuc.Fl i , 6392395e9cSLionel Sambuc.Fl k , 6492395e9cSLionel Sambuc.Fl m , 6592395e9cSLionel Sambucand 6692395e9cSLionel Sambuc.Fl p 6792395e9cSLionel Sambucflags are silently discarded for calling compatibility with the 6892395e9cSLionel Sambuchistorical deroff. 6992395e9cSLionel Sambuc.Sh EXIT STATUS 7092395e9cSLionel SambucThe 7192395e9cSLionel Sambuc.Nm 7292395e9cSLionel Sambucutility exits with one of the following values: 7392395e9cSLionel Sambuc.Pp 7492395e9cSLionel Sambuc.Bl -tag -width Ds -compact 7592395e9cSLionel Sambuc.It 0 7692395e9cSLionel SambucNo errors occurred. 7792395e9cSLionel Sambuc.It 6 7892395e9cSLionel SambucAn operating system error occurred, for example memory exhaustion or an 7992395e9cSLionel Sambucerror accessing input files. 8092395e9cSLionel SambucSuch errors cause 8192395e9cSLionel Sambuc.Nm 8292395e9cSLionel Sambucto exit at once, possibly in the middle of parsing or formatting a file. 8392395e9cSLionel SambucThe output databases are corrupt and should be removed . 8492395e9cSLionel Sambuc.El 8592395e9cSLionel Sambuc.Sh EXAMPLES 8692395e9cSLionel SambucThe traditional usage of 8792395e9cSLionel Sambuc.Nm 8892395e9cSLionel Sambucis for spell-checking manuals on 8992395e9cSLionel Sambuc.Bx . 9092395e9cSLionel SambucThis is accomplished as follows (assuming British spelling): 9192395e9cSLionel Sambuc.Pp 9292395e9cSLionel Sambuc.Dl $ demandoc -w file.1 | spell -b 9392395e9cSLionel Sambuc.Sh SEE ALSO 9492395e9cSLionel Sambuc.Xr mandoc 1 , 9592395e9cSLionel Sambuc.Xr man 7 9692395e9cSLionel Sambuc.Xr mdoc 7 9792395e9cSLionel Sambuc.Sh HISTORY 9892395e9cSLionel Sambuc.Nm 9992395e9cSLionel Sambucreplaces the historical deroff utility for handling modern 10092395e9cSLionel Sambuc.Xr man 7 10192395e9cSLionel Sambucand 10292395e9cSLionel Sambuc.Xr mdoc 7 10392395e9cSLionel Sambucdocuments. 10492395e9cSLionel Sambuc.Sh AUTHORS 10592395e9cSLionel SambucThe 10692395e9cSLionel Sambuc.Nm 10792395e9cSLionel Sambucutility was written by 108*0a6a1f1dSLionel Sambuc.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv . 109