I need to install latexdiff on my Mac, but have been unable to. The simplest approach sudo port install latexdiff gives me the error sudo: port: command not found.

Alternative installation instructions on CTAN are unclear to me.

Can latexdiff be installed on a Mac from Terminal using the files available on CTAN? If possible, how can this be done?

  • 3
    If you have MacTeX, you already have latexdiff – egreg May 28 '13 at 22:20
  • 2
    You can verify that it's installed by using which latexdiff. If you have MacTeX installed this command should return /usr/texbin/latexdiff. – Alan Munn May 29 '13 at 1:04
  • At least for me, it is located here based on the 2016 MacTex: /opt/local/bin/latexdiff – Michael Ohlrogge Sep 7 '16 at 1:10

There are two questions here:

  1. How to install latexdiff?
  2. error sudo: port: command not found

You already got the answer for the first one from Egreg. MacTeX includes latexdiff Perl script. I just checked on my daughter's MacBook Pro. You probably want to replace default 2009 or something like that MacTeX version which came with OS X with the current. Do not use ports to install TeX on Mac!

Based upon the code you provided it looks like you do not have ports installed. I am an OpenBSD user so take my advices with a grain of salt but if I recall correctly you have to install firstly Xcode in order to bootstrap ports tool chain (gcc, binutils and usual stuff).

  • 2
    There is no version of MacTeX that comes with OS X. It is always installed separately, but you're right it shouldn't be installed with MacPorts (which it seems the OP doesn't have installed anyway.) – Alan Munn May 29 '13 at 1:02
  • As Predrag said, you don't seem to have a working istallation of MacPorts. Try to install it with the help from here: macports.org/install.php – Habi May 29 '13 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.