You might use `rcs', revision control system. This stamps your files
with an Id string, containing filename, -version, -date, creator...
You submit e. g. the file foo.tex by ci foo.tex. You get the new version
for editing by typing co -l foo.tex
In plain TeX the following macro scans the Id string, when you have
initially included a line \scanrcs $Id$ into your input file:
% begin of file foo.tex
\def\scanrcs $#1 #2,v #3 #4/#5/#6 #7 #8 #9 ${%
\def\fileversion{#3}
\def\filedate{#4#5#6} % Or whatever date format you like
}
\scanrcs $Id: foo.tex,v 1.1 2001/07/11 20:49:46 hahe Exp hahe $
\fileversion
\bye
% end of file foo.tex
E. g. this prints `1.1', the current version.
Should be transferable also to ConTeXt, but don't have experience with
it.
Have fun!
Hartmut
On Tue, 10 Jul 2001, Frans Goddijn wrote:
> I think a current-date/time/seconds line in basic TeX code would
> do that unless you compile several times per second ;-)))
>
> I'm trying to keep track of the versions of my documents. Is it
> possible to print the number of times a file has been generated in a
> title or a header?
> Or, is there some other way to generate versionnumbers?
------------------------------------------------------------------------
Dr.-Ing. Hartmut Henkel
In den Auwiesen 6, D-68723 Oftersheim, Germany
E-Mail: [EMAIL PROTECTED]
http://www.circuitwizard.de
------------------------------------------------------------------------