From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27679 invoked from network); 28 Nov 2023 17:21:54 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 28 Nov 2023 17:21:54 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id A12D0483B9B for ; Tue, 28 Nov 2023 18:19:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tk-1lyVWFvMA for ; Tue, 28 Nov 2023 18:19:21 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 57421483A0B for ; Tue, 28 Nov 2023 18:18:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 273DC483983 for ; Tue, 28 Nov 2023 18:17:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KLBnohNkmTLF for ; Tue, 28 Nov 2023 18:17:41 +0100 (CET) X-Greylist: delayed 464 seconds by postgrey-1.36 at cgl.ntg.nl; Tue, 28 Nov 2023 18:17:41 CET Received: from smtp-out.a16n.net (smtp-out.a16n.net [87.98.181.171]) by cgl.ntg.nl (Postfix) with ESMTP id BECD9483980 for ; Tue, 28 Nov 2023 18:17:41 +0100 (CET) Received: from server.a16n.net (ml.a16n.net [82.65.98.121]) by smtp-out.a16n.net (Postfix) with ESMTP id 157334604A1 for ; Tue, 28 Nov 2023 18:09:57 +0100 (CET) Received: from ws.localdomain (unknown [192.168.13.254]) by server.a16n.net (Postfix) with ESMTPSA id DD4D5800F68 for ; Tue, 28 Nov 2023 18:09:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n; t=1701191396; bh=20Y6gASq10ATmQGh9s8oXVsByrllLWnItYfh1JGj3/g=; h=From:To:Subject:Date; b=oxL++sV/ehmD0NNu8XsQhAG6Tx1w7UrDv8eCg6eOlxCnBwbcUcheQLXSrn3Rj8q5u CAAwyQaFGI0NU90RRZt3W8H81sFhdP5F8fSBH+ia2r1DNN5/mU7G0DSYHmIE55zE5l hQy6apU+7h7GMv4M7jhOxD8XJb4qzv4upMRpwUR5WmiVfTE/dE4nxvtCp9WCWs7LDF i9OzhO/O6oZNYYr+k1Ji+mm2/+dqJc0k8rW706LYKBwb0IQBYpHNb2sU2fpL/OKO4y ohox1pKWUBPoNsMmXPe6rcMPcz3ogfLUBPfr7sfj78bA4+l75elwvgCN8fWLH2+kyH BkbJZ65jSqphA== Received: by ws.localdomain (Postfix, from userid 1000) id C20FA20641; Tue, 28 Nov 2023 18:09:56 +0100 (CET) From: =?utf-8?Q?Peter_M=C3=BCnster?= To: ntg-context@ntg.nl Mail-Followup-To: ntg-context@ntg.nl Date: Tue, 28 Nov 2023 18:09:56 +0100 Message-ID: <87edg9dct7.fsf@a16n.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Message-ID-Hash: SMBL2J3BTSK2EUS23N6P7NOBIWXLT6OA X-Message-ID-Hash: SMBL2J3BTSK2EUS23N6P7NOBIWXLT6OA X-MailFrom: pm@a16n.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] usage of conversion in \date List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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? TIA for any help, -- 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 ___________________________________________________________________________________