mercurial & LaTeX


This post is certainly obsolete...

  1. Just a add the following lines to your Makefile

    HGID:=$(shell hg parents -R .. --template "Mercurial revision {rev} - date: {date|isodate}")
            [ -f $@ ] || touch $@
            echo '\\renewcommand{\hgid}{$(HGID)}' > $@
    dummy: ;
  2. and this lines to your main tex file


    now one can use the command \hgid to get the version everywhere.

  3. for instance

    \chead{{\sc This a DRAFT, please do not distribute.}}
    \cfoot{\HRule \\ \hgid}