11

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

  1. Based on the above description, have I installed both Perl and latexdiff properly? Or should they be put on the same path?
  2. 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)?
6
  • 1
    I think the guts of How to make the rmligs script available globally on Windows? might be pretty relevant here- see what you think...
    – cmhughes
    Apr 4, 2013 at 1:02
  • 2
    The latexdiff.exe is just a MiKTeX executable that is either supposed to prompt to install the latexdiff perl script (part of the latexdiff 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 the latexdiff 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 the latexdiff package for installation. Apr 4, 2013 at 22:57
  • 1
    @cyberSingularity You're right. I didn't have 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?
    – Herr K.
    Apr 5, 2013 at 16:05
  • 2
    @KevinC: Your error message, if it is to be trusted, does indicate that it is looking for the file with a .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 contains latexdiff.exe (probably called a MiKTeX bin package or something), through the MiKTeX Update (admin) application (or just update everything that has an update available there). Apr 5, 2013 at 16:59
  • 1
    @cyberSingularity: Thanks for your tips! I'm able to get latexdiff to work now :) It appears that latexdiff is searching for the file latexdiff.pl in the path C:\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 the latexdiff 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!
    – Herr K.
    Apr 5, 2013 at 21:29

2 Answers 2

11

I'll answer my own question here, in case this would turn out to be useful to others.

It appears that latexdiff was searching for the file latexdiff.pl in the path

C:\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 the latexdiff files into this new folder, and added the .pl extension to those files (they originally had no extension). Then, refresh FNDB in MikTeX settings. And it worked!

8
  • I did not manage to have latexdiff running on my computer with MikTeX 64bit. I carefully perform all steps described in techshangrila.blogspot.sg/2013/10/… but still have the error message latexdiff.exe: The Perl interpreter could not be found. What should I do? Mar 20, 2014 at 12:14
  • @IgorKotelnikov: The message seemed to suggest that you'd need to install Perl (strawberryperl.com/releases.html) on your machine.
    – Herr K.
    Mar 20, 2014 at 17:31
  • I did this and it still gives the same error, it just no longer asks for me to instal latexdiff.
    – Elliot
    Jan 15, 2015 at 21:55
  • @Elliot: Could you give a bit more details? For example, you system, TeX distribution, error messages, etc. Also, did you have Perl installed already?
    – Herr K.
    Jan 15, 2015 at 22:16
  • Miktex 2.9 on windows 7x64 using strawberry perl. the error is latexdiff: The Perl script could not be found. latexdiff: Data: scripts/latexdiff/perl/latexdiff.pl Already made a perl folder in the latexdiff folder, added .pl to all the files, and updated the FNDB.
    – Elliot
    Jan 15, 2015 at 22:24
3

There is a step-by-step installation guide here for installing latexdiff for windows http://techshangrila.blogspot.sg/2013/10/installing-latexdiff-of-windows.html

2
  • 1
    I did that. Still latexdiff: The Perl script could not be found. latexdiff: Data: scripts/latexdiff/perl/latexdiff.pl.
    – Elliot
    Jan 16, 2015 at 17:43
  • Apparently once you do all that you must additionally go to the admin settings and refresh the FNDB or it will not work.
    – Elliot
    Jan 16, 2015 at 17:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .