[OS X TeX] Re: draftcopy "weirdness"
John B. Thoo
jthoo at yccd.edu
Tue Apr 12 15:29:04 CEST 2011
On Apr 11, 2011, at 4:37 AM, Peter Vamos wrote:
> At 05:03 +0100 11/4/11, John B. Thoo wrote:
>> Date: Sun, 10 Apr 2011 16:32:27 +0100
>> From: Peter Vamos <P.Vamos at exeter.ac.uk>
>>> Additionally, if you want the time on a new line then you have to
>>> enclose the draftstring in a parbox or the minipage environment. For
>>> example, to approximate what you originally wanted, try this:
>>> \ DRAFT \quad\today
>> That puts the date on a new line very nicely; however, there is no time.
> To get a time stamp you have to use TeX's \time register, this is the number of minutes since midnight. There is an example in The LaTeX Companion 2nd ed (TLC2) Example A.3.2 page 871, on how to turn this into an hour : Minutes representation; this code is between the rows of %%%%%% below, I only changed their `h' and `min' to a colon `:'; you can modify this to other representations. I think that there is also a datetime package which would do this and probably more.
> So try the code below. You may also experiment with the package suggested by Juan Luis Varona (I haven't tried) but again you'll need the time stamp code from TLC2 below (or the package).
> \thehours :\theminutes}
> \ DRAFT \quad\today\ \printtime
> Hope this now does (roughly) what you wanted but now compatible with pdfLATEX.
That's very nice. I like it. In fact, I saved your code into a file named "vamosdraft.sty". :-) My only further question is how can I get the time to print in four digits, viz., "hh:mm"? Now, if the time is 6:04, e.g., it prints 6:4. See
Thanks very much for your help.
"It is worth thinking deeply about simple things."
---Jesus De Loera, UC Davis mathematics, 12 Jan 2011
More information about the macostex-archives