[Tugindia] Date of file

E. Krishnan ekmath at asianetindia.com
Mon Nov 21 16:51:42 CET 2005

On Fri, 18 Nov 2005, Kapil Hari Paranjape wrote:

> Hello,
> I'm creating some print-outs of some old TeX files.
> Is there some way (short of editing the files) to
> get TeX to set the "date" header in the output to
> the date of last modification of the file?

In a Linux system you can do these:

1. If the file in foo.tex contains a \title command and a \maketitle, then

    latex "\date{30 August 1954}\input{foo}"

   will give output foo with 30 August 1954 as date.

2. If the filedoes not contain \title or \maketitle the command

  latex "\AtBeginDocument{\title{}\date{30 August 1954}\maketitle}\input{foo}"
   will do the trick.


More information about the tugindia mailing list