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