So, your collegue commited a new revision of a LaTeX document into your version control system of choice and you want to quickly spot the changes? That is no easy task with the standard unix diff command as it is used by, say, svn diff: changes in indentation and line wrapping are all shown as differences.

For example, a collegue might have reformatted a paragraph that has been a single line into multiple lines. Then, svn diff will basically give no more information than "this paragraph has changed" and the real changes are invisible. I compare here the results of various diff programs, from worst to best, where all three have been ordered to ignore changes in white space, if possible.

KDiff3
Diffuse
VimDiff
Meld
Emacs

I would probably call it a tie between KDiff3, Diffuse, and VimDiff. Things clearly become better with Meld, which shows changes more fine-grained. Obviously, Emacs wins. To obtain this result with Emacs diff, just open a file that is under version control (like SVN or CVS) in Emacs. Then, enter M-x ediff-revision RET and follow Emacs' instructions. Then, press n or p in the Ediff control window to highlight the changes in the next or previous block.

© 2010, 2011 René van Bevern. Last modified 2011-11-21.