[pdftex] current filename and current filedate ?

Hartmut Henkel hartmut_henkel at gmx.de
Fri Dec 19 15:26:59 CET 2003


On Fri, 19 Dec 2003, Heiko Oberdiek wrote:

> On Fri, Dec 19, 2003 at 02:39:12PM +0100, Magnus Lie Hetland wrote:
>
> > But you couldn't put the file containing this definition under version
> > control, then, could you? Any workarounds there?
>
> Why not?
> For example:
>
> %%% test.tex %%%
> \def\RCSId $%
>   Id: #1,v #2 #3/#4/#5 #6 #7 #8 ${%
>   \def\fileRCSversion{#2}%
>   \def\fileRCSdate{#3-#4-#5}%
>   \def\fileRCStime{#6Z}%
> }%
> \RCSId $Id: test.tex,v 1.3 2003/12/19 13:59:08 one Exp $
>
> Version: \fileRCSversion\filbreak
> Date: \fileRCSdate\filbreak
> Time: \fileRCStime
> \bye
> %%% test.tex %%%

Funny! Or make the Id the 1st parameter, e. g.:

%%% test.tex %%%
\def\RCSId $#1: #2,v #3 #4/#5/#6 #7 #8 #9 ${%
  \def\fileRCSversion{#3}%
  \def\fileRCSdate{#4-#5-#6}%
  \def\fileRCStime{#7Z}%
}%
\RCSId $Id: test.tex,v 1.2 2003/12/19 14:21:58 hahe Exp hahe $

Version: \fileRCSversion\filbreak
Date: \fileRCSdate\filbreak
Time: \fileRCStime
\bye
%%% test.tex %%%

Regards, Hartmut


More information about the pdftex mailing list