Last Update: 18/06/06
detex is a useful program by Daniel Trinkle which rips the latex tags (mostly) out of latex documents. This is handy if you want to do a more-or-less accurate word count.
I had a lot of trouble of finding a working binary compiled for Windows (Win32) so I compiled my own. It's based on detex-2.7. Somewhat later I wrote a GUI for it (as an exercise in C#). Both are available below.
DetexGUI is a simple GUI for detex that allows you to select a file, run detex, save the output and optionally copy it to the clipboard.
Download DetexGUI 1.0 installer (180 kb - exe)
It requires .NET 2.0 and is licensed under the GPL (the GUI only). The GUI distribution includes the original detex program. Please see the detex homepage for detex licensing information.
Download DetexGUI 1.0 source (74 kb - zip)
The source distribution is made up of two parts.
This is detex-2.7 compiled as a Win32 command line program.
Download detex Win32 binary (27 kb - zip)
Usage: detex [tex file]
Output goes to stdout so you may want to send the output to a file instead:
detex [tex file] >[output file]
Download detex source (41 kb - zip)
This is a copy of the standard detex source distribution. I've added a win32 directory which contains a slightly modified lexout.c and an MS Visual Studio 6.0 project file. This should compile fine on later Visual Studio versions too. The changes are only to function declarations to make them acceptable to VS.
[Home] - tom.ford at compsoc.net