Created
May 10, 2017 13:16
-
-
Save gwpl/ef4b21532081abcab4b1ecd02635d02e to your computer and use it in GitHub Desktop.
git-latexdiff # how to configure latexdiff in git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://tex.stackexchange.com/a/1417/7128 | |
TMPDIR=$(mktemp -d /tmp/git-latexdiff.XXXXXX) | |
latexdiff "$1" "$2" > $TMPDIR/diff.tex | |
pdflatex -interaction nonstopmode -output-directory $TMPDIR $TMPDIR/diff.tex | |
okular $TMPDIR/diff.pdf | |
rm -rf $TMPDIR | |
# Add to ~/.gitconfig | |
# [difftool.latex] | |
# cmd = git-latexdiff "$LOCAL" "$REMOTE" | |
# [difftool] | |
# prompt = false | |
# [alias] | |
# ldiff = difftool -t latex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment