13

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

Guido
  • 30,740
jjyu2002
  • 271

3 Answers3

14

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.

jjyu2002
  • 271
0

The latex-diff website returned "<filenames> require package ulem to compile", when I tried to use it with my two files. I had commented out this package in my LaTeX files, so I uncommented them and still got this message. As I understand the message, the website itself requires ulem in order to compile the files that are being compared. Strange if it didn't have it.

Werner
  • 603,163
-1

In fact, there is a very simple solution, just use http://3142.nl/latex-diff/ this service, then generate a new `.tex' file which will produce the desired pdf.

wayne
  • 1,331