Linux command
texcount 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Count words
texcount [document.tex]
Brief output
texcount -brief [document.tex]
Include subcounts
texcount -sub [document.tex]
HTML output
texcount -html [document.tex]
Count multiple files
texcount -merge [file1.tex] [file2.tex]
Verbose output
texcount -v [document.tex]
说明
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.
参数
- -brief
- Short output.
- -sub
- Subcounts by section.
- -html
- HTML output.
- -merge
- Merge file counts.
- -v
- Verbose output.
- -inc
- Include input files.
FAQ
What is the texcount command used for?
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.
How do I run a basic texcount example?
Run `texcount [document.tex]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -brief do in texcount?
Short output.