Log the wordcount of tex files

pip install texlog==0.1.0



Log the 'texcount' wordcount output from your tex files.

Outputs to simple text files that can be plotted with your favourite plotting software.

Data extracted from texcount:

Included file
Words in text
Words in headers
Words outside text (captions etc.)
Number of headers
Number of floats/tables/figures
Number of math inlines,Number of math displayed


Python 2.7 (it probably works on Python 3.x, but this is currently untested)

Perl - texcount itself requires perl. Try the community version of Active Perl.

More information about installing texcount


Either use pip:

pip install texlog

Or download the zip package.

In either case, add texlog folder to your path environment variable.

Windows Users

Windows tends to have a problem that makes it difficult to run python scripts with arguments at the command line.

If you are using windows you may need to modify one or both of the following registry settings:

Set the




keys to:

 "C:\Python26\python26.exe" "%1" %*

More information about registry keys

Using Config Files

If you do have problems with command line arguments texlog will give you the option to create a configuration file containing the name of the tex file you wish to log.

The configuration file will be created in your 'home' or 'my documents' folder as


The configuration file looks like this:

tex_file = YourTextFile.tex

Edit the 'YourTextFile.tex' to your tex file - either the file name or full path, depending on where you run texlog from.


The default usage is:

texlog.py tex_file.tex

The output is a series of text files for each of the consituent files of the tex document, and the total for the whole document.

Output to: DIRECTORY/Logging/TEXFILE/


  • Further integration with thesisplotter.py to plot the output of the thesis.
  • Improve windows workaround to make it easier to run from the command line e.g. use a config file containing the name/directory of the file you want to run on.