Word Count

Quick Intro

  • TeXstudio doesn't come with the word count integrated in to the menus - I don't know why.

  • If you have installed MikTeX (recommended) then you already have the texcount utility. (Other LaTeX distributions also come with this.)

  • However, texcount is a Perl script so you will need to have Perl installed for it to run.

  • Install Active Perl from their website (free):
    http://www.activestate.com/activeperl

  • If you are using the uopthesis class example directory, you can now run the count.bat file by double clicking it. (Your document must be called main.tex for this to work out of the box.)

  • The result will be found in count.html in the same directory which you can also double click to see the result in a browser.

For those not using uopthesis.cls

The texcount utility runs from the command line. If this is unfamiliar to you and you would rather stay in Windows then follow these instructions.

  • Create a new text file in your working directory (folder) by right-clicking inside the folder window and selecting

New -> Text Document

  • Save the resulting file as

count.bat

(N.B. look out for the .txt last three characters in the filename which come as default and replace them with .bat)

  • Cut and Paste the following line of text from this page to your newly created text document:

texcount main.tex -merge -html > countResult.html

  • Save and close the text file

The name main.tex refers to whatever the correct name is for your main file, change as necessary.

When you double-click the icon that represents count.bat in the folder view it creates a countResult.html file which you can open in your browser (double click) and see all the word counts for the document. You can copy and paste the count.bat file every time you create a new project folder, call it anything you like, and change the name of the file that it counts.

More Detail?

Shed-loads of (almost entirely unnecessary) detail start here:

http://app.uio.no/ifi/texcount/faq.html

Integrating Word Count in TeXstudio

Read the top sections of this page first because you must install Perl and test the utility before you do this.

The following four images are all you need if you have a bit of experience with software. Just follow the pink ellipses. Good luck.