Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer

This is not really an answer to your question, but aspell seems to be able to do what you want.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.