[NTG-context] superscripts "th" "nd" "rd" "st" on dates etc..

Hans Hagen pragma at wxs.nl
Thu Aug 27 22:10:51 CEST 2015


On 8/27/2015 1:21 AM, Wolfgang Schuster wrote:
>> Mojca Miklavec <mailto:mojca.miklavec.lists at gmail.com>
>> 26. August 2015 19:36
>>
>> In case that you were looking for an automated way to print the date,
>> here's one option:
>> \setuplanguage[en][date={weekday,{, },day:ord,{~},month,{,~},year}]
>> (And the documentation is somewhat wrong, I think it suggests to use
>> "day+" which doesn't work. But I should check the details again.)
> The keyword to create ordinal numbers in a date has changed in MkIV.
>> Unfortunately I didn't manage to figure out how to do the superscript
>> automatically. Yes, it's 1\highordinalstr{st} like Alan mentioned, but
>> that only works in "manual mode".

core-con.lua : 1275 :

 
context.highordinalstr(converters.ordinal(whatordinal,currentlanguage))


> You can’t show them as superscript when you use the \date command
> but in manual mode you can also use \ordinaldaynumber.
>
> \starttext
> \dorecurse{10}{\ordinaldaynumber{\recurselevel}\crlf}
> \stoptext
>
> Wolfgang
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list