If you’re looking to display changes to a LaTeX document in different colors, say for a paper or thesis revision, you might be interested in
latexdiff. This is a command-line tool that most likely came packaged with your LaTeX distribution—try running
latexdiff --version in your terminal to see if you have it.
The idea is simple, just run:
latexdiff original.tex revised.tex > diff.tex
diff.tex into a PDF just like you would any LaTeX file. The result should look something like this:
This is a great tool! It isn’t completely foolproof, and you will sometimes encounter errors when compiling
diff.tex, especially if you’ve changed citations between the original and revised versions. These can be resolved manually by editing
diff.tex, just keep track of the line numbers where the errors are occurring.
A more detailed summary of options for
latexdiff is available here:
Thanks for reading!