![]() |
iTeXMac Spell Checking |
The problem of spell checking TeX source files is the presence of commands like \maketitle that are in general misspelled words in human langage but are full of sense for TeX. Then, all the commands in a TeX document would appear as misspelled. It is the reason why a TeX user will prefer the use of a spell checker compatible with TeX.
Under OS 9 and Classic, there is a widely used spell checker named Excalibur, which is fully compatible with TeX. However, Mac OS X naturally includes a Spell Checker system and some very light patches have been applied to its technology to render it more TeX friendly.
cocoaSpell is a newly available port of ASpell to Mac OS X.
What
the iTeXMac spell checker does:
It simply adds a filter between standard Mac OS X spell checker
and the text. When iTeXMac spell checker is asked for a misspelled
word, it forwards the query to the standard checker. If it returns
a misspelled word, the iTeXMac checker tests if it is a command
name, in which case it askes the standard checker to simply ignore
the word and all forthcoming instances, otherwise it transmit
the information to the text as is.
This feature is highly simple to implement, but may have its drawback
when used with a dictionary not TeX aware. Suppose you have a
command \foo in your text,
iTeXMac speller, will ignore the "foo" word in all subsequent
spell checking operation. So, if you have misspelled "for"
in "foo", the checker will never complain.
A stronger implementation will come, including also dictionaries
for most common TeX macros sets (Plain, LaTeX, ConTeXt, ...)
What
the iTeXMac spell chacker can't do:
- In iTeXMac version 1.0, ignored words are not permanently stored,
so you must reenter them each time the file is reopen. It will
be easy to implement this feature once the backup format has been
fixed: should the list of ignored words be stored in a per file
basis or under a project, should it be visible to the user or
a hidden file, may be it can be an Excalibur dictionary...
- In iTeXMac version 1.0, the continuous spell checking as you
type feature has not been patched to ignored TeX commands as misspelled
words. This is not so easy because it is related on what Mac OS
X understands to be a word. However, the patch should actually
work when used with a TeX aware spelling service.