From ef519a86f046d1be22f82f32d845653a850c21dd Mon Sep 17 00:00:00 2001 From: mstsirkin Date: Thu, 26 Jun 2014 16:50:13 +0000 Subject: makediff: cleanup using begingroup/endgroup Pawel Moll found a way to work around xetex bugs without mangling latexdiff output using perl: - define DIFbegin/DIFFend commands in preample - pass --config FLOATENV= to latexdiff Use this in preference to the fixupdiff perl script. Signed-off-by: Michael S. Tsirkin git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@393 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- diffpreamble.tex | 12 ++++++------ makediff.sh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/diffpreamble.tex b/diffpreamble.tex index 6242878..b9c8e00 100644 --- a/diffpreamble.tex +++ b/diffpreamble.tex @@ -4,16 +4,16 @@ %DIF FONTSTRIKE PREAMBLE \RequirePackage[normalem]{ulem} -\providecommand{\DIFadd}[1]{{\sf #1}} -\providecommand{\DIFdel}[1]{{\footnotesize \sout{#1}}} +\providecommand{\DIFadd}[1]{{\color{blue}\sf #1}} +\providecommand{\DIFdel}[1]{{\color{red}\footnotesize \sout{#1}}} %DIF END FONTSTRIKE PREAMBLE %DIF COLOR PREAMBLE \RequirePackage{color} -\providecommand{\DIFaddbegin}{\protect\color{blue}\hypersetup{linkcolor=blue,urlcolor=blue}} -\providecommand{\DIFaddend}{\protect\color{black}\hypersetup{linkcolor=pinegreen,urlcolor=pinegreen}} -\providecommand{\DIFdelbegin}{\protect\color{red}\hypersetup{linkcolor=red,urlcolor=red}} -\providecommand{\DIFdelend}{\protect\color{black}\hypersetup{linkcolor=pinegreen,urlcolor=pinegreen}} +\providecommand{\DIFaddbegin}{\begingroup\color{blue}\hypersetup{linkcolor=blue,urlcolor=blue}} +\providecommand{\DIFaddend}{\hypersetup{linkcolor=pinegreen,urlcolor=pinegreen}\endgroup} +\providecommand{\DIFdelbegin}{\begingroup\color{red}\hypersetup{linkcolor=red,urlcolor=red}} +\providecommand{\DIFdelend}{\hypersetup{linkcolor=pinegreen,urlcolor=pinegreen}\endgroup} %DIF END COLOR PREAMBLE \providecommand{\DIFaddtext}[1]{\textcolor{blue}{\sf #1}} \providecommand{\DIFdeltext}[1]{\textcolor{red}{\footnotesize \sout{#1}}} diff --git a/makediff.sh b/makediff.sh index 460b593..6657292 100755 --- a/makediff.sh +++ b/makediff.sh @@ -35,5 +35,5 @@ sed 's/\\footnote{/\\footnote {/' new/flat.tex > new/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 --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 +latexdiff-fast --config "FLOATENV=(?:figure|table|tabular|plate)[\w\d*@]*" --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 -- cgit v1.2.3