Hi Francesco, Aaron's code is correct. But what would your workflow be: edit/compile/fix, edit/compile/fix, ..., git commit/compile. Wouldn't that mean that most of the time you would display the previous git commit derived from git log, and so it would be incorrect the majority of the time? Sound like a recipe for errors. I'd be very wary of that. Or perhaps your workflow is quite different?
I use similar code to Aaron's to simply insert a timestamp. Andrew On Fri, 15 Nov 2019 at 14:20, Francesco Petrogalli <francesco.petroga...@gmail.com> wrote: > I am trying to print the hash of a commit in the pdf, to version the file. >