TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the svn-multi package to keep track of different versions of my PhD thesis.

One problem (I did not find anything about it in the manual or in the web, but maybe I overlooked it): I have compiled my document and the PDF is marked with the number of the last revision "85". When I now do a commit (and I also commit the PDF to have it for future reference), in revision number 86 sits a PDF with number 85 printed on it.

I think that is an inherent problem, because the PDF has to be created before the commit is done, or is there anything that can be done to avoid that and have the committed PDF showing the rev number corresponding to its commit?

share|improve this question
A late welcome to tex.sx! Note that it is unusual around here to sign your questions (as there is already a box with your username below it). – Hendrik Vogt Mar 10 '11 at 16:27
@Hendrik: sorry, just a bad habit of mine ;-) I'll have to try to get used to the local netiquette... – MostlyHarmless Mar 10 '11 at 16:37
Not really an answer, so I'll leave it as a comment: just how desirable is it to have your PDFs under version control? I tend to v-c just the source files. – Brent.Longborough May 28 '11 at 16:29
@Brent.Longborough: your right - I also considered only taking the source files. However, after some installations/updates of different LaTeX packages, TeXLive 20xx etc. it is good to have the original version of the pdf and not to compile again. (surely it would save much space not to save the pdfs. But the problem is: I use the version control also to keep track of version I gave someone for proof reading or comments. So the number on the printed copy always differs from the one in the repository....) – MostlyHarmless May 28 '11 at 19:59
up vote 8 down vote accepted

I'm the author of svn-multi. As already mentioned that is an inherent problem.

One way to achieve this is to define an own macro which may or may not add one to the revision number. This works if the next revision number is really just one larger than the current one. If other people committed something to the repository in the meantime or you committed something outside the LaTeX document, then the difference will be bigger.

You can do it like this: \mysvnrev is either just \svnrev or adds 1 using \numexpr. Just comment the second line out during normal operation and enable it when you compile a PDF you like to commit.

\svnid{$Id: test.tex 85 2011-03-10 10:11:47Z martin $}





Or you could just say:


after your preamble to increase \svnrev by one.

share|improve this answer
@Hendrik: Thanks for your help! As I'm the only one to commit changes, the workaround should help. Or I'll just leave it as it is, knowing that in rev 56 I'll find the files with rev 55. – MostlyHarmless Mar 10 '11 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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