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.

I have found TeXcount extremely useful and, for all my needs so far, most accurate. Nonetheless, I have observed a strange behavior with TeXcount 3.0 (beta) when trying to make the script aware of files being included with the macro \InputIfFileExists.

Everything goes fine if I append the command directly in the script texcount.pl as follows:

my %TeXfileinclude=('\input'=>'input','\include'=>'texfile','\InputIfFileExists'=>'file');

But in order to not have this setting overwritten when upgrading to a next (or the same, but stable) version, I am using an options file. The line

%fileinclude \InputIfFileExists file

leads to some error when I run texcount. The error no longer appears and the scripting proceeds perfectly as soon as I comment that line with the hash sign, #, corresponding to Perl.

Is there something wrong with the way that I am proceeding?

share|improve this question
1  
I am having a similar problem - amongst my preamble I have defined a new column type \newcolumntype{C}[1]{>{\centering\arraybackslash$}p{#1}<{$}} . Texcount only works when this line is commented out, it appears that the hash sign # is causing the problem. Perhaps its simply that the hash symbol isn't taken into account when texcount is parsing the source code? –  oLas Apr 29 '13 at 9:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.