latexdiff is a Perl script that compares two LaTeX source files and outputs a third file with \DIFadd{...} around insertions and \DIFdel{...} around deletions — compile it and additions show in blue, deletions in red strikethrough (via the ulem package). It's not a generic text diff: it parses LaTeX structure first, so renaming a \section{} doesn't read as a full rewrite, and it diffs at the paragraph/sentence/equation level while keeping the output compilable. This is the standard way journals expect a marked-up revision file alongside a clean resubmission.
Why this exists as a separate tool at all: latexdiff ships with TeX Live/MiKTeX on Mac/Linux, but it's Perl, and Windows doesn't have Perl preinstalled — you end up installing Strawberry Perl and fighting PATH issues for a one-off comparison. Overleaf has latexdiff built into Track Changes, but that's gated behind their paid Premium plan. This runs the real latexdiff Perl script from CTAN server-side (not a JS approximation), free, no install.
Was single-file-only until recently - now the new update handles complete multi-file projects. You upload two project ZIPs (original and revised) instead of pasting raw .tex, and it resolves \input{}/\include{} across the whole project rather than you having to flatten everything into one file first. If your Overleaf project spans multiple chapters/sections as separate files, download both versions as ZIPs (Overleaf: Menu → Download → Source) and upload them directly — no manual merging.
Limitations: 500KB per individual file, 4MB total decompressed project size, 5MB ZIP upload size. That's comfortable for basically any single paper and most full theses.
Top comments (0)