Count the Number of Words in a LaTeX Document

detex my-document.tex | wc -w
  • detex: a filter to strip TeX commands from a .tex file
  • wc: word, line, character, and byte count
    • -w: The number of words in each input file is written to the standard output
Nicholas Nadeau, Ph.D., P.Eng.
Nicholas Nadeau, Ph.D., P.Eng.
Project Director

Nicholas Nadeau is the project director at Halodi Robotics, leading their mission of bringing safe and capable humanoid robots to everyone.