[BACK]Return to deroff.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / deroff

Annotation of src/usr.bin/deroff/deroff.1, Revision 1.7

1.7     ! jmc         1: .\" $OpenBSD: deroff.1,v 1.6 2005/07/05 15:02:20 jmc Exp $
1.1       millert     2: .\"
                      3: .\" Copyright (c) 1990, 1993
                      4: .\"    The Regents of the University of California.  All rights reserved.
                      5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\" 1. Redistributions of source code must retain the above copyright
                     10: .\"    notice, this list of conditions and the following disclaimer.
                     11: .\" 2. Redistributions in binary form must reproduce the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer in the
                     13: .\"    documentation and/or other materials provided with the distribution.
1.4       millert    14: .\" 3. Neither the name of the University nor the names of its contributors
1.1       millert    15: .\"    may be used to endorse or promote products derived from this software
                     16: .\"    without specific prior written permission.
                     17: .\"
                     18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     21: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     28: .\" SUCH DAMAGE.
                     29: .\"
                     30: .\" Copyright (C) Caldera International Inc.  2001-2002.
                     31: .\" All rights reserved.
                     32: .\"
                     33: .\" Redistribution and use in source and binary forms, with or without
                     34: .\" modification, are permitted provided that the following conditions
                     35: .\" are met:
                     36: .\" 1. Redistributions of source code and documentation must retain the above
                     37: .\"    copyright notice, this list of conditions and the following disclaimer.
                     38: .\" 2. Redistributions in binary form must reproduce the above copyright
                     39: .\"    notice, this list of conditions and the following disclaimer in the
                     40: .\"    documentation and/or other materials provided with the distribution.
                     41: .\" 3. All advertising materials mentioning features or use of this software
                     42: .\"    must display the following acknowledgement:
                     43: .\"    This product includes software developed or owned by Caldera
                     44: .\"    International, Inc.
                     45: .\" 4. Neither the name of Caldera International, Inc. nor the names of other
                     46: .\"    contributors may be used to endorse or promote products derived from
                     47: .\"    this software without specific prior written permission.
                     48: .\"
                     49: .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
                     50: .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
                     51: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     52: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     53: .\" IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT,
                     54: .\" INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                     55: .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
                     56: .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     57: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
                     58: .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
                     59: .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     60: .\" POSSIBILITY OF SUCH DAMAGE.
                     61: .\"
                     62: .\"    @(#)deroff.1    8.1 (Berkeley) 6/6/93
                     63: .\"
                     64: .Dd June 6, 1993
                     65: .Dt DEROFF 1
                     66: .Os
                     67: .Sh NAME
                     68: .Nm deroff
                     69: .Nd remove nroff/troff, eqn, pic and tbl constructs
                     70: .Sh SYNOPSIS
                     71: .Nm deroff
                     72: .Op Fl ikpw
1.3       millert    73: .Oo
                     74: .Fl m
1.6       jmc        75: .Ar a | e | l | m | s
1.3       millert    76: .Oc
                     77: .Op Ar
1.1       millert    78: .Sh DESCRIPTION
                     79: .Nm deroff
                     80: reads each file in sequence and removes all
                     81: .Xr nroff 1
                     82: and
                     83: .Xr troff 1
                     84: command lines, backslash constructions, macro definitions,
                     85: .Xr eqn 1
1.6       jmc        86: constructs (between
                     87: .Dq .EQ
                     88: and
                     89: .Dq .EN
                     90: lines or between delimiters),
1.1       millert    91: .Xr pic 1
                     92: pictures,
                     93: and table descriptions and writes the remainder to the standard output.
                     94: .Nm
1.6       jmc        95: follows chains of included files
                     96: .Po
                     97: .Dq .so
                     98: and
                     99: .Dq .nx
                    100: commands
                    101: .Pc ;
                    102: if a file has already been included, a
                    103: .Dq .so
                    104: is ignored and a
                    105: .Dq .nx
1.1       millert   106: terminates execution.
                    107: If no input file is given,
                    108: .Nm
                    109: reads from the standard input.
                    110: .Pp
                    111: The options are as follows:
                    112: .Bl -tag -width Ds
                    113: .It Fl i
1.6       jmc       114: Ignore
                    115: .Dq .so
                    116: and
                    117: .Dq .nx
                    118: commands.
1.1       millert   119: .It Fl k
                    120: Keep blocks of text intact.
                    121: This is the default behavior unless the
                    122: .Fl m
                    123: option is given.
                    124: .It Fl m
                    125: Enable support for common macro packages.
                    126: The
                    127: .Fl m
                    128: option takes the following arguments:
1.6       jmc       129: .Pp
                    130: .Bl -tag -width Ds -offset indent -compact
1.1       millert   131: .It a
1.5       jmc       132: recognize
1.1       millert   133: .Xr man 7
                    134: macros.
                    135: .It e
1.5       jmc       136: recognize
1.1       millert   137: .Xr me 7
                    138: macros.
1.6       jmc       139: .It l
1.7     ! jmc       140: remove list constructs.
1.1       millert   141: .It m
1.5       jmc       142: recognize
1.6       jmc       143: .Xr mm 7
1.1       millert   144: macros.
                    145: .It s
1.5       jmc       146: recognize
1.6       jmc       147: .Xr ms 7
1.1       millert   148: macros.
                    149: .El
                    150: .It Fl p
                    151: Preserve paragraph macros.
                    152: This option only has an effect if the
                    153: .Fl m
                    154: option is also specified.
                    155: .It Fl w
                    156: Output a word list, one
                    157: .Sq word
                    158: (string of letters, digits, and apostrophes, beginning with a letter;
                    159: apostrophes are removed) per line, and all other characters ignored.
                    160: Normally, the output follows the original, with the deletions mentioned above.
                    161: .El
                    162: .Sh SEE ALSO
                    163: .Xr eqn 1 ,
                    164: .Xr nroff 1 ,
                    165: .Xr pic 1 ,
1.5       jmc       166: .Xr tbl 1 ,
                    167: .Xr troff 1
1.1       millert   168: .Sh HISTORY
                    169: .Nm
1.5       jmc       170: appeared in
                    171: .At v7 .
1.1       millert   172: .Sh BUGS
                    173: .Nm
                    174: is not a complete
                    175: .Xr troff 1
                    176: interpreter, so it can be confused by subtle constructs.
                    177: Most errors result in too much rather than too little output.
1.2       millert   178: .Pp
                    179: The
                    180: .Fl ml
                    181: option does not correctly handle nested lists.