# [tex-live] apparent bug in detex

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Thu Oct 27 18:43:34 CEST 2011

Peter Breitenlohner <peb at mppmu.mpg.de> wrote:

> On Oct 27 13:12:34, Kristen Eisenberg wrote:
>
> > 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 am not sure if this intentional or not.

who's to know?  detex is a pretty rough tool, at the best of times; its
original intent was for spell-checking, iirc.  fwiw, i recommend _not_
using detex for word-counting, in the faq (i don't know if that's my
idea, or someone else's that i've adopted after discussions with
others).

> TL2010 and TL2011 use detex-2.8 with detex.l defining
>     <Normal>"\\footnote"    {KILLARGS(1); SPACE;}
> whereas TL20109 used an older version with
>     <Normal>"\\footnote"    {SPACE;}
>
> Might be the KILLARGS actually ought to be STRIPARGS?
>
> If indeed a bug, it would have been nice to have this reported and fixed
> early enough for TL2011.

last i contacted the author, he responded quite quickly with an update.
however, getting something ready for the 2011 distribution would be a
bit challenging ;-)

would the op like to contact the author?

robin