How can I enter a new counter with texcount to count everything within the \begin{quote} ... \end{quote} environment?

I have tried the following, which gives me nil results.

%TC:newcounter quote Number of quotes %TC:newcounter quotewords Words in quotes %TC:macro \begin{quote} [quote] %TC:macroword \begin{quote} [quotewords]

Any help will be greatly appreciated!

1 Answer 1


Rules for environments are specified using the %TC:envir command (same as %TC:group)

%TC:envir name [argument-rules] content-rule

and then in the command %TC:macrocount which counts the quote you need to use beginquote instead of the environment name (not sure how well this part is documented).

The code you need to insert is this:

%TC:newcounter quote Number of quotes
%TC:newcounter quotewords Words in quote
%TC:envir quote [] quotewords
%TC:macrocount beginquote [quote]

Text in a quote.

This should count one quote with four words.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .