Path: utzoo!utgpu!watmath!uunet!cs.utexas.edu!usc!apple!rutgers!netnews.upenn.edu!magill
From: magill@operations.upenn.edu (PENNnet Oper/Planning)
Newsgroups: gnu.emacs
Subject: TeX/LaTeX spelling stuff - ispell.el
Message-ID:
Date: 9 Aug 89 15:03:47 GMT
Sender: news@netnews.upenn.edu
Organization: DCCS, University of Pennsylvania
Lines: 121
>In article eho@word.Princeton.EDU
> (Eric Ho) writes:
>
> I remembered sometime ago that someone has posted something like
> latex.el that will enable me check my spellings in my latex
> papers/documents.
>
> Does anyone know where it is now ?
>
I recently began working with ispell (available as anonymous ftp from
celray.cs.yale.edu)
I mailed the following queries to the apparent ispell.el author?
maintainer? and to TeXhax, but as yet have gotten no reply,
and in fact have not even seen it in the digest. (Maybe it fell into a
black hole somplace.)
So as a way of poviding information and query I'm posting them here.
Ispell works very well as a stand alone progam without the
necessity of using detex. It has a working TeX filter.
==============================================================
Date: Fri, 14 Jul 89 13:53:39 EST
From: magill
To:Ram-Ashwin@cs.yale.edu
Subject: ispell.el
I recently pulled down the ispell stuff from celray.
One thing which I don't quite understand is why it doesn't work with
TeX/Latex mode.
As best I can tell, you are still expecting to preprocess the "buffer"
with detex, etc. before you pass it off to ispell.
Why not simply invoke ispell on the buffer with the "-t" switch.
If you run ispell in stand-alone mode against a LaTeX file with
the -t switch, it does a good job of processing the file.
At least for me (I use LaTeX) it seems to be working withoug problems.
Being non-lisp-literate I haven't quite hacked at ispell.el enough
to get this to happen for me. (how do I turn off the filter).
==============================================================
From: magill
To: texhax@cs.washington.edu
Subject: ispell, detex and GNU emacs
I have recently pulled down the ispell package from "celray.cs.yale.edu".
In it is a GNU emacs function "ispell.el" (last update - 30 March 1989)
Buried in the Unix TeX distribution is "tex82/TeXcontrib/kamal" where
the apprently latest complete version of detex lives. (dated - 25 Jan 1987)
The situation descrtiption and questions:
1- Used stand-along, "ispell -t .tex" does a very nice job of
ignoring the TeX(LaTeX) commands as documented.
Apparently completely? Apparently, as documented, correctly?
2- "ispell.el" contains a description as follows:
----------------------------------------
; 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.
;; (defvar ispell-filter-hook "tr"
(defvar ispell-filter-hook "detex"
"*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 '("-cs" "A-Za-z" "\012")
(defvar ispell-filter-hook-args '("-iw")
"*Argument LIST to pass to ispell-filter-hook")
(make-variable-buffer-local 'ispell-filter-hook-args)
(defvar ispell-filter-hook-produces-single-column t
"*This is nil if your ispell-filter-hook does not output one word per line.")
----------------------------------------
The two lines prefixed with two semi-colons (;;) are the originals and
the two following "(defvar ..." lines are what I used that finaly got
"M-x ispell-buffer" do something potentially useful.
However, it complains that:
"Prefrobnicating ..."
"Looking for a misspelled word (status:run)"
"Can't find [11pt] article in original text -- any key to continue"
[Cursor is still pointing at the first char in the buffer.]
Followed by:
"Done"
"Args out of range:"", 0, 1"
But doesn't find any mispelled words (I deliberely added letters to
generate predictable failures, both in planin text and on lines
preceeded with a "%").
The first text in the document is:
%
% doccument style...
%
\documentstyle [11pt] {article}
%
So the question here becomes:
- How do I convince "ispell.el" to use "ispell -t" and ignore the filter
stuff?
This seems to be preferrable to using detex as a filter - yes?
Does this technique have accuracy problems?
-AND/OR-
- How do I convince "ispell.el" to use "detex" correctly? I have not
been able to pass the second recommended filter string, the one
with the pipe to "tr" and the first string evidently is either
specified incorreclty or doesn't work as anticipated.
The only "lisp" I know is by virture of patching other folks "el" code.
Therefore, I expect I've done something rather dumb.
--
William H. Magill Manager, PENNnet Operations Planning
Data Communications and Computing Services (DCCS) University of Pennsylvania
Internet: magill@dccs.upenn.edu magill@eniac.seas.upenn.edu
magill@upenn.edu