[tex-live] apparent bug in detex

Dr. Clea F. Rees cfrees at imapmail.org
Mon Nov 1 01:26:27 CET 2010


There appears to be a bug in the version of detex distributed with TL
2010. At least, I see the problem and it has been confirmed by others
on the mactex list. Essentially, detex removes the contents of
footnotes included as \footnote{this is a footnote} when running in
LaTeX mode.

So if my test file contains the line:
 	Test\footnote{ a footnote}  \emph{it} quickly.
then detex gives:
 	Test  a footnote  it quickly.
but detex -l gives:
 	Test   it quickly.
And the same problem occurs if LaTeX mode is selected automatically
for a LaTeX document. Others on the mactex list were responsible for
pinpointing the issue. I just found it didn't work as I expected.

I noticed this because I was getting significantly lower word counts
for a paper than I thought I should be. (TeXShop's statistics function
uses detex.)

Abandoning TeXShop's GUI, I found the behaviour of the 2010 version
differed significantly from that of the 2008 and 2009 versions:
 	detex (TL 2010) + wc: 		209    3071   19119
 	detex (TL 2009) + wc:		193    3199   19970
 	detex (TL 2008) + wc:		193    3199   19970

The problem is with detex itself, I think. I downloaded and compiled
the sources and that version shows the same issue.
 	detex (2.8 sources) + wc:	209    3071   19119

Best,
cfr


More information about the tex-live mailing list