[Tex/LaTex] how to use latexdiff with TexShop

latexdiffmactexshop

I am trying to use latexdiff to compare two tex documents on my macbook pro. I use TexShop to compile my latex documents. I know the latexdiff package is already installed with under the Tex folder, but I do not know how to use it.

I have these questions:

  1. how to use latexdiff? do I click latexdiff then the Terminal shows up? then do I write the command there latexdiff old.tex new.tex > diff.tex?
  2. I have tried this, but I could not write anything in the Terminal. Is this related to security issue or not?
  3. if I want to compare two tex files, where or under what path should I put these two tex files?
  4. do I run latexdiff script in TexShop with macros or applyscript?

I hope someone can give me some suggestion. I would be very grateful

Best Answer

latexdiff is installed in MacTex under /usr/texbin/latexdiff. No need to install it separately. To use latexdiff,

  1. open Terminal;
  2. change the directory to the one where you put old.tex and new.tex; for example, I put my two tex files on Desktop, so I just write cd /Users/xxxx/Desktop in Terminal("xxxx"is my user name);
  3. then write: latexdiff old.tex new.tex > diff.tex.

Job done.

Related Question