summaryrefslogtreecommitdiff
path: root/makediffpdf.sh
blob: 34904bf5692628346675bbf01c00845b16899569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#make pdf diff using latexpand and latexdiff-fast
#preamble in diffpreamble.tex
#in diff, links are coloured green instead of blue
PATH=.:${PATH}
cur="$PWD"
rm -fr old new
git clone $PWD old
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
SPECDOC=${SPECDOC:-`cat REVISION`}
./make-setup-generated.sh "$SPECDOC"
#wget http://www.ctan.org/pkg/latexpand
#chmod +x latexpand
latexpand virtio.tex -o flat.tex
cd "${cur}"
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
SPECDOC=${SPECDOC:-`cat REVISION`}
./make-setup-generated.sh "$SPECDOC"
latexpand virtio.tex -o flat.tex
cd "${cur}"
#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
perl -pi fixupdiff.pl virtio-diff.tex
SPECDOC="${SPECDOC}-diff"
rm $SPECDOC.aux $SPECDOC.pdf $SPECDOC.out
xelatex --jobname $SPECDOC virtio-diff.tex
xelatex --jobname $SPECDOC virtio-diff.tex
xelatex --jobname $SPECDOC virtio-diff.tex