Path: utzoo!utgpu!news-server.csri.toronto.edu!ois.db.toronto.edu!panos Newsgroups: comp.text.tex From: panos@db.toronto.edu (Panos Economopoulos) Subject: Re: LaTeX guru question: \timestamp macro that sometimes fails Message-ID: <91Apr28.124501edt.2151@ois.db.toronto.edu> Organization: Department of Computer Science, University of Toronto References: <32345@usc> Distribution: comp Date: 28 Apr 91 16:45:16 GMT Lines: 38 siemsen@sol.usc.edu (Pete Siemsen) writes: >A user here asked for a way to insert the current time and date into >his LaTeX files. I found a macro in "TeX for the Impatient" that does >the job nicely, and the user went away happy. Then he tried using the >macro in his page headings, where it only works partially. >Here's a sample file the demonstrates the problem. In the heading, >the date is fine but the time comes out as "0:0". I'm by no means I cannot help you with the macro you just posted. As far as the date is concerned, LaTeX has a \today macro. Regarding the time of the day, I use in page headers the following \hhmm macro, found in in our ``Local Guide to LaTeX''. The specific file (page layout) seems to have originally been posted/mailed by Nelson Beebe at U. of Utah. It does handle times like 3:02. % ---------------------------------------------------------------------- % % TIME OF DAY % \newcount\hh \newcount\mm \mm=\time \hh=\time \divide\hh by 60 \divide\mm by 60 \multiply\mm by 60 \mm=-\mm \advance\mm by \time \def\hhmm{\number\hh:\ifnum\mm<10{}0\fi\number\mm} % ---------------------------------------------------------------------- Panos Economopoulos -- panos@csri.toronto.edu (ARPA/CSNet) University of Toronto {uunet, ...}!utcsri!panos (UUCP) panos@csri.utoronto (Bitnet) panos@csri.toronto.cdn (CDNnet/EAN/X.400)