texcount
Count words in LaTeX documents
TLDR
SYNOPSIS
texcount [-brief] [-sub] [-html] [options] files
DESCRIPTION
texcount counts words in LaTeX documents by properly parsing TeX syntax rather than counting all whitespace-separated tokens. It distinguishes between text words, header words, caption words, and mathematical formulas, providing accurate counts that exclude macro names and formatting commands.The -sub option breaks down counts by section, chapter, or other structural elements, which is useful for tracking progress on individual parts of a document. Multiple files can be processed together with -merge, and -inc follows \\input and \\include directives to count included files. Output formats include plain text, HTML, and verbose mode showing how each word was classified.
PARAMETERS
-brief
Short output.-sub
Subcounts by section.-html
HTML output.-merge
Merge file counts.-v
Verbose output.-inc
Include input files.
INSTALL
CAVEATS
LaTeX specific. Custom macros may confuse. Perl required.
HISTORY
TeXcount was created to provide accurate word counts for LaTeX documents by properly parsing TeX syntax.
