Annotation of src/usr.bin/deroff/deroff.1, Revision 1.12
1.12 ! jsg 1: .\" $OpenBSD: deroff.1,v 1.11 2022/08/03 07:38:09 jsg 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: .\"
1.12 ! jsg 64: .Dd $Mdocdate: August 3 2022 $
1.1 millert 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
1.9 jmc 80: reads each file in sequence and removes all roff
1.1 millert 81: command lines, backslash constructions, macro definitions,
1.9 jmc 82: eqn constructs (between
1.6 jmc 83: .Dq .EQ
84: and
85: .Dq .EN
86: lines or between delimiters),
1.9 jmc 87: pic pictures,
1.1 millert 88: and table descriptions and writes the remainder to the standard output.
89: .Nm
1.6 jmc 90: follows chains of included files
91: .Po
92: .Dq .so
93: and
94: .Dq .nx
95: commands
96: .Pc ;
97: if a file has already been included, a
98: .Dq .so
99: is ignored and a
100: .Dq .nx
1.1 millert 101: terminates execution.
102: If no input file is given,
103: .Nm
104: reads from the standard input.
105: .Pp
106: The options are as follows:
107: .Bl -tag -width Ds
108: .It Fl i
1.6 jmc 109: Ignore
110: .Dq .so
111: and
112: .Dq .nx
113: commands.
1.1 millert 114: .It Fl k
115: Keep blocks of text intact.
116: This is the default behavior unless the
117: .Fl m
118: option is given.
119: .It Fl m
120: Enable support for common macro packages.
121: The
122: .Fl m
123: option takes the following arguments:
1.6 jmc 124: .Pp
125: .Bl -tag -width Ds -offset indent -compact
1.1 millert 126: .It a
1.5 jmc 127: recognize
1.1 millert 128: .Xr man 7
129: macros.
130: .It e
1.9 jmc 131: recognize me macros.
1.6 jmc 132: .It l
1.7 jmc 133: remove list constructs.
1.1 millert 134: .It m
1.9 jmc 135: recognize mm macros.
1.1 millert 136: .It s
1.9 jmc 137: recognize ms macros.
1.1 millert 138: .El
139: .It Fl p
140: Preserve paragraph macros.
141: This option only has an effect if the
142: .Fl m
143: option is also specified.
144: .It Fl w
145: Output a word list, one
146: .Sq word
147: (string of letters, digits, and apostrophes, beginning with a letter;
148: apostrophes are removed) per line, and all other characters ignored.
149: Normally, the output follows the original, with the deletions mentioned above.
150: .El
151: .Sh SEE ALSO
1.9 jmc 152: .Xr man 7
1.1 millert 153: .Sh HISTORY
154: .Nm
1.11 jsg 155: first appeared outside of Bell Labs in PWB/UNIX 1.0.
156: It did not appear in freely redistributable
157: .Bx
158: releases for licensing reasons.
159: After Caldera relicensed early UNIX releases the
160: .Bx 4.4
161: version was added to
1.10 schwarze 162: .Ox 3.1 .
1.11 jsg 163: .Sh AUTHORS
164: .An Lorinda Cherry
1.12 ! jsg 165: at the Bell Labs Computing Science Research Center.
1.1 millert 166: .Sh BUGS
167: .Nm
1.9 jmc 168: is not a complete troff interpreter,
169: so it can be confused by subtle constructs.
1.1 millert 170: Most errors result in too much rather than too little output.
1.2 millert 171: .Pp
172: The
173: .Fl ml
174: option does not correctly handle nested lists.