diff --git a/latexdiff b/latexdiff index 0b16190..642d50f 100755 --- a/latexdiff +++ b/latexdiff @@ -3,7 +3,7 @@ # latexdiff - differences two latex files on the word level # and produces a latex file with the differences marked up. # -# Copyright (C) 2004-12 F J Tilmann (tilmann@gfz-potsdam.de) +# Copyright (C) 2004-16 F J Tilmann (tilmann@gfz-potsdam.de) # # Repository/issue tracker: https://github.com/ftilmann/latexdiff # CTAN page: http://www.ctan.org/pkg/latexdiff @@ -35,6 +35,7 @@ # - bug fix in title mark-up. Previously deleted commands in title (such as \title, \author or \date) were marked up erroneously # - (minor) bug fixes in new 1.1.1 features: disabled label was commented out twice, additional spaces were introduced before list environment begin and end commands # - depracation fix: left brace in RegEx now needs to be escaped +# - add type PDFCOMMENT based on issue #49 submitted by github user peci1 # # Version 1.1.1 # - patch mhchem: allow ce in equations @@ -146,7 +147,7 @@ my ($algodiffversion)=split(/ /,$Algorithm::Diff::VERSION); my ($versionstring)=< and C<\DIFdel> commands. Available styles: C +CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCBHBAR BOLD PDFCOMMENT> [ Default: C ] @@ -3728,6 +3729,10 @@ No visible markup (but generic markup commands will still be inserted. Added text is set in bold face, discarded is not shown. +=item C + +The pdfcomment package is used to underlne new text, and mark deletions with a PDF comment. Note that this markup might appear differently or not at all based on the pdf viewer used. The viewer with best support for pdf markup is probably acroread. This style is only recommended if the number of differences is small. + =back =head2 Subtypes @@ -4301,6 +4306,12 @@ institute \providecommand{\DIFdel}[1]{} %DIF END BOLD PREAMBLE +%DIF PDFCOMMENT PREAMBLE +\RequirePackage{pdfcomment} %DIF PREAMBLE +\providecommand{\DIFadd}[1]{\pdfmarkupcomment[author=ADD:,markup=Underline]{#1}{}} +\providecommand{\DIFdel}[1]{\pdfcomment[icon=Insert,author=DEL:,hspace=12pt]{#1}} +%DIF END PDFCOMMENT PREAMBLE + %% SUBTYPES (Markers for beginning and end of changed blocks) %DIF SAFE PREAMBLE diff --git a/testsuite/verify-style b/testsuite/verify-style index d94ba31..acc7caf 100755 --- a/testsuite/verify-style +++ b/testsuite/verify-style @@ -4,9 +4,12 @@ set sample = example # NOT including -t option set options="-V -s SAFE -f FLOATSAFE" -set pdftypes=( UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE BOLD ) +set pdftypes=( UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE BOLD PDFCOMMENT ) set dvitypes=( CCHANGEBAR CFONTCHBAR CULINECHBAR CHANGEBAR ) +#set pdftypes=( UNDERLINE PDFCOMMENT ) +#set dvitypes=() + set failed set pdfout set psout