aspell-devel
[Top][All Lists]

## [aspell-devel] patch: new tex mode

 From: Matthias Franz Subject: [aspell-devel] patch: new tex mode Date: Sun, 6 Feb 2011 07:50:40 +0900 User-agent: Mutt/1.5.20 (2009-08-17)

Hello,

attached is a patch for a (hopefully) improved TeX/LaTeX mode for
Aspell 0.60.6.

The new features are as follows:

1) Aspell skips over math contents inside $...$, $$...$$, $...$ and
common LaTeX and AMS-LaTeX environments like "equation" and "gather".
Additional environments to be skipped over can be defined via the new
"tex-ignore-env" list.

2) Forced spell-checking of macro arguments while skipping over
arguments or environments. This is achieved with the new 'T' option to
"add-tex-command". This way one can spell-check text content inside
math environments: $$x=0 \quad\hbox{if and only if}\quad y=0$$.

3) Discretionary hyphens and italic corrections are ignored. For
example, "hy\-phen" and "shelf\/ful" are recognized as single words.
(This is a hack, but it seems to work.)

4) Spell-checking can be manually switched on and off by putting the
text "aspell:on" and "aspell:off" into the file. This allows to skip
over macro definitions and other parts of text that confuse Aspell.

See the header of the diff file and the updated manual for more
information. The attached example "demo.tex" illustrates the
differences between Aspell's TeX mode and the patch.

I've been using the new mode for a couple of months, and it has been
working well for me. Maybe other people will find it useful as well.

Best,
--
Matthias


texmode.diff
Description: Text document

demo.tex
Description: TeX document