[tex-live] apparent bug in detex

Zdenek Wagner zdenek.wagner at gmail.com
Mon Nov 1 01:46:03 CET 2010


Hi,
I think that detex is not a proper tool for calculating the amount of
the text. 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

2010/11/1 Norbert Preining <preining at logic.at>:
> Hi,
>
> On Mo, 01 Nov 2010, Dr. Clea F. Rees wrote:
>>       Test\footnote{ a footnote}  \emph{it} quickly.
>> then detex gives:
>>       Test  a footnote  it quickly.
>> but detex -l gives:
>>       Test   it quickly.
>
> Probably this is on purpose?
>
> In TeX mode it does not know what \footnote does, so assumes it
> creates more or less the text that is contained in the argument, like
>        \it
> or something.
>
> In LaTeX mode it knows that \footnote creates something which
> is out of the running text, so it removes the text, as it does *NOT*
> belong to the running text.
>
> I consider this behaviour correct.
>
>
> Best wishes
>
> Norbert
> ------------------------------------------------------------------------
> Norbert Preining            preining@{jaist.ac.jp, logic.at, debian.org}
> JAIST, Japan                                 TeX Live & Debian Developer
> DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
> ------------------------------------------------------------------------
> SYMOND'S YAT (n.)
> The little spoonful inside the lid of a recently opened boiled egg.
>                        --- Douglas Adams, The Meaning of Liff
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the tex-live mailing list