[pdftex] current filename and current filedate ?

Reinhard Kotucha reinhard.kotucha at web.de
Sun Dec 21 09:38:28 CET 2003

first of all, I think that you are talking about different things:
Something like \currentfiledate would provide the time the file is
last edited and RCS provides the time the file is last checked in.

Though Knuth decided that TeX is frozen, it might be possible to add
new primitives.  PdfTeX added new primitives as well.

But since \currentfiledate is more general it would not make sense to
add it to pdfTeX.  eTeX is a more appropriate place to insert such a
feature.  Then you could use pdfetex or etex. 

But I think that Heiko pointed out the problem:  You need
\currentfiledate, someone needs \currentfilesize and someone else
might want to find out whether it is a regular file or a symlink...

Finally, there would be so much operating system specific stuff that
portability is a pain.

If you think that Perl is portable enough for you then it it is the
best way to use it to create an \input file.

Another thing is \currentfile.  I think that sth. like that is useful.
This doesn't require new primitives.  As far as I remember I patched
the \include macro to provide \currentfile several years ago.  This is
not very difficult but it would be more useful to patch the \input
macro so that \inputlineno always refers to the correct \currentfile.

It is not so easy as it looks because \input can be nested and one
needs to maintain a stack to support several nesting levels.  LaTeX2e
is frozen, but it is possible to write a macro package.  It would be
nice if LaTeX3 would have this feature.

But independent from what I said about TeX, some kind of version
control is useful.  If the current version of your TeX file is
hopelessly broken you then can at least retrieve a former version.
If more than one person can access a file, version control is a must.


pdftex mailing list
pdftex at tug.org

Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the pdftex mailing list