ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: "'ntg-context@ntg.nl'" <ntg-context@ntg.nl>
Subject: Re: Versionnumbers
Date: Tue, 10 Jul 2001 18:34:43 +0200	[thread overview]
Message-ID: <3.0.6.32.20010710183443.01503040@server-1> (raw)
In-Reply-To: <000015898BFAD41198D708002BC3108901BA119B@asdexc.sfb>

At 05:30 PM 7/10/01 +0200, Hokojoku, Bert wrote:
>Hi all,
>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?

you can use 

  \version[concept]  % \versie[concept]

or 

  \version[temporary] % \versie[voorlopig]

which provides some info about the project structure [if used]

If you want to keep track of numbers in an independent way, the best way is 

\def\LoadVariable#1#2%
  {\startreadingfile
   \readlocfile{#2}{}{}%
   \ifx#1\undefined\global\let#1\empty\fi
   \stopreadingfile}

\def\SaveVariable#1#2%
  {\immediate\openout\scratchwrite=#2%
   \immediate\write\scratchwrite{\string\gdef\string#1{#1}}%
   \immediate\closeout\scratchwrite}

\newcounter\CurrentVersionNumber

\def\IncrementVersionNumber%
  {\LoadVariable{\CurrentVersionNumber}{version.num}%
   \doglobal\increment\CurrentVersionNumber
   \SaveVariable{\CurrentVersionNumber}{version.num}}

\IncrementVersionNumber versie: \CurrentVersionNumber

[let's hope that this makes it into teh archive since i'll probably loose it]

Hans

-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


      parent reply	other threads:[~2001-07-10 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10 15:30 Versionnumbers Hokojoku, Bert
2001-07-10 15:55 ` Versionnumbers Frans Goddijn
2001-07-11 21:03   ` Versionnumbers Hartmut Henkel
2001-07-12  7:17     ` Versionnumbers Hans Hagen
2001-07-12 19:00       ` Versionnumbers Hartmut Henkel
2001-07-10 16:34 ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3.0.6.32.20010710183443.01503040@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).