From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112426 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context.devel,gmane.comp.tex.context Subject: Re: [NTG-context] Create an enumeration style Date: Mon, 9 Aug 2021 18:10:05 +0200 Message-ID: References: <3e22b50c-9fea-1e0d-14d3-722f08436298@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3902842957998381200==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11995"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.48 Cc: mailing list for ConTeXt users , "dev-context@ntg.nl Context" To: Fabrice Couvreur Original-X-From: dev-context-bounces@ntg.nl Mon Aug 09 18:10:19 2021 Return-path: Envelope-to: gctcd-dev-context@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD7r0-0002nL-V1 for gctcd-dev-context@m.gmane-mx.org; Mon, 09 Aug 2021 18:10:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 90FCE286493; Mon, 9 Aug 2021 18:10:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QC4vyD6zMqvz; Mon, 9 Aug 2021 18:10:08 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B6A69286387; Mon, 9 Aug 2021 18:10:08 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0514C286267; Mon, 9 Aug 2021 18:10:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wTvQKyNxGvwF; Mon, 9 Aug 2021 18:10:06 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.44; helo=mail-wr1-f44.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Original-Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 1D4B62860CF; Mon, 9 Aug 2021 18:10:06 +0200 (CEST) Original-Received: by mail-wr1-f44.google.com with SMTP id l18so22189552wrv.5; Mon, 09 Aug 2021 09:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=u2LIplU+rOVPiHkj9NnklRfDvkzrqzA39AUS4fPLfYA=; b=QdFRVHtKk2IjhRIQ+rmt8SPtWKpQNa1z1+jMNrJ0Y6H9KzzPaijCbQ+KwMCUBsRYlV PuBI2Qr2EQYaSDRmBUW7Bd22fRcVzv7GmTEDrjNSO0RQ5Sa2rVruXKW/JgcSqCvyPKjB 1kZ6h7I+lVMqSb5IYM1iILRmIX4KrgYsJZSOal311tBgnqm2Oxg7mgXnS78rzhlUSZfN oz75zKLSTyX6y63+K5Ya3zUbjW8xSafHUGXCQ+haaElBRBSl0f+/zCnTPKqNnObkCCzu ri0TkOslE3itJJgogIniPlHkAqqbpEriyJ8h/IkRkf8i2p5TSPRwThYRXITslYbq9OUH t5GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=u2LIplU+rOVPiHkj9NnklRfDvkzrqzA39AUS4fPLfYA=; b=M0maKicLoeCEt8v5hWLigvDbSfieKpjpTA2OACBDhPkZ/xUGLVgw3QzmMCYsDhQacF 39Af6Ox9Mw1akdlZo/pJyxXXxHWRpzskFeJRmuBwxzV05HBRZe6p6xFOQQ/we//VMViZ qzen6V2C3FL8rXwxU2U1SdVyBkPCrtP5OUGRhaqfsVaHpxttNQ6elyW7R4z17Ka/7Ll+ j/NzEEUc5iVj2lF/3hrm74c6rI5Ru0zXe/3+LfgYDTmhUbCFch3z+NKAANK7aTEJxJD/ KyYBATgIbmS/zOufLLLLQ+Z8oeDehH9TWcIkItIyXi/TNEQpjOrAhy3/c6RQKQrPkiKd STYA== X-Gm-Message-State: AOAM53000yhtIWXoL82saa/XeOUO/Ps/qOJjm4BF79QIRObN0C+ZtvXa IorxS40kTKZBLdxz2RhH3oQi42oNMLw= X-Google-Smtp-Source: ABdhPJy0WAowMplK0BjFhWyNNSvDsCIJd9xdgNedZ5ni/jz/84GrnzlOjqzjbjs6cVbUKUyycDseGA== X-Received: by 2002:adf:cd10:: with SMTP id w16mr26403113wrm.404.1628525405798; Mon, 09 Aug 2021 09:10:05 -0700 (PDT) Original-Received: from ?IPv6:2a02:810d:a8bf:d45c:c1d0:7f73:26a3:8220? ([2a02:810d:a8bf:d45c:c1d0:7f73:26a3:8220]) by smtp.gmail.com with ESMTPSA id m39sm20044516wms.28.2021.08.09.09.10.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Aug 2021 09:10:05 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: dev-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: "ConTeXt developers list. " List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-context-bounces@ntg.nl Original-Sender: "dev-context" Xref: news.gmane.io gmane.comp.tex.context.devel:3041 gmane.comp.tex.context:112426 Archived-At: This is a multi-part message in MIME format. --===============3902842957998381200== Content-Type: multipart/alternative; boundary="------------6FAC8665BF31CCEF7DA44A9A" Content-Language: en-US This is a multi-part message in MIME format. --------------6FAC8665BF31CCEF7DA44A9A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------6FAC8665BF31CCEF7DA44A9A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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

--------------6FAC8665BF31CCEF7DA44A9A-- --===============3902842957998381200== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZGV2LWNvbnRl eHQgbWFpbGluZyBsaXN0CmRldi1jb250ZXh0QG50Zy5ubApodHRwczovL21haWxtYW4ubnRnLm5s L21haWxtYW4vbGlzdGluZm8vZGV2LWNvbnRleHQK --===============3902842957998381200==--