Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Add an Auto Version Number in Latex?

This question Add a version number to the title of a LaTeX document spurred my curiosity:

How do you add an auto-version number in Latex?

( So one is not doing this: {\bf Version:} 1.2 and then later {\bf Version:} 1.2 1.3) ?

like image 361
rlb.usa Avatar asked Apr 13 '10 23:04

rlb.usa


1 Answers

\usepackage[nofancy]{svninfo}
\svnInfo $Id: viperdefects.tex 125 2007-05-29 16:29:07Z longborb $
\svnKeyword $URL: file:///F:/Stuff/Repository/Development/Essays/Viper/viperdefects.tex $

If you use Subversion, the above code is an example of what you can do. SVN updates the information as you update the file, but beware: only if you up the containing file. It doesn't track updates elsewhere in the tree.

However, I get the feeling that this is now considered a bit old-fashioned; the modern trend is to DVCSs, where there isn't really a valid concept of a linearly incrementing version number.

like image 64
Brent.Longborough Avatar answered Sep 27 '22 23:09

Brent.Longborough