4

I am using bazaar as a version control system for my research. I have many latex documents. I want to display the version number in all the .dvi files under bazaar.

Helgi
  • 5,428
  • 1
  • 31
  • 48
  • 1
    You should probably change the title to something like: "How to display bazaar version number in a latex document?" which would be clearer and more likely to get a prompt answer. – Tikhon Jelvis Jul 29 '11 at 17:46

3 Answers3

4

The easiest way to accomplish this will be to use make or a similar build manager to generate your .dvi files.

Your Makefile should include a new target called version-number:

version-number:
    bzr revno > VERSION.tex

and your .dvi targets should depend on version-number:

my-project.dvi: my-project.tex [OTHER STUFF] version-number

In your .tex files, at an appropriate place (in the header/footer, title block, PDF metainfo, etc) you would include the version number stored in VERSION.tex:

\input{VERSION}

When you set this up you should bzr ignore VERSION.tex so that it won't store its own version number, of course.

This is all based on a similar technique used for git in the Common Lisp Quick Reference project.

andrewtinka
  • 593
  • 4
  • 10
1

Maybe the bazaar keywords plugin can help you.

AmanicA
  • 4,659
  • 1
  • 34
  • 49
1

I have used the latex VC package successfully with Bazaar. It works using an external script that is called during compilation by \write18. This may seem overkill but it provides a lot of functionality and works well.

robince
  • 10,826
  • 3
  • 35
  • 48