8

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
  • 1
    %TC:ignore ignore region, end with %TC:endignore ... from the texcount help
    – user31729
    Aug 7 '15 at 16:58
  • @ChristianHupfer yep. I'm an idiot. I read the help... just not very well evidentially.
    – scnlf
    Aug 8 '15 at 12:16
  • Well, it's a little bit hidden, at least in the console help
    – user31729
    Aug 8 '15 at 12:17
10

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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