[tex-live] apparent bug in detex

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Mon Nov 1 08:49:51 CET 2010


Zdenek Wagner <zdenek.wagner at gmail.com> wrote:

> I think that detex is not a proper tool for calculating the amount of
> the text.

fwiw, i don't think that was the complaint: the complaint was the change
of spec.

> Imagine the following plain TeX document:
> 
> \def\word{word}
> \newcount\num
> \loop \word \space \ifnum\num<10000 \advance\num1 \repeat
> \bye
> 
> This creates 10 full pages of text but detex + wc says 4 3 17

you can slew the word count in less artificial ways, but i would agree
that detex is a pretty feeble way of counting words.  (i'll edit
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wordcount -- written long
ago in a more innocent age ;-)

there is a slightly more reasonable use of detex, in creating things to
feed to a spell-checker that doesn't know (la)tex; that usage is also
thrown awry by the change.

however, norbert's argument that the change removes something that's not
body text, is good, and could be the basis of a suggestion to the
author.  (the man page says "Suggestions for improvements are (mildly)
encouraged" so one could reasonably suggest a -f switch.)

tbh, i was surprised that daniele trinkle was still around when his
changed version appeared.  i tend to think that people who were around
when tex first entered my consciousness are significantly older than me
(which works with don, who i first met when i was a mere sprig of a new
graduate...).

robin


More information about the tex-live mailing list