How to display the bazaar version number in a latex document?

I use the bazaar as a version control system for my research. I have a lot of latex documents. I want to show the version number in all .dvi files under the bazaar.

+4
source share
3 answers

The easiest way to do this is to use make or a similar build manager to create your .dvi files.

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

 version-number: bzr revno > VERSION.tex 

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

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

In your .tex files in the appropriate place (in the header / footer, header block, in the PDF file, etc.) you should indicate the version number stored in VERSION.tex:

 \input{VERSION} 

When you set this value, you must bzr ignore VERSION.tex so that it does not keep its version number, of course.

All of this is based on a similar technique used for git in the General Lisp Short Link project .

+4
source

Perhaps the bazaar keywords plugin can help you.

+1
source

I have successfully used the VC latex package with Bazaar. It works using an external script that is called at compile time \ write18. This may seem redundant, but it provides a lot of functionality and works well.

+1
source

All Articles