Ticket #433: latexdiff.sh

File latexdiff.sh, 2.3 KB (added by Ian Culverwell, 9 years ago)

latexdiff.sh

Line 
1#/usr/bin/ksh
2#
3# Script to difference ROPP81 and ROPP90 ROPP PP UGs
4#
5# After using this script, users will need to:
6# 1) Manually fix the monkey business assoc with
7# L373 of pp_background.tex:
8#\begin{eqnarray}
9#\eta(p,t) = \vv_L \cdot \vu_L - \vv_G \cdot \vu_G = p\dot\theta + }
10# (The \end{eqnarray} gets placed there for some reason.)
11#
12# 2) Use the old names of the routines at the bottom of romsaf_ropp_ug_pp.tex
13#\include{pp_phasetobangle}
14#\include{pp_routines}
15#
16# 3) cd $dir81
17# for file in ../common/appendix_use.tex figs/pp_invert_tool_overview.eps pp_background.tex pp_module_files.tex pp_phasetobangle.tex pp_routines.tex romsaf_ropp_ug_pp.tex table_config.tex table_config_ropp4.tex ; do
18# svn revert $file
19# done
20# after you've finished, to restore the pristine $dir81 ROPP PP UG.
21#
22# Apart from that, latexdiff does remarkably well with such a complicated
23# mess of latex files and figures.
24#
25# IDC, 26/04/2016
26
27cd $ROPP_DOC # trunk
28
29
30# One off tex file
31
32dir90=ropp_ug_v90/common
33
34dir81=ropp_ug_v81/common
35
36file=appendix_use.tex
37
38echo "latexdiff $dir81/$file $dir90/$file > $dir81/temp.tex"
39 latexdiff $dir81/$file $dir90/$file > $dir81/temp.tex
40
41echo "mv $dir81/temp.tex $dir81/$file"
42 mv $dir81/temp.tex $dir81/$file
43
44
45dir90=ropp_ug_v90/ropp_ug_pp
46
47dir81=ropp_ug_v81/ropp_ug_pp
48
49
50# Most tex files
51
52for file in pp_background.tex pp_module_files.tex romsaf_ropp_ug_pp.tex table_config.tex table_config_ropp4.tex ug_pp_intro.tex ; do
53
54echo "latexdiff $dir81/$file $dir90/$file > $dir81/temp.tex"
55 latexdiff $dir81/$file $dir90/$file > $dir81/temp.tex
56
57echo "mv $dir81/temp.tex $dir81/$file"
58 mv $dir81/temp.tex $dir81/$file
59
60done
61
62
63# Changed figure
64
65file=figs/pp_invert_tool_overview.eps
66
67echo "cp $dir90/$file $dir81/$file"
68 cp $dir90/$file $dir81/$file
69
70
71# Renamed files (1)
72
73file90=pp_phase2bangle.tex
74file81=pp_phasetobangle.tex
75
76echo "latexdiff $dir81/$file81 $dir90/$file90 > $dir81/temp.tex"
77 latexdiff $dir81/$file81 $dir90/$file90 > $dir81/temp.tex
78
79echo "mv $dir81/temp.tex $dir81/$file81"
80 mv $dir81/temp.tex $dir81/$file81
81
82
83# Renamed files (2)
84
85file90=pp_bangle2refrac.tex
86file81=pp_routines.tex
87
88echo "latexdiff $dir81/$file81 $dir90/$file90 > $dir81/temp.tex"
89 latexdiff $dir81/$file81 $dir90/$file90 > $dir81/temp.tex
90
91echo "mv $dir81/temp.tex $dir81/$file81"
92 mv $dir81/temp.tex $dir81/$file81
93