# Latex-wc – Word count and word frequency for LaTeX projects

I was revising my proposal defense and kept feeling like I was repeating the same term. In a typical LaTeX project split across many .tex files, it’s awkward to get a quick, clean word-frequency view without gluing everything together or counting LaTeX commands/math as “words”. So I built latex-wc,…

- **Page:** https://magpie.gallery/i/latex-wc-word-count-and-word-frequency-for-latex-p-t3bm
- **Type:** Link to an idea elsewhere
- **Category:** Utilities
- **Runs on:** windows, macos, linux
- **Tags:** latex, word-count, python, cli, frequency

## Source

Web · sethbarrettAU: Latex-wc – Word count and word frequency for LaTeX projects

- **Original:** https://news.ycombinator.com/item?id=46865138

> I was revising my proposal defense and kept feeling like I was repeating the same term. In a typical LaTeX project split across many .tex files, it’s awkward to get a quick, clean word-frequency view without gluing everything together or counting LaTeX commands/math as “words”. So I built latex-wc, a small Python CLI that: - extracts tokens from LaTeX while ignoring common LaTeX “noise” (commands, comments, math, refs/cites, etc.) - can take a single .tex file or a directory and recursively scan all *.tex files - prints a combined report once (total words, unique words, top-N frequencies) Fastest way to try it is `uvx latex-wc [path]` (file or directory). Feedback welcome, especially on edge cases where you think the heuristic filters are too aggressive or not aggressive enough. https://github.com/sethbarrett50/LaTeX-wc

## GitHub projects

- https://github.com/sethbarrett50/LaTeX-wc

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
