Commit b6336903 authored by gregor herrmann's avatar gregor herrmann

New upstream version 1.3.0

parents 84182df1 1a3ca7c8
......@@ -26,26 +26,26 @@ install-so: install-latexdiff-so install-latexrevise install-latexdiff-vc instal
install-fast: install-latexdiff-fast install-latexrevise install-latexdiff-vc install-man
install-man:
install latexrevise.1 latexdiff.1 latexdiff-vc.1 $(INSTALLMANPATH)/man1
install -m 644 -D -t $(INSTALLMANPATH)/man1 latexrevise.1 latexdiff.1 latexdiff-vc.1
install-latexdiff:
install latexdiff $(INSTALLEXECPATH)
install -D -t $(INSTALLEXECPATH) latexdiff
install-latexdiff-so:
if [ -e $(INSTALLEXECPATH)/latexdiff ]; then rm $(INSTALLEXECPATH)/latexdiff; fi
install latexdiff-so $(INSTALLEXECPATH)
install -D -t $(INSTALLEXECPATH) latexdiff-so
cd $(INSTALLEXECPATH); ln -s latexdiff-so latexdiff
install-latexdiff-fast:
if [ -e $(INSTALLEXECPATH)/latexdiff ]; then rm $(INSTALLEXECPATH)/latexdiff; fi
install latexdiff-fast $(INSTALLEXECPATH)
install -D -t $(INSTALLEXECPATH) latexdiff-fast
cd $(INSTALLEXECPATH); ln -s latexdiff-fast latexdiff
install-latexrevise:
install latexrevise $(INSTALLEXECPATH)
install -D -t $(INSTALLEXECPATH) latexrevise
install-latexdiff-vc:
install latexdiff-vc $(INSTALLEXECPATH)
install -D -t $(INSTALLEXECPATH) latexdiff-vc
cd $(INSTALLEXECPATH); for vcs in cvs rcs svn git hg ; do if [ -e latexdiff-$$vcs ]; then rm latexdiff-$$vcs; fi; ln -s latexdiff-vc latexdiff-$$vcs ; done
test-ext:
......
......@@ -28,6 +28,8 @@
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
\providecommand{\DIFmodbegin}{} %DIF PREAMBLE
\providecommand{\DIFmodend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
......@@ -35,6 +37,22 @@
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE
%DIF LISTINGS PREAMBLE %DIF PREAMBLE
\RequirePackage{listings} %DIF PREAMBLE
\RequirePackage{color} %DIF PREAMBLE
\lstdefinelanguage{DIFcode}{ %DIF PREAMBLE
%DIF DIFCODE_UNDERLINE %DIF PREAMBLE
moredelim=[il][\color{red}\sout]{\%DIF\ <\ }, %DIF PREAMBLE
moredelim=[il][\color{blue}\uwave]{\%DIF\ >\ } %DIF PREAMBLE
} %DIF PREAMBLE
\lstdefinestyle{DIFverbatimstyle}{ %DIF PREAMBLE
language=DIFcode, %DIF PREAMBLE
basicstyle=\ttfamily, %DIF PREAMBLE
columns=fullflexible, %DIF PREAMBLE
keepspaces=true %DIF PREAMBLE
} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim}{\lstset{style=DIFverbatimstyle}}{} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim*}{\lstset{style=DIFverbatimstyle,showspaces=true}}{} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
\begin{document}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -27,7 +27,11 @@
#
# TODO/IDEAS: - option to call external pre-processing codes
# - choose type of latex processor / bibtex (luatex, xelatex etc)
# version 1.2.1 (22 June 2017)
# version 1.3.0 ((7 October 2018)
# - option --only-changes with hyperref will suppress hyperrefs (pull request jprotze)_
# - option --only-changes now moves (rather than copies) file with only changes
# version 1.2.1 (22 June 2017):
# - update: use qpdf (instead of pdftk) to select particular pages of output (pull request #102 submited by Tom Scogland via github). This was necessary because pdftk is being deprecated. pdftk is still used as a fall-back
# - bug fix: --hg option was not recognised (partially fixes github issue #93 )
# - wrap passed-through options to latexdiff in quotation marks (fix github issue #58 )
# - program names for latexdiff, latex, dvips, bibtex configurable (fixes issue #40)
......@@ -68,8 +72,8 @@ use strict ;
use warnings ;
my $versionstring=<<EOF ;
This is LATEXDIFF-VC 1.2.1
(c) 2005-2017 F J Tilmann
This is LATEXDIFF-VC 1.3.0
(c) 2005-2018 F J Tilmann
EOF
# output debug and intermediate files, set to 0 in final distribution
......@@ -234,6 +238,7 @@ if ( defined($dir) && ( -f $dir || $dir =~ /^-/ ) ) {
$dir="";
}
# check whether the first file name or first passed-through option for latexdiff got misinterpreted as an option to an empty --flatten option
if ( defined($flatten) && ( -f $flatten || $flatten =~ /^-/ ) ) {
unshift @ARGV,$flatten;
$flatten="";
......@@ -325,16 +330,20 @@ while( $file1=pop @ARGV ) {
}
if ( length $configlatexdiff >0 ) {
push @ldoptions, "--config $configlatexdiff";
push @ldoptions, "--config=$configlatexdiff";
}
if ( defined($flatten) ) {
push @ldoptions, "--flatten" ;
}
if ( defined($debug) && $debug ) {
push @ldoptions, "--debug" ;
}
# impose ZLABEL subtype if --only-changes option
if ( $onlychanges ) {
push @ldoptions, "-s", "ZLABEL","-f","IDENTICAL" ;
push @ldoptions, "-s", "ZLABEL","-f","IDENTICAL","--no-links" ;
}
if ( scalar(@revs) == 0 ) {
......@@ -525,18 +534,25 @@ foreach $diff ( @difffiles ) {
} elsif ( $run ) {
if ( $onlychanges ) {
my @pages=findchangedpages("$diffbase.aux");
### print ("Running pdftk \"$diffbase.pdf\" cat " . join(" ",@pages) . " output \"$diffbase-changedpage.pdf\"\n") or
my $gs = `which gs`;
$gs =~ s/^\s+|\s+$//g;
my $qpdf = `which qpdf`;
$qpdf =~ s/^\s+|\s+$//g;
my $pdftk = `which pdftk`;
$pdftk =~ s/^\s+|\s+$//g;
if (-x $qpdf) {
system("qpdf --linearize \"$diffbase.pdf\" --pages \"$diffbase.pdf\" " . join(",", @pages) . " -- \"$diffbase-changedpage.pdf\" ") == 0
or die("could not execute qpdf to strip pages. Return code: $?");
my $command;
if (-x $gs && `gs --version` >= 9.20) {
$command="gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sPageList=" . join(",", @pages) . " -sOutputFile=\"$diffbase-changedpage.pdf\" \"$diffbase.pdf\"";
} elsif (-x $pdftk) {
system ("pdftk \"$diffbase.pdf\" cat " . join(" ",@pages) . " output \"$diffbase-changedpage.pdf\"")==0 or
die ("Could not execute <pdftk $diffbase.pdf cat " . join(" ",@pages) . " output $diffbase-changedpage.pdf> . Return code: $?");
$command="pdftk \"$diffbase.pdf\" cat " . join(" ",@pages) . " output \"$diffbase-changedpage.pdf\"";
} elsif (-x $qpdf) {
$command="qpdf --linearize \"$diffbase.pdf\" --pages \"$diffbase.pdf\" " . join(",", @pages) . " -- \"$diffbase-changedpage.pdf\" ";
} else {
die ("could not find any of gs, pdftk or qpdf");
}
print "Executing ".$command;
system($command) == 0
or die("could not execute <".$command."> to strip pages. Return code: $?");
move("$diffbase-changedpage.pdf","$diffbase.pdf");
}
push @ptmpfiles, "$diffbase.aux","$diffbase.log";
......@@ -641,12 +657,14 @@ file in postscript or pdf format.
=item B<--rcs>, B<--svn>, B<--cvs>, B<--git> or B<--hg>
Set the version system.
Set the version control system used.
If no version system is specified, latexdiff-vc will venture a guess.
latexdiff-cvs, latexdiff-rcs etc are variants of latexdiff-vc which default to
the respective versioning system. However, this default can still be overridden using the options above.
Note that hg needs to support the C<--root> option (version >= 2.9)
=item B<-r>, B<-r> F<rev> or B<--revision>, B<--revision=>F<rev>
Choose revision (under RCS, CVS, SVN, GIT or HG). One or two B<-r> options can be
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment