8

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

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Symbol 1 Mar 19 '15 at 7:55
  • For your Q4: Create an engine would help. Then you can compare the current file $1 and some old file $1-old. – Symbol 1 Mar 19 '15 at 8:00
7

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.

0

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.

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.

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.