deroff(1) deroff(1)
NAME
deroff - remove nroff, troff, tbl and eqn constructs
SYNOPSIS
deroff [option ...] [file ...]
DESCRIPTION
deroff removes all nroff and troff requests, backslash constructs,
macro calls, eqn constructs (between .EQ and .EN lines, and between
delimiters), and tbl table descriptions from a file or from standard
input and replaces them with white space. It then writes the remainder
of its input to standard output.
deroff follows chains of included files (.so and .nx commands); if a
file has already been included, a .so naming it is ignored and a .nx
naming it terminates execution.
OPTIONS
No option specified:
deroff filters out the above formatting constructs from its input
and writes the remainder to standard output.
-i (ignore) forces deroff to ignore all .so and .nx commands.
-m[m|l|s]
(m - macros) The standard macro packages mm and ms are included.
-mm causes the mm macros to be interpreted such that only running
text is output [i.e. no text (parameter) from macro lines]. -ms
functions analogously.
-ml automatically sets -mm as well and also causes lists associ-
ated with the mm macros to be deleted.
-w The output is a word list, one "word" per line, with all other
characters deleted. Otherwise, the output follows the original,
with the changes mentioned above.
In text, deroff sees a "word" as any string that includes at
least two letters and is composed of letters, digits, ampersands
(&), and apostrophes ('); in a macro call, however, a "word" is a
string that begins with at least two letters and includes a total
of at least three letters.
Delimiters are any characters other than letters, digits, apos-
trophes, and ampersands. Trailing apostrophes and ampersands are
removed from "words".
Page 1 Reliant UNIX 5.44 Printed 11/98
deroff(1) deroff(1)
file Name of the file to be filtered. More than one file may be named.
file not specified:
deroff reads from standard input.
EXAMPLES
The text of the troff file text.der is displayed with cat in unfil-
tered form and then filtered with deroff:
$ cat text.der
'\"macro stdmacro
.if n .pH g1.basename @(#)basename 40.5 of 10/10/89
.\" Copyright
.nr X
.if \nX=0 .ds x} basename 1 "User Environment Utilities" "\&"
.if \nX=1 .ds x} basename 1 "User Environment Utilities"
.if \nX=2 .ds x} basename 1 "" "\&"
.if \nX=3 .ds x} basename "" "" "\&"
.TH \*(x}
.if t .ds ' \h@.05m@\s+4\v@.333m@\'\v@-.333m@\s-4\h@.05m@
$ deroff text.der
macro stdmacro
Copyright
basename User Environment Utilities
basename User Environment Utilities
basename
basename
SEE ALSO
eqn(1M), mm(1M), mmt(1M), neqn(1M), nroff(1M), tbl(1M), troff(1M),
man(5), me(5), mm(5), ms(5), mv(5).
Page 2 Reliant UNIX 5.44 Printed 11/98