'\"macro stdmacro
.if n .pH g1.deroff @(#)deroff	40.4 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} deroff 1 "Spell Utilities" "\&"
.if \nX=1 .ds x} deroff 1 "Spell Utilities"
.if \nX=2 .ds x} deroff 1 "" "\&"
.if \nX=3 .ds x} deroff "" "" "\&"
.TH \*(x}
.SH NAME
\f4deroff\f1 \- remove \f4nroff\fP/\f4troff\fP, \f4tbl\fP, and \f4eqn\fP constructs
.SH SYNOPSIS
\f4deroff\f1
[
\f4\-m\f1
.I x
] [
\f4\-w\f1
] [
.I files
]
.SH DESCRIPTION
\f4deroff\fP
reads each
of the
.I files\^
in sequence
and removes all
\f4troff\fP(1)
requests, macro calls, backslash constructs,
\f4eqn\fP(1)
constructs
(between
\f4\&.EQ\f1
and
.SM
\f4\&.EN\f1
lines, and between
delimiters),
and
\f4tbl\fP(1)
descriptions,
perhaps replacing them with white
space (blanks and blank lines),
and writes the remainder of the file on the standard output.
\f4deroff\fP
follows chains of included files
\f1(\f4.so\f1
and
\f4\&.nx\f1
\f4troff\fP
commands);
if a file has already been included, a
\f4\&.so\f1
naming that file
is ignored and a
\f4\&.nx\f1
naming that file
terminates execution.
If no input file is given,
\f4deroff\fP
reads the standard input.
.PP
The
\f4\-m\f1
option may be followed by an
\f4m\f1,
\f4s\f1,
or
\f4l\f1.
The
\f4\-mm\f1
option causes the macros to be
interpreted so that only
running text
is output
(i.e., no text
from macro lines.)\ 
The
\f4\-ml\f1
option
forces the
\f4\-mm\f1
option and also
causes deletion of lists associated with the
\f4mm\f1
macros.
.PP
If the
\f4\-w\f1
option is given, the output is a word list, one ``word''
per line, with all other characters deleted.
Otherwise, the output follows the original, with the deletions mentioned above.
In text, a ``word'' is any string
that
.I contains\^
at least two letters and
is composed
of letters, digits, ampersands
\f1(\f4&\f1),
and
apostrophes
\f1(\f4\^\(fm\^\f1);
in a macro call,
however,
a ``word'' is a string that
.I begins\^
with at least
two letters and contains a total of at least
three letters.
Delimiters are any characters other than
letters, digits, apostrophes,
and ampersands.
Trailing apostrophes and ampersands are removed from ``words.''
.SH SEE ALSO
\f4eqn\fP(1), \f4nroff\fP(1), \f4tbl\fP(1), \f4troff\fP(1) in the \f2DOCUMENTER'S WORKBENCH
Software Technical Discussion and Reference Manual\f1.
.SH NOTES
\f4deroff\fP
is not a complete
\f4troff\fP
interpreter,
so it can be confused by subtle constructs.
Most such errors result in too much rather than too little output.
.PP
The
\f4\-ml\f1
option does not handle nested lists correctly.
.\"	@(#)deroff.1	5.2 of 5/18/82
.Ee
