Skip to content

Instantly share code, notes, and snippets.

@bagrow
Created February 1, 2011 00:50
Show Gist options
  • Save bagrow/805187 to your computer and use it in GitHub Desktop.
Save bagrow/805187 to your computer and use it in GitHub Desktop.
Semi-automatic way to track changes in a latex file
#!/usr/bin/env bash
# these can also be commandline args...
OLD_TEX=paper_orig.tex # previous draft, submission, etc.
NEW_TEX=paper.tex # current working version
if [[ "$1" = 'clean' ]]; then
rm -f diff*
else
latexdiff $OLD_TEX $NEW_TEX > diff.tex
latexmk -pdf diff.tex
open diff.pdf
fi
@bagrow
Copy link
Author

bagrow commented Feb 1, 2011

Note that this requires latexdiff and latexmk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment