# How to stop texcount from counting \begin{comment}…\end{comment}

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!

-
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

## 1 Answer

Add

%TC:group comment 0 0


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

\documentclass{article}
\usepackage{verbatim}
%TC:group comment 0 0
\begin{document}
one
\begin{comment}
two three four five six seven eight
\end{comment}
\end{document}


\$ 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

-
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