I've been looking for a convenient way to highlight changes between subversion revisions of my Latex document in the generated PDF. I am working on a reasonably complex document that pulls together various .tex files. By virtue of using multiple \input{}
s, latexdiff-svn doesn't seem to offer a solution. texdiff, despite being more amenable to multi-file documents, unfortunately doesn't have the necessary magic in place to handle SVN diffs.
I have hacked together a solution which works for me, but I'm wondering if there's something more coherent that I've missed.
My solution is a fairly short script which does the following:
- Given a revision number, ask SVN for all the files that have changed between then and HEAD.
- Export only those files to a temporary location, and run texdiff between the exported copy and the working copy.
- Build another temporary directory, which stores either the output from texdiff or, if no changes were made, a copy of the working copy. The directory contains all the .tex files I need to build my document. A little sed ensures all
\input{}
commands point to the correct (i.e., temporary) location.
This does the trick! But, a solution that hooks directly into svn diff would be much neater. I played around earlier with svn wdiff and tried to hook it directly into texdiff, but I gave up on it when I realised I was breaking all the nice bracket matching that texdiff does. My searches have otherwise proved fruitless. Although I'm happy with my solution, does anyone know a neater way to achieve what I want?