- Install Texstudio https://www.texstudio.org/ and Miktex https://miktex.org/download
- Open Miktex > check for updates > updates tab > update now
- Download the original version
- Go to Overleaf > history > find the version > view single version > download project at this version
- Download the current version
- Go to Overleaf > menu (top left) > Download source
- NB: if you've made changes using Overleaf's "track changes" feature, you'll need to accept those changes before they are reflected in your diff PDF
- Unzip both versions, rename the folders "orig" and "updated"
- Open orig/main.tex and updated/main.tex in Texstudio
- Compile each of them (green play button)
- This may take a while on first run because it needs to download the packages you're using
- Open a terminal in the folder containing the "orig" and "updated" folders
- Run "latexdiff-so orig/main.tex updated/main.tex --flatten > diff.tex"
- We use latexdiff-so as it is standalone (doesn't rely on any other Perl libraries)
- --flatten tells latexdiff to follow \input commands properly
- Open diff.tex in Texstudio, run "Build & View" (double green arrow) and inspect output
- You might have to fix some errors here, for example removing tikz figures
- You can upload the diff.tex into your Overleaf project to share with collaborators and submit
There are also some ways to do it in Overleaf, but these weren't working for me: https://tex.stackexchange.com/questions/603303/install-and-use-latexdiff-without-miktex