[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2


deroff Command

Purpose

Removes nroff, troff, tbl, and eqn command constructs from files.

Syntax

deroff-ma -me -ms [  -mm [ -ml ] ] } [  -i | -l ] [  -k ] [  -p ] [ -u ] [  -w ] [  File ... ]

Description

The deroff command reads the specified files (standard input by default) containing English-language text, removes all troff requests, macro calls, backslash constructs, eqn command constructs (between .EQ and .EN lines and between delimiters), and tbl command descriptions, then writes the remainder of the file to standard output.

The deroff command normally follows chains of included files (.so and .nx troff command requests). If a file has already been included, a .so request naming it is ignored and an .nx request naming that file ends execution.

Note: The deroff command is not a complete troff command interpreter, so it can be confused by subtle constructs. Most errors result in too much rather than too little output.

Parameters


File Specifies English-language text files for the deroff command to remove the effects of troff, eqn, and tbl command processing. The default file is standard input.

Flags


-ma Ignores MA (man) macros in text so that only running text is output.
-me Ignores ME macros in text so that only running text is output. This is the default.
-ml Ignores MM macros in text (-mm flag) and also deletes MM list structures. The -mm flag must be specified with this flag.

Note: Do not use the -ml flag with nested lists.
-mm Ignores MM macros.
-ms Ignores MS macros in text so that only running text is output.
-i Suppresses the processing of included files.
-l Suppresses the processing of included files whose names begin with /usr/lib, such as macro files in /usr/lib/tmac.
-k Retains blocks specified to be kept together. The default is to remove kept blocks of text; for example, the .ne construct is removed.
-p Processes special paragraphs.
-u Removes the ASCII underline and boldface control sequences. This flag automatically sets the -w flag.
-w Makes the output a word list, with one word per line and all other characters deleted. Otherwise, the output follows the original.

In text, a word is any string that begins with a letter, contains 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 contains a total of at least three letters. Delimiters are any characters other than letters, digits, punctuation, apostrophes, and ampersands. Trailing apostrophes and ampersands are removed from words.

Related Information

The eqn command, neqn command, nroff command, tbl command, troff command.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]