# [pdftex] current filename and current filedate ?

Mark Wroth mark at astrid.upland.ca.us
Fri Dec 19 14:49:06 CET 2003

I agree with the utility of putting files under RCS control.  If you take
that route, rcs.sty (available from CTAN) does the definitions needed for
you, and is simple enough to modify if you're using plain TeX rather than
LaTeX.

At 2003-12-19-04:13, George N. White III wrote:
>On Fri, 19 Dec 2003, Heiko Oberdiek wrote:
>
> > On Fri, Dec 19, 2003 at 07:31:39AM +0000, Robin Fairbairns wrote:
> >
> > > > I would like to obtain not only the date/time at which pdflatex is
> > > > running, but I would like to obtain the date+time+name of the current
> > > > file (which can be an include'd file; each one is a chapter, so this
> > > > would make for a nice "this chapter was last edited on dec 3, 2004".  I
> > > > am not using revision control, or any other fancy mechanism.   is this
> > > > possible?
> > >
> > > no.
> >
>[..]
> > > get it under revision control and use the check-in records.
> >
> > But having revision control is much better.
>
>And very easy to do.  RCS is available for *n*x, OSX, and Win32 -- not
>sure about earlier Mac OS's.  There are fancy commercial systems that
>support multiple networked users, but if you aren't using version
>control at all, RCS takes very little extra work.  Emacs includes
>support for RCS so you don't have to run the checkin/checkout
>commands manually.
>
>Simply define something like:
>
>\def\RCSId $Id: #1,v #2 #3/#4/#5 #6 #7 #8 #9${
>   \def\fileRCSversion{#2}
>   \def\fileRCSdate{#3-#4-#5}
>   \def\fileRCStime{#6Z}
>   }
>
>RCS updates strings of the form "$Id:...$" with the version number
>and timestamp, so the the following line in each file will set the
>macros to the value for the file.
>
>\RCSId $Id: getroi.tex,v 1.2 2003/12/04 19:23:56 gwhite Exp gwhite$
>
>RCS also has "$Log:$" that let you insert a comment about the changes
>made for each version you check in.
>
>--
>George N. White III  <aa056 at chebucto.ns.ca>
>_______________________________________________
>pdftex mailing list
>pdftex at tug.org
>http://tug.org/mailman/listinfo/pdftex

Mark B. Wroth
<mark at astrid.upland.ca.us>