Article View: comp.text
Article #853Re: Spell Checker for TEX
From: Ben Lotto
Date: Wed, 20 Sep 1989 14:18
Date: Wed, 20 Sep 1989 14:18
48 lines
1746 bytes
1746 bytes
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
Technical Details
Message-ID:
<BEN.89Sep20101838@lamm.nsf1.mth.msu.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uwvax!tank!eecae!cps3xx!cps3xx.egr.msu.edu!benReferences:
<1372@speedy.mcnc.org>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <BEN.89Sep20101838@lamm.nsf1.mth.msu.edu> 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