The answer is a definite Yes! You need latexdiff which comes with Miktex
Following is a step by step guide for installing it in Windows 7:
Prerequisite
You need to install:
- Miktex (http://miktex.org/2.9/setup)
- Perl (can use Strawberry Perl: http://strawberryperl.com/releases.html)
Step By Step Guide
Assume Miktex and Perl Interpreter are installed, and Miktex is installed in "C:\Program Files (x86)\MiKTeX 2.9\" (Other directory is fine, just adapt accordingly)
- Go to "C:\Program Files (x86)\MiKTeX 2.9\scripts\latexdiff\"
- Create a a new folder "perl" in "C:\Program Files (x86)\MiKTeX 2.9\scripts\latexdiff\"
- Copy all files in "C:\Program Files (x86)\MiKTeX 2.9\scripts\latexdiff\" to new folder "C:\Program Files (x86)\MiKTeX 2.9\scripts\latexdiff\perl"
- Rename all files (without extension) in "C:\Program Files (x86)\MiKTeX 2.9\scripts\latexdiff\perl", with an extension .ple.g., latexdiff to latexdiff.pl
- Add "C:\Program Files (x86)\MiKTeX 2.9\scripts\latexdiff\perl" to the PATH environment (if you are not sure how to do so, see here)
- Open Command Prompt, and type in
latexdiff.pl --flatten PreviousFile CurrentFile> diffe.g., latexdiff.pl --flatten "C:\old.tex" "C:\new.tex" > "C:\Diff.tex"
Sample
Below is a sample for Diff.tex, where you can see what's old (cross out, red color) and new (underline, blue color) easily, pretty cool right :)
Apparently between steps 5 and 6 you must additionally go to the admin settings of Miktex and refresh the FNDB or it will not work (will not be able to find the latexdiff script).
ReplyDeleteI didn't require that !!
DeleteI refreshed FNDB. My CMD shows access is denied message. Need some help here.
DeleteThat was very usefull
ReplyDeleteWhy am I getting this error? Access is denied.
ReplyDeleteWhy am I getting this error? Access is denied.
ReplyDeleteYou should run the command prompt as administrator.
DeleteIt worked well!
ReplyDeleteSimply, but carefully follow all the steps.
You may have a problem in step 6 while generating "Diff.tex". Try several times.
Of course, refresh your FNDB with admin privileges (MikTeX Console is another alternative) and get admin access on cmd too.
Thanks author
In my WIN10 with texlive, the step 6 should be modified as: Open Command Prompt, and type in
ReplyDeletelatexdiff --flatten PreviousFile CurrentFile> diffe.g., latexdiff.pl --flatten "C:\old.tex" "C:\new.tex" > "C:\Diff.tex"