You can use the detex tool to strip LaTeX commands. If you do detex file.tex
, it will output to stdout. Then, you can use the diction tool to analyse your text, and suggest improvements. Putting it all together:
detex file.tex | diction -bs
This will strip the LaTeX, and pipe it into diction with suggestions and "beginner mistakes" enabled.
For Debian/Ubuntu:
sudo apt-get install diction texlive-extra-utils
This will install detex and diction, as well as several other useful tools.
Since you mentioned that you're using Emacs, there is also diction.el which provides diction integration with Emacs. You can do M-x diction-buffer
, and it will take care of detexing/dehtmling and show the diction results in a separate buffer. You can even hit enter on the individual results to be taken to approximately where the phrase is.
(If you do use diction.el, my version of detex didn't have the -C flag. I'm not sure of what it was meant to do, but if you search for 'detex -C' in the file, you can add other command line options if you want. Also, I recommend replacing 'diction -L' with 'diction -bsL')
Best Answer
It sort of depends on the system you're working on.
I'm using GNU/Linux and here
aspell
does a good job. For instance, to checktest.tex
in Danish, I would do like this from the terminal:The option
-c
tellsaspell
to check the file,-t
puts it in TeX mode, and-d
gives the base name of the main dictionary to use. On Ubuntu/Debian, this can be installed using:Aspell is also available as a Windows executable. It can but run from the command line or from any good text-editor (i.e. one that supports macros to run external programs).