countwords – Exact word counts, stored in LaTeX counters, using Lua
This is a simple package for generating exact wordcounts in LaTeX projects. It counts words, storing the value in a standard LaTeX counter, which can then be printed in the normal way. Word counting can be paused and resumed, so you can skip certain environments like mathematics, and multiple word counts can happen in parallel (you could keep separate global and per-chapter counts, for example).
The word counting engine itself is pulled from https://gist.github.com/phi-gamma/2622252 .
| Sources | /macros/luatex/latex/countwords |
| Documentation | |
| Bug tracker | https://github.com/Hugo-Heagren/countwords/issues |
| Repository | https://github.com/Hugo-Heagren/countwords |
| Version | 1.0 2026-04-03 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Hugo Heagren |
| Maintainer | Hugo Heagren |
| Contained in | TeX Live as countwords |
| Topics | Word count LuaTeX |
Download the contents of this package in one zip archive (383.2k).
Announcements
Suggestions
Maybe you are interested in the following packages as well.
Community Comments