Article View: comp.text
Article #858Re: Spell Checker for TEX
From: David F. Kotz
Date: Wed, 20 Sep 1989 19:32
Date: Wed, 20 Sep 1989 19:32
42 lines
1521 bytes
1521 bytes
#!/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.
#
# David Kotz (dfk@cs.duke.edu)
# DFK 7/88 from LSN 5/87
# 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
Department of Computer Science, Duke University, Durham, NC 27706 USA
ARPA: dfk@cs.duke.edu
CSNET: dfk@duke
UUCP: decvax!duke!dfk
Technical Details
Message-ID:
<15637@duke.cs.duke.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!gatech!mcnc!duke!grad13!dfkReferences:
<1372@speedy.mcnc.org> <573@tah386.manhattan.ks.us> <180@function.mps.ohio-state.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!gatech!mcnc!duke!grad13!dfk From: dfk@grad13.cs.duke.edu (David F. Kotz) Newsgroups: comp.text Subject: Re: Spell Checker for TEX Summary: repeat posting of my spell-checker for LaTeX files Keywords: Spell checker TEx Message-ID: <15637@duke.cs.duke.edu> Date: 20 Sep 89 19:32:33 GMT References: <1372@speedy.mcnc.org> <573@tah386.manhattan.ks.us> <180@function.mps.ohio-state.edu> Sender: news@duke.cs.duke.edu Distribution: usa Lines: 42