# [texhax] Information about document in the document

tom sgouros tomfool at as220.org
Tue Oct 7 23:12:01 CEST 2008

Hi Tom:

I'm sorry to have missed the original post on this, so pardon me please
if I'm slightly off target.

I have accomplished related goals by using the rcsinfo.sty package (the
documents in question were checked into a CVS archive).  The package
makes parts of the RCS string available.  You do this at the top of the
file:

\rcsInfo $Id: ripr33.tex,v 1.1 2008-09-28 02:54:47 tomfool Exp$

And then parts of the string are available as \RCSInfoDate and so on.
The actual package also has header formatting facilities, which I didn't
need, but the rcs string parsing stuff was pretty easy to carve off into
a separate package.

About ten years ago I implemented a class that used the mktextex
in an old class definition:

\DeclareOption{draft}
{\message{Using draft' format}\input pwd.tex\@paperdrafttrue}

...

%  In draft mode, the footer will have the time and date on it.  It
%  will also have the name of the file on the right hand side.  In
%  order for this to work, there must be a file called mktextex in the
%  \$PATH (apparently ~/bin doesn't work for AucTeX) with the following % contents: % %<*mktex> echo "\def\dirname{pwd}" >$1
echo $1 %</mktex> % % This will create a file called pwd.tex in the directory, whose % contents are the \$PWD.  This is not a perfect solution, since it
%  leaves little pwd.tex files all over the place, but so it goes.
%
...
\if at paperdraft
\fancyfoot[L]{\sectfont\today}
\fancyfoot[R]{\sectfont\dirname/\jobname}
\fi

This is not very portable, and I think it's kind of a security issue for
some purposes, but it might work for you.

There are possibly more stylish ways to do these things now, but these
two have worked for me.  Hope this helps,

-tom

Tom Backer Johnsen <backer at psych.uib.no> wrote:

> Susan Dittmar wrote:
> > Hi Tom,
> >
> > from the top of my head I can only answer parts of your questions; maybe
> > I'll find more time for the rest later.
> >
> >> I would like to drop the date that appears by default when using the
> >> \maketitle command.
> >
> > use an empty \date{} command before the \maketitle command.
> >
> >> how do I get hold of [...] the date/time?
> >
> > Date: \today
> >
> > Hope that helps as first steps towards your goal,
> >
> > 	Susan
>
> The inclusion of \date{} works fine.  Thanks.  And I have assumed that a
>   corresponding \time{} function, but I have not located it,  Perhaps
> \clock{}, no.  And the directory, what would that be?
>
> Tom
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>

--
------------------------
tomfool at as220 dot org
http://sgouros.com
http://whatcheer.net
`