home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / text / tex / 10410 < prev    next >
Encoding:
Text File  |  1992-08-21  |  1.5 KB  |  41 lines

  1. Newsgroups: comp.text.tex
  2. Path: sparky!uunet!decwrl!access.usask.ca!kakwa.ucs.ualberta.ca!unixg.ubc.ca!reg.triumf.ca!asnd
  3. From: asnd@reg.triumf.ca (Donald Arseneau)
  4. Subject: Re: A macro for giving the current time of day.
  5. Message-ID: <22AUG199202415267@reg.triumf.ca>
  6. News-Software: VAX/VMS VNEWS 1.41    
  7. Sender: news@unixg.ubc.ca (Usenet News Maintenance)
  8. Nntp-Posting-Host: reg.triumf.ca
  9. Organization: TRIUMF: Tri-University Meson Facility
  10. References: <1676@spam.ua.oz> <dak.714391046@kaa>
  11. Date: Sat, 22 Aug 1992 09:41:00 GMT
  12. Lines: 27
  13.  
  14. In article <dak.714391046@kaa>, dak@kaa.informatik.rwth-aachen.de (David Kastrup) writes...
  15. >dfarrow@spam.ua.oz (Duncan Farrow) writes:
  16. >>Dear TeXers, here is a macro for producing the current time ...
  17.  
  18. >Corrected:
  19.  ...
  20. >% there is one backslash missing. Besides, why not
  21. >          \ifnum\time>719\chardef\a=p\else\chardef\a=p\fi %Check to see if it is pm
  22.                                                       ^
  23.    This should be "a", right? ------------------------!
  24.  
  25. >          \ifnum\hour>12\advance\hour by -12\advance\minute by -720\fi
  26. >          \number\hour:%
  27.  
  28.    Need a space:  by-720 \fi , or -720\relax\fi.
  29.    Otherwise, for hour=14, the expansion is
  30.    \advance \hour by -12\advance \minute by -7202:
  31.  
  32. >          \multiply\hour by 60 %Use is made of the integer divide here.
  33. >          \advance\minute by -\hour
  34. >          \ifnum\minute<10 0\fi\number\minute\a m\fi}
  35.  
  36. Now use \time to draw a clock face using a LaTeX {picture}.
  37.  
  38. Donald
  39.