9

Is it possible to tell texcount to stop counting when it reaches appendices? (i.e. the \appendix command)?

I'm using texcount. to check my thesis which is organised so that each chapter has its own \input{blah.tex}. I need the count excluding appendices and biblography but including footnotes and captions.

Now I think most of this is done by texcount by default (please correct my if I'm wrong) except for the appendices part. Can't figure out an option to tell texcount to stop. I wonder if it's possible to drop some kind of comment into the document or if there is an option that I have overlooked.

I can, of course do the adding up by hand. But that feels a little clunky.

3
  • 2
    %TC:ignore ignore region, end with %TC:endignore ... from the texcount help
    – user31729
    Aug 7, 2015 at 16:58
  • @ChristianHupfer yep. I'm an idiot. I read the help... just not very well evidentially.
    – scnlf
    Aug 8, 2015 at 12:16
  • Well, it's a little bit hidden, at least in the console help
    – user31729
    Aug 8, 2015 at 12:17

1 Answer 1

12

Just enclose the region not to be counted (the appendix stuff here) with %TC:ignore and %TC:endignore

\documentclass{article}
\begin{document}

And now for something completely different

%TC:ignore 
\appendix
And now for something completely different
%TC:endignore 
\end{document}

This should give:

File: texcountexample.tex
Encoding: ascii
Words in text: 6
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
0

You must log in to answer this question.

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