On 30 Nov 2006, at 01:12, Paul McCann wrote:
Haris wrote...
\newcommand{\this}{Hi there! } and then the document contains: \this\this\this
I would guess detex will not count those 6 words, will it?
No: but the alternative (typesetting and counting using something like ps2ascii) is unworkably slow on large documents, so it's going to depend on what sort of accuracy you're seeking (and what each method considers to be a "word"). It'd be nice to find something fast-ish and not-too-inaccurate, but I'm not holding my breath!
There is a limit to how fast an accurate utility could be if it is to accommodate the kind of procedural aspects of LaTeX syntax that Haris was referring to. Best, Mark