count words in your LaTeX document

LaTeX tip of the day: To count the words in your LaTeX doc­u­ment (leav­ing LaTeX com­mands out of the count):

1. Get untex (a pack­age that fil­ters LaTeX com­mands out of a file). If you have Debian or Ubun­tu, just apt-get untex.
2. Then just untex ‑a ‑e | wc ‑w

It’s that simple!

Note: This tip was par­tial­ly stolen from a TeX FAQ, but it sug­gest­ed using detex (which I don’t have (and did­n’t find in my Ubun­tu repos­i­to­ries). I already had untex installed, and it worked like a charm.

Leave a Reply