[OS X TeX] How does Texhshop count words?
Herbert Schulz
herbs at wideopenwest.com
Wed Dec 20 10:50:44 EST 2017
> On Dec 20, 2017, at 9:29 AM, Themis Matsoukas <tmatsoukas at icloud.com> wrote:
>
> I used Edit/ Statistics… to count words in my source file. With the entire file selected (from first line to last, comments and all), I get a word count of 3045/20021 characters. If I select from my \begin{abstract} to the end of the file, I get 3381 words/22663 characters! I didn’t expect the count to be exact but I would have thought that a subset of the document would give a lower count that the whole. With some experimentation I discovered that when the line \begin{document} is excluded, the count increases by ~300 words. That’s with a revtex document, I am not sure if the same is seen with other classes.
>
> Not a big deal but since Dick is a mathematician I thought he’d want to know that there is a discontinuity that breaks monotonicity in the count :)
>
> Themis
Howdy,
If I had to guess I'd say it uses `detex` (to remove commands) and then `wc` to count words.
For curiosities sake try downloading DropTeXCount.zip and use of of the two drop-scripts enclosed in the unzipped folder to do a count in the whole document. You can get that file from <https://herbs.github.io>. Those scripts use `texcount` (part of TeX Live) to do the word count.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the MacOSX-TeX
mailing list