0

I'm generating a LaTeX document. I want to run a specialised latexdiff to compare my current (uncommitted) version against the last commit of a file, paper.tex.

Something like:

latexdiff paper.tex HEAD:paper.tex > diff.tex

However I've got no idea what the HEAD:paper.tex would actually be. Any suggestions?

Bolster
  • 7,460
  • 13
  • 61
  • 96

1 Answers1

0

TL;DR git show HEAD:repo/path/to/paper.tex cats the contents of the HEAD version.

Not sure if it's the best answer in general, as it appears latexdiff doesn't handle input piping sensibly, but the below is a reasonable use case in my scenario.

git show HEAD:repo/path/to/paper.tex > head.tex; latexdiff paper.tex head.tex > diff.tex; rm head.tex; latexmk diff.tex; evince diff.pdf
Community
  • 1
  • 1
Bolster
  • 7,460
  • 13
  • 61
  • 96