0

I am using latexdiff to generate a PDF diff of two versions of a document.

I am using overleaf with latexdiff according to this answer. I.e., with a latexmkrc file containing

$pdflatex = "latexdiff main_old.tex main.tex > main-d.tex; pdflatex %O main-d"

Though, if necessary I could switch to editing the document locally.

The document contains a lot of equations. Some equations have been deleted in the first few sections of the document, in which case they display as

enter image description here

But for my use case (responding to peer review) it would be useful to display the old equation numbers

enter image description here

for referencing the equations that have been deleted.

Also, more importantly, the numbering of the equations in main.tex differs from main_old.tex. It would be useful to display the equations as follows. If for example, in the previous version, a specific equation was number 5 but now it is number 3, I would like to display this as:

E=m c^{2} \quad \quad \color{red}{\enclose{horizontalstrike}{(5)}} ,\color{blue}\underline{(3)}

Is this somehow possible? Or is there a reason why it would not be?

Cameron
  • 123
  • 1
    This will be very difficult to achieve, unfortunately. latexdiff processes the .tex input file and does not know about equation numbers. The only way to achieve what you want would be for functionality to be added to latexdiff to try and replicate the latex functionality with regard to equation numbers (i.e. count and assign numbers), which would be considerable effort (writing as the author of latexdiff here). – frederik Mar 09 '24 at 10:02

0 Answers0