TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
If you have MacTeX, you already have latexdiff – egreg May 28 '13 at 22:20
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
up vote 1 down vote accepted

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).

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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