kerm@mcnc.org (Cary E. Burnette) (09/13/89)
I was wondering if there are any spell checkers that read TEX input and disregard the TEX commands. If not what spellcheckers do people use with TEX. I need one for a VMS machine or a PC. Thanks for any info. Cary E. Burnette (kerm@mcnc.org)
terry@tah386.manhattan.ks.us (Terry Hull) (09/20/89)
In article <1372@speedy.mcnc.org> kerm@mcnc.org (Cary E. Burnette) writes: >I was wondering if there are any spell checkers that read TEX >input and disregard the TEX commands. If not what spellcheckers >do people use with TEX. I need one for a VMS machine or a PC. Most TeX users run under UNIX, so they use a filter that eliminates the TeX commands and then feed that output to either ispell or spell. ispell could probably be ported to either VMS or DOS if you were really determined. -- Terry Hull Department of Electrical and Computer Engineering, Kansas State University Work: terry@eecea.eece.ksu.edu, rutgers!ksuvax1!eecea!terry Play: terry@tah386.manhattan.ks.us, rutgers!ksuvax1!eecea!tah386!terry
spencer@heinlein.osc.edu (Stephen N. Spencer) (09/20/89)
In article <573@tah386.manhattan.ks.us> terry@tah386.manhattan.ks.us (Terry Hull) writes: >In article <1372@speedy.mcnc.org> kerm@mcnc.org (Cary E. Burnette) writes: >>I was wondering if there are any spell checkers that read TEX >>input and disregard the TEX commands. If not what spellcheckers >>do people use with TEX. I need one for a VMS machine or a PC. > >Most TeX users run under UNIX, so they use a filter that eliminates >the TeX commands and then feed that output to either ispell or spell. >ispell could probably be ported to either VMS or DOS if you were really >determined. > It's this filter: #! /bin/sh if test -f $1.spell then sed 's/\\[a-zA-Z]*//g' $1.tex | spell | sort | comm -23 - $1.spell else sed 's/\\[a-zA-Z]*//g' $1.tex | spell | more if -=- Stephen N. Spencer |"For a successful technology, reality must take ACCAD, 1224 Kinnear Rd. | precedence over public relations, for Nature Columbus OH 43212 | cannot be fooled." - Richard P. Feynman spencer@heinlein.cgrg.ohio-state.edu OR spencer@cis.ohio-state.edu
edgar@gem.mps.ohio-state.edu (Gerald Edgar) (09/20/89)
In article <320@oscsuna.osc.edu] spencer@heinlein.UUCP (Stephen N. Spencer) writes: ]In article <573@tah386.manhattan.ks.us] terry@tah386.manhattan.ks.us (Terry Hull) writes: ]]In article <1372@speedy.mcnc.org] kerm@mcnc.org (Cary E. Burnette) writes: ]]]I was wondering if there are any spell checkers that read TEX ]]]input and disregard the TEX commands. If not what spellcheckers .... ] ]It's this filter: ] ]#! /bin/sh ] if test -f $1.spell ] then sed 's/\\[a-zA-Z]*//g' $1.tex | spell | sort | comm -23 - $1.spell ] else sed 's/\\[a-zA-Z]*//g' $1.tex | spell | more ] if Is there something that will also throw out the mathematical formulas? You know the things inside $...$ and $$...$$ ? I don't really want to sent them through the spell-checker. There are hboxes inside the math, and math inside that ... -- Gerald A. Edgar Department of Mathematics Bitnet: EDGAR@OHSTPY The Ohio State University Internet: edgar@mps.ohio-state.edu Columbus, OH 43210 ...!{att,pyramid}!osu-cis!shape.mps.ohio-state.edu!edgar
ben@nsf1.mth.msu.edu (Ben Lotto) (09/20/89)
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
dfk@grad13.cs.duke.edu (David F. Kotz) (09/21/89)
#!/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