Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uwvax!tank!eecae!cps3xx!cps3xx.egr.msu.edu!ben From: ben@nsf1.mth.msu.edu (Ben Lotto) Newsgroups: comp.text Subject: Re: Spell Checker for TEX Message-ID: Date: 20 Sep 89 14:18:38 GMT References: <1372@speedy.mcnc.org> Sender: usenet@cps3xx.UUCP Distribution: usa Organization: Michigan State University Lines: 48 In-reply-to: kerm@mcnc.org's message of 12 Sep 89 21:42:27 GMT I have the shell script that appears below (remember to get rid of the .signature at the end!) which eliminates many different things. ----------Cut here---------------------------------------- #!/bin/csh -f # # Delete all \keywords... # and equations (you know what you are doing); # \cite, \ref, \label commands; # \begin {environment} and \end {environment}; # and comments. # # DFK 7/88 from LSN 5/87 # dfk@cs.duke.edu # Duke University # Expand filenames to include ".tex" extension set files foreach i ($*) set files=($files `basename $i .tex`.tex) end # If there is a .spelltex file, read additional sed commands from there if (-r .spelltex) then set script="-f .spelltex" else set script="" endif sed \ -e '/^%/d' \ -e 's/\([^\\]\)%.*/\1/' \ -e 's/\\cite[ ]*{[^}]*}//g' \ -e 's/\\ref[ ]*{[^}]*}//g' \ -e 's/\\label[ ]*{[^}]*}//g' \ -e 's/\\begin[ ]*{[^}]*}//g' \ -e 's/\\end[ ]*{[^}]*}//g' \ $script \ -e 's/[{}]/ /g' \ -e 's/\\[a-zA-Z]*/ /g' \ -e 's/\$[^$]*\$/ /g' \ $files \ | spell ----------Cut here---------------------------------------- -- -B. A. Lotto (ben@nsf1.mth.msu.edu) Department of Mathematics/Michigan State University/East Lansing, MI 48824