I have my PhD thesis under revision control (git), with a master file (~/Thesis/thesis.tex)
using the \include
command to include the chapters (~/Thesis/tex/chapter1.tex
, etc).
Is there a way to include the revision information of each separate chapter in the header of each page for each respective chapter?
I thought I was getting somewhere with a combination of the gitinfo
and fancyhdr
packages, but I'm not sure if you can have different revision headers under gitinfo.
gitinfo
only provides information for the current HEAD. I considered the approach you're suggesting, but it may be unsafe if, for example, you have a private style file in your project that affects the output, but doesn't actually "appear on a page". Knowing the revision id for the whole project does allow you to know exactly which versions of files were used, but obviously in a less-convenient manner.