From fc27ea190b89ed5a654f9ccc326caff2558dc56f Mon Sep 17 00:00:00 2001 From: mstsirkin Date: Thu, 26 Jun 2014 12:35:01 +0000 Subject: more latexdiff hacks - change link color from green to pinegreen. Looks better to me. - split footnotes out from their text, so that latexdiff does not consider them as a unit - mark field command as safe for latexdiff, otherwise it's not shown in red - hack adding DIFaddtext within footnotes could not handle case where latexdiff inserted multiple DIFadd within the footnote. Instead, detect when footnote is within DIFaddbegin/DIFdelbegin, add an extra DIFaddbegin/DIFdelbegin within the footnote. Signed-off-by: Michael S. Tsirkin git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@391 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- makediffpdf.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'makediffpdf.sh') diff --git a/makediffpdf.sh b/makediffpdf.sh index 34904bf..cb84d07 100755 --- a/makediffpdf.sh +++ b/makediffpdf.sh @@ -9,7 +9,7 @@ cd "${cur}/old" git checkout ec1ffbf27a8f0a06ca65cd498a69c7f89bd97dc1 mv specvars.tex specvars-orig.tex #make links green to avoid confusion -sed s/blue/green/ specvars-orig.tex > specvars.tex +sed s/blue/pinegreen/ specvars-orig.tex > specvars.tex SPECDOC=${SPECDOC:-`cat REVISION`} ./make-setup-generated.sh "$SPECDOC" #wget http://www.ctan.org/pkg/latexpand @@ -20,14 +20,21 @@ git clone $PWD new cd "${cur}/new" mv specvars.tex specvars-orig.tex #make links green to avoid confusion -sed s/blue/green/ specvars-orig.tex > specvars.tex +sed s/blue/pinegreen/ specvars-orig.tex > specvars.tex SPECDOC=${SPECDOC:-`cat REVISION`} ./make-setup-generated.sh "$SPECDOC" latexpand virtio.tex -o flat.tex cd "${cur}" +# latexdiff does not do diffs within footnotes +# adding space make it not realize the text is a footnote, +# and treat it normally +sed 's/\\footnote{/\\footnote {/' old/flat.tex > old/flat-fixed.tex +sed 's/\\footnote{/\\footnote {/' new/flat.tex > new/flat-fixed.tex +#cp old/flat.tex old/flat-fixed.tex +#cp new/flat.tex new/flat-fixed.tex #wget http://mirror.math.ku.edu/tex-archive/support/latexdiff/latexdiff-fast #chmod +x latexdiff-fast -latexdiff-fast -p diffpreamble.tex old/flat.tex new/flat.tex > virtio-diff.tex +latexdiff-fast --append-safecmd=field --ignore-warnings -p diffpreamble.tex old/flat-fixed.tex new/flat-fixed.tex > virtio-diff.tex perl -pi fixupdiff.pl virtio-diff.tex SPECDOC="${SPECDOC}-diff" rm $SPECDOC.aux $SPECDOC.pdf $SPECDOC.out -- cgit v1.2.3