Pablo Rodriguez via ntg-context schrieb am 06.12.2024 um 12:35:
Dear list,
I would like to get the current month in Roman numerals (just now, it
would be XII for December).
The best I get is:
\currentdate[\cldcontext{converters['R']
(tonumber(os.date("\letterpercent m", os.date(os.time()))))}]
This strikes me as too complex (even for someone who cannot code).
Is there now simpler way to write that?
The \date (and \currentdate) command supports number conversion for the
day and year values but not the month.
\starttext
\currentdate[d:R,space,space,y:R]
\stoptext
The simplest method is to use \convertnumber in combination with
\normalmonth etc. which holds the value for the current month etc.
\starttext
\convertnumber{R}{\normalday }\textslash
\convertnumber{R}{\normalmonth}\textslash
\convertnumber{R}{\normalyear }
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________