These instructions are for lxplus (Thanks to Emilien & Rui)

0. scl enable rh-git29 bash 

1. edit: utils/general/cms-tdr.cls under the "\usepackage{ptdr-definitions}", put in the following two lines: 

\RequirePackage[normalem]{ulem} %DIF PREAMBLE


3. Find out the version you want to use as reference via "git log HIN-XX-YYY.tex"

for example you want to compare the current version with version b174241c04ff018b67e600b4d3acde00816c3c0b

4. Run: latexdiff-vc -r b174241c04ff018b67e600b4d3acde00816c3c0b --append-context2cmd="abstract" HIN-XX-YYY.tex

this will create a texft file: HIN-18-009-diffb174241c04ff018b67e600b4d3acde00816c3c0b.tex (HIN-XX-XXX.tex-referenceVersion.tex)

5. manually add the following line into this newly created tex file:

\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}} %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
\providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE

6.Compile again, to create the colorful diff: utils/tdr b HIN-18-009-diffb174241c04ff018b67e600b4d3acde00816c3c0b.tex

The diff file will be created, but look carefully in the spit-out on the screed to see the location of the pdf file. For me (cm) on lxplus, was /tmp/user/somedirectoryCreatedByTdr/here.pdf

modified tdr_diff script

If you already have the svn tdr_diff area, you can use this script attached as a drop-in replacement: place it in the same directory as the tdr_diff script, and do:

./gtdr_diff [path] [old commit] [new commit]

For SVN:

TDR Diff Utility instructions

NOTE 2017-09-01: Note that if this utility gives you problems, there is also a generic tdrDiff utility developed by Luca Perrozzi here:

WARNING: PLEASE, use this tool on lxplus (it works out of the box, and without fault on lxplus). On private laptop might get into problems that would require more time to fix/set.

This code takes two svn versions of a CMS paper and runs the latexdiff utility on each included .tex file to create a comparison of two versions of the paper, highlighted by blue and red text showing additions and deletions, respectively. An example of an output of the utility can be found here (pdf).

To use the utility:

  • Download the tarball, from here and extract it.
  • Go to the extracted directory
  • Run the script via
     ./tdr_diff [relative path to paper/AN directory] [old svn tag] [new svn tag] 

For example:

 ./tdr_diff ../pPb_cJet/papers/HIN-15-012 364180 364411 

To see the svn history of a paper, just use

 svn log 


  • Please run the utility within the tdr_diff directory - i.e. the same directory that the latexdiff and Algorithm-Diff-1.15 directories are in, else the script will fail.
  • The utility finds the CADi line by looking for an instance of "HIN" in the path to the paper. If you have multiple instances of "HIN" or if you're compiling a paper outside of the HI group, you can hard-code line 70 to be the proper line for your paper.
  • This utility assumes your tdr script is in the /papers or the /notes directory in the path provided. If you have an alternate directory structure, you'll need to modify the script.

-- KurtJung - 2016-08-15

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatext gtdr_diff r1 manage 9.7 K 2019-06-22 - 23:06 RanBi  
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r10 - 2019-07-02 - CameliaMironov
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback