Test: node2821""answers_question See changes that were made by user in latex document | TechScreen Revised

See changes that were made by user in latex document

The core problem is to compare two latex generated documents and highlight differences between them. The important part here is that a simple *.tex document may have dependencies to other documents or included .tex files (i.e. each chapter/section may be stored as a separate file). Therefore, one needs to find a way to first combine and build both projects (i.e. produce output), then compare them and then produce a single pdf file that highlights differences.
Answer
1 answer

Use latexdiff utility with "flatten" flag to see differences between two latex based documents

In order to see differences between two latex generated documents, one can use a program called latexdiff: https://www.sharelatex.com/blog/2013/02/16/using-latexdiff-for-marking-c...

latexdiff is a Perl script and requires an installation of Perl 5.8 or higher.

If you are a Windows user, you will have to go through the following setup to get latexdiff working on your machine:

1) Install Perl
2) Download latexdiff from CTAN (Comprehensive TeX Archive Network)
3) Unzip the latexdiff files and copy them to the Perl > bin folder (default installation in C: drive)

Mac OS X includes an installation of Perl and no additional setup is required. latexdiff can be found in any CTAN repository in TeX Live Utility.

It is important to use --flatten which makes latexdiff recursively operate on any included .tex files. Then use command line like that:
latexdiff --flatten v1.tex v2.tex > diff.tex

where v1.tex is one version (older) and v2.tex is changed (newer) version. diff.tex is then a tex file that is produces as an output.