In a directory with git VCS:
latexdiff-vc --git --flatten -r <rev-hash> full.tex
where full.tex
is the root tex file, including (or inputting) several subfiles or not.
You can then compile the resulting .tex file:
pdflatex -shell-escape full-diff.tex
Note that the --pdf
option is supposed to do it in one go, but the need for -shell-escape
in my case makes the process fail.
If you simply want to generate a diff file with the previous commit in your tree,
you can ommit rev-hash
.
You might get an error where \hspace{0pt}
causes problems.
You can either
- Remove them all by hand from the resulting .tex
- Modify your
latexdiff.pl
source, in particular (line 2734 in version 1.3.1.1):
< push(@$retval,"\\mbox{$AUXCMD\n\\" . $1 . $2 . $3 ."}\\hspace{0pt}$AUXCMD\n" );
---
> push(@$retval,"\\mbox{$AUXCMD\n\\" . $1 . $2 . $3 ."}\\hskip0pt$AUXCMD\n" );
Make sure the .bbl
file is in your tree.
If it's not in an earlier revision of your tree, you're screwed to generate a diff file with it.
A workaround might be to remove the bibtex entries at the end of the diff file.