TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use latex for writing papers and I would like to bring more control over my progress - in other words - count lines and words. But I always forget to check how many words I have before I start modifying a file.

I am using SVN to store latex files so I thought that maybe somebody wrote a script or a command line program that would inform me on commit what is a different between old and new version of a file.

share|improve this question
up vote 1 down vote accepted

You could change the SVN_EDITOR as described in the second answer here:


and dynamically create/alter the template doing additionally sth. like wc myfile >> svn-commit.tmp

share|improve this answer
Yes, I agree. However, wc will also count TeX code as words. It depends how accurate someone wants it. @Skarab: using wc -l and wc -w will only give you the line and word count, respectively. – Martin Scharrer Mar 25 '11 at 15:50
Could you use TeXcount instead of wc to give a more accurate picture of actual words? – Seamus Mar 25 '11 at 16:24
@Seamus: using pdftotext together with wc -w might be simpler. – Martin Scharrer Mar 25 '11 at 16:36

Visual diff-based tools are a nice way of viewing those differences. diff itself should give you enough information, but if you want something more informative (or easier to visualise), I suggest tools like Kompare (screenshot here).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.