Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 at 14:54
add comment

1 Answer 1


%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 at 9:32
add comment

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.