From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Version control tags in context (was Logos in context / Miscellaneous questions)
Date: Thu, 20 Sep 2007 19:15:49 -0400 (EDT) [thread overview]
Message-ID: <alpine.WNT.0.9999.0709201853250.2644@nqvgln> (raw)
In-Reply-To: <a6e8c1d0709180153s67ab25dcxcb8566fec44c6332@mail.gmail.com>
On Tue, 18 Sep 2007, Edd Barrett wrote:
> Hi,
>
> On 17/09/2007, Aditya Mahajan <adityam@umich.edu> wrote:
>> On Mon, 17 Sep 2007, Edd Barrett wrote:
>>>
>>> B) Is there an equivilent to the RCS package for latex. Basically it
>>> parses version control tags from CVS/RCS.
>>
>> There are a couple of RCS packages for LaTeX. Can you elaborate on
>> what functionality you need. Most of it is pretty straightforward to
>> port to ConTeXt.
>
> I used to use it to insert tags without all the crud around it. So for
> example a revision id directly from CVS looks like this "$Revision:
> 1.4$" (no quotes) and I used to use \RCSRevision which would expand to
> just "1.4". It's probably quote simple, but would require research (I
> have but merely scratched the surface of TeX/Context).
Here is a very preliminary version.
\def\defineVERSION
{\dosingleargument\dodefineVERSION}
\def\dodefineVERSION[#1]%
{\dododefineVERSION#1}
\def\dododefineVERSION$#1: #2$%
{\setvalue{VERSION:#1}{#2}}
\def\getVERSION#1{\getvalue{VERSION:#1}}
\defineVERSION[$Revision: 1.4$]
\defineVERSION
[$File: something$]
\starttext
This file, \getVERSION{File}, is at version \getVERSION{Revision}
\stoptext
I changed the interface to make it more ConTeXtish. AFAIU version
control, this should work with RCS, CVS, and subversion. It is not too
hard to extend this to $Data:$ and $Id:$.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2007-09-20 23:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-17 15:36 Logos in context / Miscellaneous questions Edd Barrett
2007-09-17 17:10 ` Hans Hagen
2007-09-17 18:46 ` Aditya Mahajan
2007-09-18 8:53 ` Edd Barrett
2007-09-20 23:15 ` Aditya Mahajan [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=alpine.WNT.0.9999.0709201853250.2644@nqvgln \
--to=adityam@umich.edu \
--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).