Counting words in LateX

I often need to know approximately how many words my paper contains (for example when asking a quote from a proofreading service). As opposed to MS Word, getting an estimate word count in LateX is not that easy. Today, I stumbled upon a command line utility bundle with the standard TeX distribuition: detex.

The utility just strips TeX commands from a .tex file. So a simply way to get a word count for the paper is:

detex file.tex | wc -w

Next step, include the command in the vim-latex plugin (yes, I do use VIm, at least most of the time) to have the word count shown in the status line.

Originally published at on August 10, 2015.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.