Tuesday, October 15, 2013

diff LaTeX documents

This is a great stuff to diff latex docs:

http://www.ctan.org/tex-archive/support/latexdiff

you might also be able to install it for your ubuntu for instance using

$ sudo aptitude install latexdiff

Usage:

$ latexdiff old.tex new.tex > diff.tex

This will create a new file called diff.tex, which is a valid LaTeX document countaining the difference between the two, if old.tex and new.tex were also valid LaTeX docs, and you can proceed diff.tex as you normally would creating eps, pdf, html, etc ...

If you don't want to or can't install the tool, it's available online here:
http://3142.nl/latex-diff/

If you are using version control like svn or cvs, you might consider using the latexdiff-vc command, that actually makes the diff from the version in the version control. More resources about this you can find at the links below:

http://kwtrnka.wordpress.com/2010/11/28/latexdiff-version-control/  

http://www.jwe.cc/2012/02/workflow-with-subversion-and-latex/ 

For example I use

 $ latexdiff-vc --svn -r <oldversion> --pdf <mylatex.tex>
in order to generate pdf diff in one step

No comments:

Post a Comment