Thursday, December 1, 2011

latexdiff for Paper in PDF

1. Install the latexdiff
http://fengweizhang.blogspot.com/2010/12/subversion-latex.html

2. run: 
$ latexdiff -t CFONT --flatten ../HC-4/main.tex main.tex > doc.tex

-t CFONT: type of latexdiff
--flatten: reversal of directory
../HC-4/main.tex: old version of main.tex of paper
main.tex: new version
doc.tex: output file

3. run: 
$ pdflatex doc.tex 
if reference cannot show, change the makefile from main to doc

compile the tex file and generate the pdf file

Other option(doesn't work on my Mac):
$ latexdiff-vc -t CFONT --fatten --svn -r 7 main.tex --pdf
latexdiff-vc: combine latexdiff and version control
-t CFONT: type
--fatten: reversal of directory
--svn: version control type
-r 7: compare to old version 7
main.tex: current version
--pdf: run pdflatex to generate pdf

more info:
http://helpful.knobs-dials.com/index.php/Latexdiff
http://web.njit.edu/all_topics/Prog_Lang_Docs/pdf/latexdiff/latexdiff-man.pdf

No comments: