# Have ispell ignore certain LaTeX tags

Using ispell -t on a .tex file generally does a good job of figuring out what is TeX and what isn't but it seems to find misspellings on commands that are generally going to be misspelled, i.e.

\includegraphics{myfig.jpg}


Gives a typo since myfig nor .jpg are in the dictionary. I think it would be silly to add them for every case. Is there a way to get ispell to ignore whatever is in a set of tags that I define?

-

Recent versions of ispell look for the environment variable TEXSKIP1, which is assumed to contain a list of commands, each of which is assumed to take 1 argument, for which the argument should not be spell checked. For example, my .bashrc file contains the line

export TEXSKIP1="+eqref,thmref,propref,corref,lemref,exref,notref,remref,defref, diagref,chapref,secref,bibliography"

since I have, e.g., a command named \thmref, which expands to Theorem~\ref.

Note: Many linux systems give you aspell by default, to which they alias the ispell command. If you're running actual ispell (I installed ispell-3.2.06-4asp.src.rpm), then you can use TEXSKIP1 and the analogous TEXSKIP2 for commands that take 2 arguments, neither of which should be spell checked.

-