Checking spelling and grammar in LaTeX papers

When you're nearing the end of the paper writing process, it's a good idea to run the text through a spelling and grammar checker to catch minor mistakes. Modern language editing software can even provide more "stylistic tips" to help your prose sound more natural. However, this isn't straightforward with LaTeX code, which contains all kinds of non-text: commands, math, etc. I've compiled here a short list of tools you can use to help you polish your writing that work with LaTeX. Some of these I have used myself, and some others have mentioned to me. If you do end up trying one of them out, let me know how it goes.

aspell

aspell is a spell checker that has an option to work with LaTeX code. You should be able to install it with sudo apt-get install aspell if you're on Ubuntu. To check a TeX file, you can run the following command at the command line (the -t option tells aspell that you're checking a TeX file):

aspell -c -t test.tex

However, aspell only checks spelling, not grammar or style. I've also found that it often mistakes LaTeX commands for text and flags them as spelling errors. Your mileage may vary.

Textidote

Textidote (with GitHub repository here) is a more comprehensive software package for grammar and spell-checking LaTeX code. I've never used this one before, but it looks promising. Let me know how it works if you do try it out!

Filter + LanguageTool

Another option is to run a LaTeX filter (such as Yet Another LaTeX Filter (YaLaFi)) to remove commands, math, and other non-text LaTeX code from your document, and then to pass the output to something like LanguageTool. If your TeX files are clean enough, you can also directly copy and paste relevant text sections into LanguageTool without worrying about filtering; though this is a bit more manual effort. Again, I've never tried this, so let me know how it goes if you do.