TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to stop texcount from counting words in \begin{comment}...\end{comment} blocks? It seems to skip only comments starting with %

Thank you very much in advance!

share|improve this question
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Christian Hupfer Mar 12 '14 at 14:54


%TC:group comment 0 0

somewhere near the top of your file. See http://app.uio.no/ifi/texcount/faq.html#newgroup.

%TC:group comment 0 0
  two three four five six seven eight

$ texcount tc.tex
File: tc.tex
Encoding: ascii
Words in text: 1
Words in headers: 0
Words outside text (captions, etc.): 0
Number of headers: 0
Number of floats/tables/figures: 0
Number of math inlines: 0
Number of math displayed: 0
share|improve this answer
Just to elaborate... Starting with version 3 of TeXcount, you can use named parsing rules instead of the numerical codes, as well as envir as an alias of group: e.g. the line %TC:envir comment [] ignore is equivalent to %TC:group comment 0 0 where the arguments indicate the number of arguments taken ([] = 0 = none) and their rules, and the rule for parsing the environment (ignore = 0). – Einar Rødland Mar 13 '14 at 9:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.