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