[OS X TeX] Re: draftcopy "weirdness"

John B. Thoo jthoo at yccd.edu
Wed Apr 13 16:45:51 CEST 2011

On Apr 12, 2011, at 12:00 PM, in MacOSX-TeX Digest, Vol 42, Issue 11
Claus Gerhardt wrote:

> Date: Tue, 12 Apr 2011 17:01:00 +0200
> From: Claus Gerhardt <claus.gerhardt at uni-heidelberg.de>
> I wonder how I could get the code wrong years ago or ifthenelse is treating "<" as "â?¤"; of course it should read
> \ifthenelse{\value{minutes}<10}{\thehours :0\theminutes}{\thehours:\theminutes}}
> Anyone who wants a trailing 0 in front a single digit hour has to do it himself.
> Claus
> On Apr 12, 2011, at 16:32, Claus Gerhardt wrote:
>> I remembered that we had this discussion some time ago, I guess Alain brought up this question, and my solution was
>> \usepackage{ifthenelse}
>> \newcounter{hours}\newcounter{minutes}
>> \newcommand{\printtime}{%
>> \setcounter{hours}{\time/60}%
>> \setcounter{minutes}{\time-\value{hours}*60}%
>> \ifthenelse{\value{minutes}<9}{\thehours :0\theminutes}{\thehours:\theminutes}}
>> At least I assume that this was my solution, based of course on the Latex Companion, since the above code is part of my personal package.
>> Claus

Claus, I modified Peter Vamos's code with suggestion and it works beautifully (i.e., after I changed \usepackage{ifthenelse} to \usepackage{ifthen}).  I also added a line to put a zero in the hours < 10.

%% By Peter Vamos with contribution by Claus Gerhardt


%\  DRAFT \quad\today\ \printtime
  DRAFT  \\ {\fontsize{48}{17}\selectfont \today, \printtime}

Thank you very much.


"It is worth thinking deeply about simple things."
---Jesus De Loera, UC Davis mathematics, 12 Jan 2011

More information about the macostex-archives mailing list