Skip to content
A tool to generate a latexdiff of a file (contained in a RCS like Git, svn, Mercurial, etc.) for several version.
Find file
Latest commit 7e110d3 Apr 29, 2016 @driquet Merge pull request #10 from ihincks/chdir-bug-fix
Chdir bug fix



rcs-latexdiff is a simple tool to generate a diff of a LaTeX file contained in a Revision Control System (like Git, Mercurial, etc.). The result is a LaTeX file with the differences between two revisions of a file. Then, you just have to compile the diff file using your favorite LaTeX compiler (rubber, pdflatex, etc.).

  • Support of Git, SVN
  • Diff of a LaTeX File for different versions
  • Recursive search of files included


First, grab sources:

$ git clone
$ cd rcs-latexdiff

You may want to install rcs-latexdiff in a virtualenv ; following steps explain how to do it:

$ virtualenv --prompt==rcs-latexdiff venv
$ source venv/bin/activate
$ python install

If you want to install rcs-latexdiff system wide, just skip the first two steps.


Basic usage is:

$ rcs-latexdiff [OPTIONS] filename old_commit new_commit

The complete usage can be displayed with option -h.


For example, if the file paper.tex is in a Git repository, you could do:

$ rcs-latexdiff paper.tex HEAD~1 HEAD

to get a diff between the second to last and the last commit.

You could also use branch names. For example, to compare a version submitted to a conference and the final version:

$ rcs-latexdiff paper.tex submission-version camera-ready-version

If you want a diff between changes in the current working directory and the last commit, you can do:

$ rcs-latexdiff paper.tex HEAD


No graphics or bibliography when compiling LaTeX file
Verify that missing elements are in the path. The simpler is to generate the diff file next to the original file.
Diff file won't compile
It could be due to exotic document class of LaTeX files. Again, verify that all elements are in the path.
rcs-latexdiff is slow for SVN
Not rcs-latexdiff's fault, really. SVN is server-based, so it needs to discuss with the server for most operations and it could be pretty long.


You may want to add another RCS software. You can fork and pull request to complete this tool.


GPLv3. See LICENCE file.


Damien Riquet <>

Something went wrong with that request. Please try again.