I am writing a large LaTeX document, and I would like to display the current SVN revision number on the title page. The problem is that the LaTeX document is split into several files root.tex, ch1.tex, ch2.tex, ...

I inserted $Revision$ in the root.tex file, so that it is displayed on the front page.

Of course, I also ran

svn propset svn:keywords 'Revision' root.tex

But the problem is that this $Revision$ variable in root.tex, naturally, is not updated if I only modify the ch2.tex file, for example, and commit to SVN. So the PDF will still display the old revision number.

I artificially have to modify root.tex as well, if I want the new SVN revision number to be displayed. And just touch root.tex won't do it because SVN is smart. I actually have to change some text, at least add some space or so in root.tex.

What's the best way to solve this properly?


A quick perusal of CTAN, turned up the svn-multi package. From the README

This package lets you typeset keywords of the version control system Subversion inside your LaTeX files anywhere you like. Unlike the very similar package 'svn' the usage of multiple files for one LaTeX document is well supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.