Annotation of src/usr.bin/deroff/deroff.1, Revision 1.5
1.5 ! jmc 1: .\" $OpenBSD: deroff.1,v 1.4 2003/06/03 02:56:07 millert 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
75: .Ar m | s | e | a | l
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
86: constructs (between `.EQ' and `.EN' lines or between delimiters),
87: .Xr pic 1
88: pictures,
89: and table descriptions and writes the remainder to the standard output.
90: .Nm
91: follows chains of included files (`.so' and `.nx' commands);
92: if a file has already been included, a `.so' is ignored and a `.nx'
93: terminates execution.
94: If no input file is given,
95: .Nm
96: reads from the standard input.
97: .Pp
98: The options are as follows:
99: .Bl -tag -width Ds
100: .It Fl i
101: Ignore `.so' and `.nx' commands.
102: .It Fl k
103: Keep blocks of text intact.
104: This is the default behavior unless the
105: .Fl m
106: option is given.
107: .It Fl m
108: Enable support for common macro packages.
109: The
110: .Fl m
111: option takes the following arguments:
112: .Bl -tag -width Ds
113: .It a
1.5 ! jmc 114: recognize
1.1 millert 115: .Xr man 7
116: macros.
117: .It e
1.5 ! jmc 118: recognize
1.1 millert 119: .Xr me 7
120: macros.
121: .It m
1.5 ! jmc 122: recognize
1.1 millert 123: .Xr me 7
124: macros.
125: .It s
1.5 ! jmc 126: recognize
1.1 millert 127: .Xr me 7
128: macros.
129: .It l
1.5 ! jmc 130: recognize
1.1 millert 131: .Xr mm 7
132: macros and delete
133: .Xr mm 7
134: lists.
135: .El
136: .It Fl p
137: Preserve paragraph macros.
138: This option only has an effect if the
139: .Fl m
140: option is also specified.
141: .It Fl w
142: Output a word list, one
143: .Sq word
144: (string of letters, digits, and apostrophes, beginning with a letter;
145: apostrophes are removed) per line, and all other characters ignored.
146: Normally, the output follows the original, with the deletions mentioned above.
147: .El
148: .Sh SEE ALSO
149: .Xr eqn 1 ,
150: .Xr nroff 1 ,
151: .Xr pic 1 ,
1.5 ! jmc 152: .Xr tbl 1 ,
! 153: .Xr troff 1
1.1 millert 154: .Sh HISTORY
155: .Nm
1.5 ! jmc 156: appeared in
! 157: .At v7 .
1.1 millert 158: .Sh BUGS
159: .Nm
160: is not a complete
161: .Xr troff 1
162: interpreter, so it can be confused by subtle constructs.
163: Most errors result in too much rather than too little output.
1.2 millert 164: .Pp
165: The
166: .Fl ml
167: option does not correctly handle nested lists.