Description
I'm new to both Perl and latexdiff
. I'd like to use latexdiff
to track changes between versions of my LaTeX documents. However I couldn't get it to work.
I have MikTeX 2.9, and latexdiff.exe
(and other variants) in
C:\Program Files (x86)\MiKTeX 2.9\miktex\bin
and Strawberry Perl 5.16.3.1 in
C:\StrawberryPerl
When I execute the command
latexdiff old.tex new.tex > diff.tex
I got the following messages:
latexdiff: The Perl script could not be found
latexdiff: Data: scripts/latexdiff/perl/latexdiff.pl
I found a similar question here on tex.se, but I'm not sure if my problem is the same as the one posted there, because I couldn't find the subfolder latexdiff
in \MiKTeX 2.9\scripts
. Also I don't have any pop-up window asking for installation of other stuff (which is the case in the mentioned post).
Question
- Based on the above description, have I installed both Perl and
latexdiff
properly? Or should they be put on the same path? - If I've installed stuff properly, is there a way to get
latexdiff
to work (if this is not a bug with MikTeX 2.9)?
latexdiff.exe
is just a MiKTeX executable that is either supposed to prompt to install thelatexdiff
perl script (part of thelatexdiff
MiKTeX package) or to execute said perl script if already installed. As you say you do not have the perl script (but note it may not have the.pl
extension), it seems like thelatexdiff
package is not installed, though it is odd that you are not prompted to install it automatically. Try launching the MiKTeX package manager directly (in Admin mode?) and selecting thelatexdiff
package for installation.latexdiff
installed before. So I did it in MikTeX's package manager (admin mode). But still, the problem persists, and I'm still getting the same messages in the OP. Are there any other configuration I need to do? After installation, I can find the folder\scripts\latexdiff`, and there is a file
latexdiff` and its variants. However, the file doesn't have an extension whatsoever. Should I manually add a.pl
extension to them?.pl
extension (and possibly in a different subfolder?), so it might be worth copying the script to there to see if it helps. However, before you do that, I wonder if it is worth trying to update the part of your MiKTeX distribution that containslatexdiff.exe
(probably called a MiKTeXbin package
or something), through the MiKTeX Update (admin) application (or just update everything that has an update available there).latexdiff
to work now :) It appears thatlatexdiff
is searching for the filelatexdiff.pl
in the pathC:\Program Files (x86)\MiKTeX 2.9\scripts\latexdiff\perl
; whereas MikTeX only installs the files in the folder\scripts\latexdiff
. So I created a subfolder\perl
, copied all thelatexdiff
files into this new folder, and added the.pl
extension to those files (those files originally had no extension). Then, refresh FNDB in MikTeX settings. And now it works!