Feature Suggestionsword count

Suggestions and discussions for new TeXnicCenter features
happyblueeyes
Posts: 11
Joined: Sun Jan 14, 2007 4:53 pm

word count

Post by happyblueeyes »

Why doesn't TexnicCenter have a good word count facility? I don't think it has a simple word count option presently. Does it? I hoe the developers would look into it since word count is a necessity for guys submitting papers to scientific conferences.

Thanks in advance,
happyblueeyes :D

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

word count

Post by localghost »

happyblueeyes wrote: […] I hoe the developers would look into it since word count is a necessity for guys submitting papers to scientific conferences. […]

I participated in the publication of some papers but never experienced the necessity of word count. Note that the routine for doing that would have to exclude commands. And I wonder how mathematical expressions should be handled.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Cupric
Posts: 5
Joined: Tue Dec 04, 2007 7:56 pm

Re: word count

Post by Cupric »

I make my document a PDF and then use a PDF word counter to get the word count.

There are a lot of PDF word counters, but most of them are not free. The one I am currently using is free and is called Translator's Abacus and is available from http://www.globalrendering.com/download.html.
gregh
Posts: 1
Joined: Thu Mar 27, 2008 10:09 am

word count

Post by gregh »

Hi!

Regarding word counting in TeXnicCenter: Defining an output profile with a word counting script works absolutely smoothly for me. The best solution seems a perl script called texWordCount.pl that counts words through the logical structure of a latex document or project. That is, you get word counts for each hierarchical level (total, per chapter, per section, down to subsubsections). This is much more than what you get using approaches based on untex | wc.

In detail: Define a new TeXnicCenter output profile (e.g., "LaTeX => word count") with LaTeX, BibTeX and MakeIndex disabled, and set the Postprocessor to run Perl with argument "<path to>\texWordCount.pl %pm" and redirection to "%bm.wc". So F7 gets your project scanned. To display the results, in the Viewer tab simply put your favourite text editor (e.g., "notepad++.exe") with appropriate argument (for notepad++, it's simply "%bm.wc").

ps -- A nice alternative would be to send a DDE command ("open("%bm.wc")") to TeXnicCenter itself, but I wasn't able to get this to run, neither by commandline argument with "/ddecmd" nor by a DDE Open command. If anyone succeeds, please post ;)

Best

gregor
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

Re: word count

Post by Stefanie »

i tried your solution, but it doesn't seem to work... this is the generated output:

# LaTeX word count file format 1.0 produced by C:\Windows\texWordCount.pl
# run as "C:\Windows\texWordCount.pl "
# format: \t x level of detail, number of words \t section name
0 whole - <STDIN>
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

Re: word count

Post by Stefanie »

i think i found the problem: texwordcount.pl doesn't support spaces in path names. when your .tex file is saved in e.g. c:\documents and settings\ , you get an error saying the path name doesn't exist. I don't know how to fix it, though.
tillj
Posts: 1
Joined: Thu Jul 10, 2008 4:14 am

Re: word count

Post by tillj »

I also can't get it to work.
I followed your describtion as much as I could understand, and there is no complaining from the computer when I hit ctrl+F7, and id displays a line saying Output Profile WordCount. But nothing else. If I view the output it opens notepad, but it is all blank.

Does the script have to be in a specific folder?

Could you be more specific which redirection should be used and what entry exactly should be in which field.

Otherwise, any ideas, suggestions?

Cheers
Till
neeraj2608
Posts: 3
Joined: Mon Apr 06, 2009 4:07 pm

word count

Post by neeraj2608 »

Stefanie wrote:i think i found the problem: texwordcount.pl doesn't support spaces in path names. when your .tex file is saved in e.g. c:\documents and settings\ , you get an error saying the path name doesn't exist. I don't know how to fix it, though.
Try replacing the double quotes with a single quote. This escapes spaces in the file path on my system (Vista 64-bit).
CoMicFont
Posts: 1
Joined: Tue Feb 16, 2010 10:41 am

word count

Post by CoMicFont »

tillj wrote:Does the script have to be in a specific folder?
Nope, but you would need to have a Perl interpreter installed...
magicmoose
Posts: 90
Joined: Fri Nov 06, 2009 7:29 am

Re: word count

Post by magicmoose »

Here is an online version of the script: http://folk.uio.no/einarro/Services/texcount.html
Post Reply