# Perl

## Tracking revisions with latexdiff and latexpand

This post details the setup and use of latexdiff and latexpand for tracking revisions in $$\LaTeX$$ documents. Revisions are tracked by first flattening $$\LaTeX$$ documents (with chapters, a reference section, etc.) into a single .tex file, and then comparing the differences between an old.tex file to a new.tex file. Let me know if you notice a typo or have suggestions in the comments below. Getting started Since latexdiff is a Perl script, you will need Perl to run it: