Skip to content

Instantly share code, notes, and snippets.

@lukeolson
Created October 7, 2022 20:13
Show Gist options
  • Save lukeolson/59d342529714c1821331e8b7bc7e0aaa to your computer and use it in GitHub Desktop.
Save lukeolson/59d342529714c1821331e8b7bc7e0aaa to your computer and use it in GitHub Desktop.
latexdiff helper script
#!/bin/bash
set -e
# run latexdiff
# --disable-auto-mbox
# fixes issue with underling the current citations
# --config="PICTUREENV=(?:picture|DIFnomarkup|tabular)[\w\d*@]*"
# does not diff tabular environments
latexdiff --disable-auto-mbox\
--append-mboxsafecmd="cref,Cref"\
--config="PICTUREENV=(?:picture|DIFnomarkup|tabular|algorithm2e)[\w\d*@]*"\
oldpaper.tex newpaper.tex > diff.tex
# fix the ulem package issue
sed -i.bak '1s;^;\\PassOptionsToPackage{normalem}{ulem}\n;' diff.tex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment