[NTG-context] Re: usage of conversion in \date

2023-12-18 Thread Peter Münster
On Wed, Nov 29 2023, Peter Münster wrote:

> According to https://wiki.contextgarden.net/Command/date:
> "The name suffixes indicate number conversions. Any conversion, either
>  built-in or defined by \defineconversion, can be used there."
>
> But it does not seem to work...

Hi,

Should I add this to the bug-tracker?  If yes, where please?
It seems, that tracker.luatex.org is no more used.

TIA,
-- 
   Peter
___
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
___


[NTG-context] Re: usage of conversion in \date

2023-11-29 Thread Peter Münster
On Wed, Nov 29 2023, Hans Hagen wrote:

> \setuplanguage[fr][date={day:++,\ ,month,\ ,year}]

Unfortunately this does not work as I need. Only the "1" should be
converted to 1er, not the other numbers.

French is a bit special:
You say "le premier novembre" but not "le un novembre".
You say "le deux novembre" but not "le deuxième novembre".

According to https://wiki.contextgarden.net/Command/date:
"The name suffixes indicate number conversions. Any conversion, either
 built-in or defined by \defineconversion, can be used there."

But it does not seem to work...

-- 
   Peter
___
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
___


[NTG-context] Re: usage of conversion in \date

2023-11-29 Thread Hans Hagen

On 11/28/2023 6:09 PM, Peter Münster wrote:

Hi,

When printing a date in French, I would like to convert the "1" to
"1\ier", but it does not work as I expect:

--8<---cut here---start->8---
\startluacode
-- from https://wiki.contextgarden.net/Command/defineconversion:
interfaces.implement {
 name  = "FRdate",
 public= true,
 arguments = "string",
 actions   =
 function(s)
 local n = tonumber(s)
 if n == 1 then
 context"1\\ier"
 else
 context(s)
 end
 end
}
\stopluacode
\def\ier{\highordinalstr{er}}
\mainlanguage[fr]
\defineconversion[frd][\FRdate]
\setuplanguage[fr][date={day:frd,\ ,month,\ ,year}]
\starttext
Conversion: \convertnumber{frd}{1}, \convertnumber{frd}{2} (OK)\\
Dates: \date[d=1], \date[d=2] (not OK)
\stoptext
--8<---cut here---end--->8---

How could I get "1\ier\ novembre 2023" please?

\mainlanguage[fr]

\setuplanguage[fr][date={day:++,\ ,month,\ ,year}]

\starttext
Dates: \date[d=1], \date[d=2] (not OK)
\stoptext




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

___
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
___