Xref: utzoo comp.emacs:10036 comp.text.tex:5240 gnu.emacs.help:1110 Path: utzoo!utgpu!watserv1!watmath!uunet!spool.mu.edu!sdd.hp.com!wuarchive!hsdndev!husc6!husc6.harvard.edu!smith From: smith@zeus.harvard.edu (Steven Smith) Newsgroups: comp.emacs,comp.text.tex,gnu.emacs.help Subject: Re: Ispelling in emacs, again Message-ID: Date: 7 Feb 91 21:22:30 GMT References: <9504@dog.ee.lbl.gov> <9607@dog.ee.lbl.gov> Sender: news@husc6.harvard.edu Organization: Harvard Robotics Lab, Harvard University Lines: 55 In-reply-to: rdong@boole.msri.org's message of 6 Feb 91 18:49:12 GMT We altered the ispell file so that it passes the emacs region through the filter sed -e 's/\\input//g;s/\\include//g' | detex | tr -cs a-zA-Z '\012' which strips away the \input's and \include's, detex's the buffer, then throws away all characters not in the set a-zA-Z. (N.b.: We use Trinkle's detex program, which does not allow one to ignore \input's and \include's). The author of the ispell.el file suggests: ; For TeX users, try "detex -iw" or "detex -iw | tr -cs A-Za-z \012". Note ; that the output of the filter must be one word per line. but our local emacs guru claims that emacs cannot parse this shell script. Therefore, we used the UNIX command "sh" with the "-c" flag, as shown below. (defvar ispell-filter-hook "sh" "Filter to pass a region through before sending it to ispell. Must produce output one word per line. Typically this is set to tr, deroff, detex, etc.") (make-variable-buffer-local 'ispell-filter-hook) (defvar ispell-filter-hook-args '("-c" "sed -e 's/\\input//g;s/\\include//g' | detex | tr -cs a-zA-Z '\012'") "Argument LIST to pass to ispell-filter-hook") (make-variable-buffer-local 'ispell-filter-hook-args) You may replace the shell script in the ispell-filter-hook-args list with one of your choice. We appreciate the posting with the ispell.el file; we were not aware of this program and are glad to have this new utility. However, this has raised a few questions among ispell/detex/emacs users here. We would appreciate any comments people have about 1) ispell's exiguous dictionary. Could anyone tell us where we might obtain a decent dictionary and/or how to incorporate spell's dictionary? Does anyone have a dictionary of mathematical terms? 2) detex. There are three detex programs within the UNIX TeX distribution. All are somewhat unpredictable. Has anyone pulled TeX's parser from TeX: The Program and produced a decent detex program? 3) the placement of ispell's replacement suggestions. My eyes are distracted by the placement of replacement choices at the top of the screen and the command line at the bottom. Is there a simple fix that places the former at the bottom as well? 4) plain-tex-mode and latex-mode hooks. As Rui-Tao Dong asks, how does one incorporate these?