
On 6/10/2025 6:54 PM, Benjamin Buchmuller wrote:
Hi Hans,
Thanks for sharing this so quickly!
I should probably wikify how to get these files compile: I first placed it in "tex/texmf-local" and ran "context --make" and "mtxrun --generate" didn't seem to do the trick for me. I also tried the same after placing the file in "tex/context/modules/mkxl" (where the "crappyspec" module resides), but although I get the "temp-new" module to load, I still get complaints about "missing number, treated as zero". Maybe the primitive is not correctly overloaded? Or (more likely) I'm not doing it right to get the mkxl file being executed. :-)
Regarding the formatting, maybe this could be constructed similarly to
\date[d=25,m=4,y=2008][weekday,month,day,{,~},year]
one could specify similarly to other parsers where "m" is reserved for "month" etc (obviously we could overload as they are associated with \date[] and not with \time[]).
But is that really needed used? Maybe overkill.
H= % hours as decimal number (0–24) I= % hours as decimal number (0–12) [not sure if needed] M= % minute as decimal number (0–59) S= % Seconds as decimal number (0–61) p % (optional) AM/PM indicator in the locale; used in conjunction with I and not with H u % (optional) unit for durations
For time there's always the lua one (we could pass that one)
so
\time[H=16,M=32][hour,{:},minute] % 16:32
\time[H=16,M=32][hour,{:},minute,{ },indicator] % 4:32 pm
let's go step by step ...
and one could "hijack" the command for durations as well (with some overloading similar to "m", "MONTH", "mm", "month" etc.)
\time[M=3,S=30,u=minute][MM,{:},SS,{ },unit] % 04:32 min
(Unit would take abbreviation from the units module, ideally.)
Then
\setuplangauge[en][time={HH, :, MM, :, p}]
Just a couple of thoughts though. Thank you for all your help!
That is something to coordinate with Tomas Hala, as he has students from all over the world who provide language specific info. SOmethign we can discuss at the meeting. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------