5

I have a tex file that I update regularly and want to check for spelling every time. I would like aspell to remember the mispelled words that I chose to ignore and automatically ignore them in every subsequent spellcheck. The way I do it so far is the following:

  • Check the file using aspell -t -c file.tex. After that, I know that whatever is left there that is misspelled can be ignored for the next time.
  • Do cat file.tex | aspell list -t | sort | uniq > dictionary.txt and then add personal_ws-1.1 en 162 as the first line of dictionary.txt. This will be a personal dictionary of things that can be ignored in every subsequent spell check.
  • Next time check the file with aspell --home-dir=. --personal=dictionary.txt -t -c file.tex

This works, but the problem is that I need to do this procedure every time I want to update the words that I want to ignore permanently. Is there a way to make aspell put the interactively ignored words in that file, automaticaally during the spell check? Or any other efficient way of achieving what I'm doing above?

5

I found the answer after posting that question. Here's the solution:

  • Every time, run aspell with aspell --home-dir=. --personal=dictionary.txt -t -c file.tex
  • Instead of pressing "i" or "I" to ignore a word, just press "a" to add it to dictionary.txt.
| improve this answer | |
  • Something that also works for me is to have a central dictionary.txt and then simply symlink that file to each folder I'm working on. – geo909 Jul 31 '18 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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