LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

texcount

Count words in LaTeX documents

TLDR

Count words
$ texcount [document.tex]
copy
Brief output
$ texcount -brief [document.tex]
copy
Include subcounts
$ texcount -sub [document.tex]
copy
HTML output
$ texcount -html [document.tex]
copy
Count multiple files
$ texcount -merge [file1.tex] [file2.tex]
copy
Verbose output
$ texcount -v [document.tex]
copy

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

sudo pacman -S texlive-binextra
copy
sudo apk add texlive-binextra
copy

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.

SEE ALSO

wc(1), latex(1), detex(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid