marcel@cs.caltech.edu (Marcel van der Goot) (01/31/91)
In <5317@gara.une.oz.au> Tony Scott STPG (ascott@gara.une.oz.au) asks > Is there something available that will > count words without taking into account words beginning with a > backslash of those within a group such as > \begin{picture}...\end{picture} etc. And in <1991Jan25.233436.23468@nas.nasa.gov> Lonhyn T. Jasinskyj (lonhyn@nas.nasa.gov) writes > Help! I have searched high and low for detex and delatex. This includes: > labrea, washington, clarkson, ymir, uunet, ohio state, etc. > Where is this most elusive program? Also, there have several times been questions about detex or so for pc's and other machines (that apparently (?) cannot deal with the standard version of detex (if found:-)). On csvax.cs.caltech.edu [131.215.131.131] in pub/tex there is a program striptex.c that strips all macros (i.e., words starting with a backslash, or a backslash followed by a non-letter) from a file. (E.g., "this \it thing" goes to "this thing" and "carr\'e" goes to "carre".) The main advantage of the program is that it is so simple (73 lines); Even if your compiler doesn't quite accept it, it is straightforward to make a few changes to make it work. It doesn't recognize things like \input or LaTeX's \end as anything special though --- that would be a sure way to make it a complicated program. There is a unix-style (i.e., nroff) manual page striptex.l. Marcel van der Goot .---------------------------------------------------------------- | Blauw de viooltjes, marcel@vlsi.cs.caltech.edu | Rood zijn de rozen; | Een rijm kan gezet | Met plaksel en dozen. |