.TH "DEMANDOC" "1" "September 12, 2014" "Debian" "General Commands Manual" .nh .if n .ad l .SH "NAME" \fBdemandoc\fR \- emit only text of UNIX manuals .SH "SYNOPSIS" .HP 9n \fBdemandoc\fR [\fB\-w\fR] [\fIfile\ ...\fR] .SH "DESCRIPTION" The \fBdemandoc\fR utility emits only the text portions of well-formed mdoc(7) and man(7) UNIX manual files. .PP By default, \fBdemandoc\fR parses standard input and outputs only text nodes, preserving line and column position. Escape sequences are omitted from the output. .PP Its arguments are as follows: .TP 8n \fB\-w\fR Output a word list. This outputs each word of text on its own line. A "word", in this case, refers to whitespace-delimited terms beginning with at least two letters and not consisting of any escape sequences. Words have their leading and trailing punctuation (double-quotes, sentence punctuation, etc.) stripped. .TP 8n \fIfile ...\fR The input files. .PP If a document is not well-formed, it is skipped. .PP The \fB\-i\fR, \fB\-k\fR, \fB\-m\fR, and \fB\-p\fR flags are silently discarded for calling compatibility with the historical deroff. .SH "EXIT STATUS" The \fBdemandoc\fR utility exits with one of the following values: .TP 8n 0 No errors occurred. .PD 0 .TP 8n 6 An operating system error occurred, for example memory exhaustion or an error accessing input files. Such errors cause \fBdemandoc\fR to exit at once, possibly in the middle of parsing or formatting a file. The output databases are corrupt and should be removed . .PD .SH "EXAMPLES" The traditional usage of \fBdemandoc\fR is for spell-checking manuals on BSD. This is accomplished as follows (assuming British spelling): .PP .RS 6n $ demandoc -w file.1 | spell -b .RE .SH "SEE ALSO" mandoc(1), man(7), mdoc(7) .SH "HISTORY" \fBdemandoc\fR replaces the historical deroff utility for handling modern man(7) and mdoc(7) documents. .SH "AUTHORS" The \fBdemandoc\fR utility was written by Kristaps Dzonsons <\fIkristaps@bsd.lv\fR>.