I also added a Makefile for mine (LaTeX), and it would add the commit hash to the front page (with an asterisk if the repository had uncommitted changes).
So, if I gave a draft to someone and got feedback, I’d know exactly which revision it was.
Makefile in other comments. You’ll need something like this on the title page (this assumes you use my Makefile which puts the version in VERSION.tex [that’s the literal name of the file, not a placeholder]):
I also added a Makefile for mine (LaTeX), and it would add the commit hash to the front page (with an asterisk if the repository had uncommitted changes).
So, if I gave a draft to someone and got feedback, I’d know exactly which revision it was.
Hey, amazing idea, can you share the code?
Makefile in other comments. You’ll need something like this on the title page (this assumes you use my Makefile which puts the version in
VERSION.tex
[that’s the literal name of the file, not a placeholder]):{\bf{\color{red}DOCUMENT REVISION:}} {\color{blue}\input{VERSION}}
Sure thing. This also includes the beamer bit which I used for my defense. It’s all pretty hacky but hope it’s useful!
Thank you!!! I’ll see if I manage to make it work for me.
I also had some Makefiles in other directories, e.g., for my
media/
I had:MAKE = make -s RECURS = svgs/ recurs: $(RECURS) @$(foreach DIR, $(RECURS), \ echo "MAKE (CD) $(CURDIR)/$(DIR)"; \ $(MAKE) -C $(DIR) $(MAKECMDGOALS);) @echo "MAKE (CD) $(CURDIR)/" all: recurs clean: allclean: recurs clean
and for
media/svgs/
:SVG_FILES := $(wildcard *.svg) PDFDIR := ./ PDF_FILES := $(patsubst %.svg,$(PDFDIR)/%.pdf,$(SVG_FILES)) all: $(PDF_FILES) clean: @rm -f $(PDF_FILES) @echo "SH (RM) Tidying up derived PDFs" allclean: clean $(PDFDIR)/%.pdf: %.svg @inkscape -T --export-pdf=$@ $< @echo "INK (PDF) $<"