On Tue, 18 Sep 2007, Edd Barrett wrote:
Hi,
On 17/09/2007, Aditya Mahajan
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