ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Create an enumeration style
@ 2021-08-08 15:47 Fabrice Couvreur via ntg-context
  2021-08-08 19:29 ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 12+ messages in thread
From: Fabrice Couvreur via ntg-context @ 2021-08-08 15:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Fabrice Couvreur


[-- Attachment #1.1: Type: text/plain, Size: 137 bytes --]

Hello,
Is it possible to create an enumeration style to get this :
1 ^ {er} exemple
2 ^ {e}  exemple
3 ^ {e} exemple ....
Thanks
Fabrice

[-- Attachment #1.2: Type: text/html, Size: 1921 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-08 15:47 Create an enumeration style Fabrice Couvreur via ntg-context
@ 2021-08-08 19:29 ` Wolfgang Schuster via ntg-context
       [not found]   ` <CACyK-epjgPwOitRnz1uWNmaTWoD-g_LXhV=EfgcOQnuH4HT9NA@mail.gmail.com>
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-08-08 19:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster


[-- Attachment #1.1: Type: text/plain, Size: 502 bytes --]

Fabrice Couvreur via ntg-context schrieb am 08.08.2021 um 17:47:
> Hello,
> Is it possible to create an enumeration style to get this :
> 1 ^ {er} exemple
> 2 ^ {e} exemple
> 3 ^ {e} exemple....

The conversion needs a fix but this is how you can do it.

\defineenumeration
   [test]
   [text=,
    numbercommand=\groupedcommand{}{~exemple},
    numberconversion=ordinal]

\mainlanguage [fr]

\starttext

\starttest
\input knuth
\stoptest

\starttest
\input knuth
\stoptest

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 2400 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [NTG-context] Create an enumeration style
       [not found]   ` <CACyK-epjgPwOitRnz1uWNmaTWoD-g_LXhV=EfgcOQnuH4HT9NA@mail.gmail.com>
@ 2021-08-09 16:10     ` Wolfgang Schuster
  2021-08-11  8:09       ` Otared Kavian via ntg-context
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2021-08-09 16:10 UTC (permalink / raw)
  To: Fabrice Couvreur
  Cc: mailing list for ConTeXt users, dev-context@ntg.nl Context


[-- Attachment #1.1: Type: text/plain, Size: 919 bytes --]

Fabrice Couvreur schrieb am 09.08.2021 um 14:16:
> Hi Wolfgang,
> Thank you for your suggestion.
> I tested the code and the result is not what I expected from the 
> second item : "2 exemple" instead of "2^{e} exemple", "3 exemple" 
> instead of "3^{e} exemple" ...

core-con.lua (line 1155):

local ordinals = {
     [...]
     french = function(n)
         if n == 1 then
             return "er"
+       else
+           return "e"
         end
     end,
}


> Then I tried to use the key alternative = serried but without success.

This works for me:

\defineenumeration
   [test]
   [text=,
    alternative=serried,
    width=fit,
    distance=.5em,
    numbercommand=\groupedcommand{}{~exemple},
    numberconversion=ordinal]

\mainlanguage [fr]

\starttext

\starttest
\input knuth
\stoptest

\starttest
\input knuth
\stoptest

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 2588 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

_______________________________________________
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-09 16:10     ` [NTG-context] " Wolfgang Schuster
@ 2021-08-11  8:09       ` Otared Kavian via ntg-context
  2021-08-11  8:19         ` Thomas A. Schmitz via ntg-context
  2021-08-11  8:23         ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 12+ messages in thread
From: Otared Kavian via ntg-context @ 2021-08-11  8:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Otared Kavian



> On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> wrote:
> (…)
> core-con.lua (line 1155):
> 
> local ordinals = {
>     [...]
>     french = function(n)
>         if n == 1 then
>             return "er"
> +       else
> +           return "e"
>         end
>     end,
> }

Hi Wolfgang,

Thanks for the example and the fix, but I would rather think that the « french » part of ordinals should be

	french = function(n)
		if n == 1 then
			return « er"
		else
			 return « ème"
		end
	end,

Now if this were not accepted as a fix in core-con.lua, is there a way for a user to change the default to the above choice in his document ?

Best regards: Otared
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-11  8:09       ` Otared Kavian via ntg-context
@ 2021-08-11  8:19         ` Thomas A. Schmitz via ntg-context
  2021-08-11 11:55           ` Otared Kavian via ntg-context
  2021-08-11  8:23         ` Hans Hagen via ntg-context
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas A. Schmitz via ntg-context @ 2021-08-11  8:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz


> On 11. Aug 2021, at 10:09, Otared Kavian via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Thanks for the example and the fix, but I would rather think that the « french » part of ordinals should be
> 
> 	french = function(n)
> 		if n == 1 then
> 			return « er"
> 		else
> 			 return « ème"
> 		end
> 	end,

Except if you have something like “1ère image”… Ah, languages are so messy (no pun with recent events in Paris intended).

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-11  8:09       ` Otared Kavian via ntg-context
  2021-08-11  8:19         ` Thomas A. Schmitz via ntg-context
@ 2021-08-11  8:23         ` Hans Hagen via ntg-context
  2021-08-11 10:41           ` Fabrice Couvreur via ntg-context
  2021-08-27  9:26           ` Vincent Hennebert via ntg-context
  1 sibling, 2 replies; 12+ messages in thread
From: Hans Hagen via ntg-context @ 2021-08-11  8:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen, Otared Kavian

On 8/11/2021 10:09 AM, Otared Kavian via ntg-context wrote:
> 
> 
>> On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> wrote:
>> (…)
>> core-con.lua (line 1155):
>>
>> local ordinals = {
>>      [...]
>>      french = function(n)
>>          if n == 1 then
>>              return "er"
>> +       else
>> +           return "e"
>>          end
>>      end,
>> }
> 
> Hi Wolfgang,
> 
> Thanks for the example and the fix, but I would rather think that the « french » part of ordinals should be
> 
> 	french = function(n)
> 		if n == 1 then
> 			return « er"
> 		else
> 			 return « ème"
> 		end
> 	end,
> 
> Now if this were not accepted as a fix in core-con.lua, is there a way for a user to change the default to the above choice in his document ?

it is no problem to fix if you all can agree on what/how to fix ...

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-11  8:23         ` Hans Hagen via ntg-context
@ 2021-08-11 10:41           ` Fabrice Couvreur via ntg-context
  2021-08-11 10:57             ` Fabrice Couvreur via ntg-context
  2021-08-27  9:26           ` Vincent Hennebert via ntg-context
  1 sibling, 1 reply; 12+ messages in thread
From: Fabrice Couvreur via ntg-context @ 2021-08-11 10:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Fabrice Couvreur


[-- Attachment #1.1: Type: text/plain, Size: 2069 bytes --]

Hi Wolfgang,
Many thanks
Fabrice

Le mer. 11 août 2021 à 10:23, Hans Hagen via ntg-context <ntg-context@ntg.nl>
a écrit :

> On 8/11/2021 10:09 AM, Otared Kavian via ntg-context wrote:
> >
> >
> >> On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context <
> ntg-context@ntg.nl> wrote:
> >> (…)
> >> core-con.lua (line 1155):
> >>
> >> local ordinals = {
> >>      [...]
> >>      french = function(n)
> >>          if n == 1 then
> >>              return "er"
> >> +       else
> >> +           return "e"
> >>          end
> >>      end,
> >> }
> >
> > Hi Wolfgang,
> >
> > Thanks for the example and the fix, but I would rather think that the «
> french » part of ordinals should be
> >
> >       french = function(n)
> >               if n == 1 then
> >                       return « er"
> >               else
> >                        return « ème"
> >               end
> >       end,
> >
> > Now if this were not accepted as a fix in core-con.lua, is there a way
> for a user to change the default to the above choice in his document ?
>
> it is no problem to fix if you all can agree on what/how to fix ...
>
> 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
> -----------------------------------------------------------------
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3610 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-11 10:41           ` Fabrice Couvreur via ntg-context
@ 2021-08-11 10:57             ` Fabrice Couvreur via ntg-context
  2021-08-13 10:41               ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 12+ messages in thread
From: Fabrice Couvreur via ntg-context @ 2021-08-11 10:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Fabrice Couvreur


[-- Attachment #1.1: Type: text/plain, Size: 2331 bytes --]

I forgot this : how to reduce the font size for the exponents "er", "e" ?
Thanks
Fabrice

Le mer. 11 août 2021 à 12:41, Fabrice Couvreur <fabrice1.couvreur@gmail.com>
a écrit :

> Hi Wolfgang,
> Many thanks
> Fabrice
>
> Le mer. 11 août 2021 à 10:23, Hans Hagen via ntg-context <
> ntg-context@ntg.nl> a écrit :
>
>> On 8/11/2021 10:09 AM, Otared Kavian via ntg-context wrote:
>> >
>> >
>> >> On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context <
>> ntg-context@ntg.nl> wrote:
>> >> (…)
>> >> core-con.lua (line 1155):
>> >>
>> >> local ordinals = {
>> >>      [...]
>> >>      french = function(n)
>> >>          if n == 1 then
>> >>              return "er"
>> >> +       else
>> >> +           return "e"
>> >>          end
>> >>      end,
>> >> }
>> >
>> > Hi Wolfgang,
>> >
>> > Thanks for the example and the fix, but I would rather think that the «
>> french » part of ordinals should be
>> >
>> >       french = function(n)
>> >               if n == 1 then
>> >                       return « er"
>> >               else
>> >                        return « ème"
>> >               end
>> >       end,
>> >
>> > Now if this were not accepted as a fix in core-con.lua, is there a way
>> for a user to change the default to the above choice in his document ?
>>
>> it is no problem to fix if you all can agree on what/how to fix ...
>>
>> 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
>> -----------------------------------------------------------------
>>
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>>
>> ___________________________________________________________________________________
>>
>

[-- Attachment #1.2: Type: text/html, Size: 4645 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-11  8:19         ` Thomas A. Schmitz via ntg-context
@ 2021-08-11 11:55           ` Otared Kavian via ntg-context
  0 siblings, 0 replies; 12+ messages in thread
From: Otared Kavian via ntg-context @ 2021-08-11 11:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Otared Kavian

> On 11 Aug 2021, at 10:19, Thomas A. Schmitz via ntg-context <ntg-context@ntg.nl> wrote:
> 
> 
>> On 11. Aug 2021, at 10:09, Otared Kavian via ntg-context <ntg-context@ntg.nl> wrote:
>> 
>> Thanks for the example and the fix, but I would rather think that the « french » part of ordinals should be
>> 
>> 	french = function(n)
>> 		if n == 1 then
>> 			return « er"
>> 		else
>> 			 return « ème"
>> 		end
>> 	end,
> 
> Except if you have something like “1ère image”… Ah, languages are so messy (no pun with recent events in Paris intended).
> 
> Thomas

Sure… But then maybe it is possible to define one’s own « ordinals.french » for messy cases :-) 
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-11 10:57             ` Fabrice Couvreur via ntg-context
@ 2021-08-13 10:41               ` Wolfgang Schuster via ntg-context
  0 siblings, 0 replies; 12+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-08-13 10:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster


[-- Attachment #1.1: Type: text/plain, Size: 299 bytes --]

Fabrice Couvreur via ntg-context schrieb am 11.08.2021 um 12:57:
> I forgot this : how to reduce the font size for the exponents "er", "e" ?

The exponents are placed with \high and you can change the style with

     \setuphigh[style=...]

but this affects all texts which use \high.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-11  8:23         ` Hans Hagen via ntg-context
  2021-08-11 10:41           ` Fabrice Couvreur via ntg-context
@ 2021-08-27  9:26           ` Vincent Hennebert via ntg-context
  2021-08-27 15:10             ` Rudolf Bahr via ntg-context
  1 sibling, 1 reply; 12+ messages in thread
From: Vincent Hennebert via ntg-context @ 2021-08-27  9:26 UTC (permalink / raw)
  To: ntg-context; +Cc: Vincent Hennebert

On Wed, 2021-08-11 at 10:23 +0200, Hans Hagen via ntg-context wrote:
> On 8/11/2021 10:09 AM, Otared Kavian via ntg-context wrote:
> > 
> > 
> > > On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context <ntg-
> > > context@ntg.nl> wrote:
> > > (…)
> > > core-con.lua (line 1155):
> > > 
> > > local ordinals = {
> > >      [...]
> > >      french = function(n)
> > >          if n == 1 then
> > >              return "er"
> > > +       else
> > > +           return "e"
> > >          end
> > >      end,
> > > }
> > 
> > Hi Wolfgang,
> > 
> > Thanks for the example and the fix, but I would rather think that the
> > « french » part of ordinals should be
> > 
> >         french = function(n)
> >                 if n == 1 then
> >                         return « er"
> >                 else
> >                          return « ème"
> >                 end
> >         end,
> > 
> > Now if this were not accepted as a fix in core-con.lua, is there a
> > way for a user to change the default to the above choice in his
> > document ?
> 
> it is no problem to fix if you all can agree on what/how to fix ...

The purpose of abbreviations is, well, to abbreviate. Even though ‘ème’
is seen a lot, it’s wrong because it’s too long. Source (pretty
official):
https://www.academie-francaise.fr/abreviations-des-adjectifs-numeraux

So for numbers starting from 3 the proper abbreviation is ‘e’.

For 1 and 2 it’s more complicated, however, as it depends on the
gender. For 1:
* masculine: 1er
* feminine: 1re

In addition for 2, and when the enumeration contains only 2 elements,
there is the option to use the older word ‘second(e)’:
* masculine: 2d
* feminine: 2de

For 3 elements and above, we always use the newer word ‘deuxième’,
which is abbreviated in the form of the generic ‘e’.

While that rule is optional, people who use tools like ConTeXt are
likely to pay attention to that kind of details and will probably want
to use it.

Finally, we have to add an ‘s’ to all the abbreviations if the plural
is needed (the 1st (1ers) elements, the 2nd (2ds or 2es) elements,
etc., vs the 1st (1er) element, 2nd (2d or 2e) element…).

Now, can all those subtleties be coded in a function? :)

Vincent


> 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
> -----------------------------------------------------------------
> _______________________________________________________________________
> ____________
> If your question is of interest to others as well, please add an entry
> to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> _______________________________________________________________________
> ____________


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Create an enumeration style
  2021-08-27  9:26           ` Vincent Hennebert via ntg-context
@ 2021-08-27 15:10             ` Rudolf Bahr via ntg-context
  0 siblings, 0 replies; 12+ messages in thread
From: Rudolf Bahr via ntg-context @ 2021-08-27 15:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Rudolf Bahr

On Fri, Aug 27, 2021 at 11:26:47AM +0200, Vincent Hennebert via ntg-context wrote:
> On Wed, 2021-08-11 at 10:23 +0200, Hans Hagen via ntg-context wrote:
> > On 8/11/2021 10:09 AM, Otared Kavian via ntg-context wrote:
> > > 
> > > 
> > > > On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context <ntg-
> > > > context@ntg.nl> wrote:
> > > > (…)
> > > > core-con.lua (line 1155):
> > > > 
> > > > local ordinals = {
> > > >      [...]
> > > >      french = function(n)
> > > >          if n == 1 then
> > > >              return "er"
> > > > +       else
> > > > +           return "e"
> > > >          end
> > > >      end,
> > > > }
> > > 
> > > Hi Wolfgang,
> > > 
> > > Thanks for the example and the fix, but I would rather think that the
> > > « french » part of ordinals should be
> > > 
> > >         french = function(n)
> > >                 if n == 1 then
> > >                         return « er"
> > >                 else
> > >                          return « ème"
> > >                 end
> > >         end,
> > > 
> > > Now if this were not accepted as a fix in core-con.lua, is there a
> > > way for a user to change the default to the above choice in his
> > > document ?
> > 
> > it is no problem to fix if you all can agree on what/how to fix ...
> 
> The purpose of abbreviations is, well, to abbreviate. Even though ‘ème’
> is seen a lot, it’s wrong because it’s too long. Source (pretty
> official):
> https://www.academie-francaise.fr/abreviations-des-adjectifs-numeraux
> 
> So for numbers starting from 3 the proper abbreviation is ‘e’.
> 
> For 1 and 2 it’s more complicated, however, as it depends on the
> gender. For 1:
> * masculine: 1er
> * feminine: 1re
> 
> In addition for 2, and when the enumeration contains only 2 elements,
> there is the option to use the older word ‘second(e)’:
> * masculine: 2d
> * feminine: 2de
> 
> For 3 elements and above, we always use the newer word ‘deuxième’,
> which is abbreviated in the form of the generic ‘e’.
> 
> While that rule is optional, people who use tools like ConTeXt are
> likely to pay attention to that kind of details and will probably want
> to use it.
> 
> Finally, we have to add an ‘s’ to all the abbreviations if the plural
> is needed (the 1st (1ers) elements, the 2nd (2ds or 2es) elements,
> etc., vs the 1st (1er) element, 2nd (2d or 2e) element…).
> 
> Now, can all those subtleties be coded in a function? :)
> 
> Vincent

Bravo! Comme un professeur!

Best wishes, Rudolf

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-08-27 15:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-08 15:47 Create an enumeration style Fabrice Couvreur via ntg-context
2021-08-08 19:29 ` Wolfgang Schuster via ntg-context
     [not found]   ` <CACyK-epjgPwOitRnz1uWNmaTWoD-g_LXhV=EfgcOQnuH4HT9NA@mail.gmail.com>
2021-08-09 16:10     ` [NTG-context] " Wolfgang Schuster
2021-08-11  8:09       ` Otared Kavian via ntg-context
2021-08-11  8:19         ` Thomas A. Schmitz via ntg-context
2021-08-11 11:55           ` Otared Kavian via ntg-context
2021-08-11  8:23         ` Hans Hagen via ntg-context
2021-08-11 10:41           ` Fabrice Couvreur via ntg-context
2021-08-11 10:57             ` Fabrice Couvreur via ntg-context
2021-08-13 10:41               ` Wolfgang Schuster via ntg-context
2021-08-27  9:26           ` Vincent Hennebert via ntg-context
2021-08-27 15:10             ` Rudolf Bahr via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).