[next] [prev] [prev-tail] [tail] [up]

7.3 Spell-checking 

7.3.1 Concepts 

4TeX uses the public domain program amSpell to check and correct spelling in TeX documents. amSpell is basically a spell-checker for plain ascii files, with some special features for dealing with TeX files. The program was written by A. Merckens in Turbo Pascal and runs on any MS-Dos computer.

The basic idea behind this program is to make spell-checking easier by

Currently, dictionaries for UK English, US English, Dutch, German, French, Spanish, South-African and Italian are available.

7.3.2 TeX features 

amSpell does not require TeX commands to be removed from your document (deTeXing). In fact, it will even interpret the standard accenting commands like \", \`, \' and will automatically use them while replacing incorrectly spelled words. When checking a TeX file, amSpell will ignore all text between $'s and $$'s. Furthermore, amSpell will ignore parameters of the LaTeX commands \ref, \pageref, \cite, \nocite, \label, and all text between \begin{equation}, \begin{eqnarray}, \begin{eqnarray*}, \[ and their counterparts like \]. You can change or expand the lists by means of environment variables. If, e.g., you only want the parameter of \index and \ref to be ignored, you should set the environment variable SPL_COM in the file texuser.<os> as follows:

SPL_COM=index,ref

However, if you want to add these commands to the list, you should use

SPL_COM=+index,ref

Note that the list must be comma-delimited. Spaces are not allowed, and all characters will be converted to lower case.
If you only want the contents of the environments of, e.g., figure, table and verbatim to be ignored, you should set the environment variable SPL_ENV as follows:

SPL_ENV=figure,table,verbatim

However, if you want to add these environments to the list, you should use

SPL_ENV=+figure,table,verbatim

The syntax of this environment variable equals that of SPL_COM. Both lists can be up to 255 characters long. A list can be emptied by specifying a comma:

SPL_ENV=,

All words starting with a backslash are ignored.
Naturally amSpell will conform to the capitalization in each word.

7.3.3 The user interface 

When you start amSpell, it will first read your text and look up all the words it found in the dictionaries and your own (e.g., US English) jargon file (e.g., correct.us). Then it will search its dictionaries again to find alternatives for words it does not know.

For each unknown word it displays the context, and provides alternatives (if possible). Figure 7.1 shows what the screen looks like when amSpell encounters the word `colour', using the US English dictionary.  


PICT

Figure 7.1Correcting misspelled words

The word `colour' is displayed in reverse video. You can choose one of the alternatives or edit the word yourself. Pressing [F1] will show all keys amSpell accepts (see Figure 7.2).  


PICT

Figure 7.2Help information on special keys.

Note that unfortunately amSpell sometimes gets confused and skips parts of your document. As explained before amSpell skips math environment, but in some cases it may fail to recognize the end of a math environment. In case of doubt, e.g., after a complex math construction, add a line like this:

% \]

In case amSpell was in `skipping mode' it will now resume spell-checking your text. Note that amSpell does not know that a percent sign starts a comment.

[next] [prev] [prev-tail] [front] [up]