Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!visdc!jiii From: jiii@visdc.UUCP (John E Van Deusen III) Newsgroups: comp.lang.lisp Subject: Re: XLISP 2.0 reference available Summary: sed script for reformatting Message-ID: <726@visdc.UUCP> Date: 6 Jan 90 19:58:28 GMT References: <6950014@hpfcbig.SDE.HP.COM> <6950017@hpfcbig.SDE.HP.COM> Reply-To: jiii@visdc.UUCP (John E Van Deusen III) Organization: VI Software Development, Boise, Idaho Lines: 70 To everyone who has obtained Tim Mikkelsen's excellent and very useful XLISP Reference in ASCII format, the following sed script might be of interest to you. It slightly reformats the document so that when piped through pr(1), there are no empty pages. It also keeps the text within reasonable margins for printing on 8.5x11" paper, and provides some additional consistency in tabbing and line spacing. Assuming that you have the files ref1.Z, ref2.Z, ref3.Z, ref4.Z, and ref5.Z as provided by Tim Mikkelsen, and the sed script contained here has been saved as sedf; the following command, or a variation, will produce the reformatted document in the file prt: $ zcat ref[1-5].Z | sed -f sedf | pr -h "XLISP Reference" > prt -- John E Van Deusen III, PO Box 9283, Boise, ID 83707, (208) 343-1865 uunet!visdc!jiii ===cut here=== /^[ ]$/,${ s/^[ ] / / s/^ / / s/^ [ ]/ / /^ /s/^ */ / /^[ ][ ]* [ ][ ]*/s/ // /^EXAMPLES$/,/^[^ ]/{ /^[ ]*$/d /^ /!{ /^EXAMPLES$/a\ /^EXAMPLES$/!{ /^[ ]/!i\ } } s/^ // } /^SYNTAX$/,/^DESCRIPTION$/{ /^[ ][ ]*<.*>.*-/,/^$/{ s/- *[ ]/- / />.*- /!{ /^[ ][ ]* /!{ s/^[ ][ ]*/& / } s/^ // } } } /^DESCRIPTION$/,/^EXAMPLES$/{ s/ */ /g s/\. /\. /g } /^[A-Z][A-Z ]*:/,/^$/{ s/ */ /g s/\. /\. /g } /^$/,/^..*/{ /^$/d /^[ ]$/!i\ } /^[ ]$/,/^.*/{ /^[ ]$/d /^$/d /^.*$/s/^.*$/ &/ } }