From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 46F2022570 for ; Thu, 14 Nov 2024 19:24:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id DFFC54853C3 for ; Thu, 14 Nov 2024 19:23:57 +0100 (CET) Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=ntg.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntg.nl; h= content-transfer-encoding:content-type:content-type :list-unsubscribe:list-subscribe:list-post:list-owner:list-help :list-archive:archived-at:list-id:subject:subject:reply-to :precedence:content-language:in-reply-to:mime-version:user-agent :date:date:message-id:from:from:references:received:received :received:received:received:received:received; s=cgl; t= 1731608637; x=1734200638; bh=AoijoM+PyIhXpsbhBtiZum/wrvFbfr1hvxS I6zwnIQw=; b=UrKDAIf7s4DPet/bUzGcpMJ9VDeadcB4keMrfSM9Z55RDz479RL Yj3VcyUOoIM5nv+1QZ5bJyIFKnWyoOGW6uF4VKPBP6uPPkklg+HdweiwBHiabLfO bqaCOrYjAFM2aAfqIIHtK8MnQEzK9sNHOt6z0gHvxNa5xOvogn6RITJM= X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmail.com 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 IXhp8kbovjDr for ; Thu, 14 Nov 2024 19:23:57 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 4AE814851C0 for ; Thu, 14 Nov 2024 19:23:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 7B6DA485049 for ; Thu, 14 Nov 2024 19:23:10 +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 0vPbKN6yvSQT for ; Thu, 14 Nov 2024 19:23:10 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.175; helo=mail-lj1-f175.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 2DC98485047 for ; Thu, 14 Nov 2024 19:23:10 +0100 (CET) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2fb587d0436so9593931fa.2 for ; Thu, 14 Nov 2024 10:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731608589; x=1732213389; darn=ntg.nl; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=VScOdavd7GqMmM4vW+UCkjyET/fp4yoVk49WK7EMK50=; b=ZQDu9gzYNJ+p4Wk+ATTjyvmZ5K3gz2PkKmWiPb/lTH/Iui+thvjlopjK8iozefSAOg 2xyzzOF9LoHkRUg4JHYOH8FtYAIgY78r+y1mRgSbeufRr1BpZsIYte4f5+rtVyOueDYi UWPoz56nuLi1KEdkbN6buy25e+g7kDoCU2fY+qQkWRDdhXzlTxsD8BFXoLWuVYZHdzSM PsGTDo0SHwMTWzYe8B93Ieq3lMc7Iy7994FZyKnCwmh5V5SeaQeYEHHSwVNCdJAc1luO GxmvfM0ZCfUQgZosxJY5Krzw8Fe/M+5/LF0i6/kALGWIZuxuhvsucGFnU9wggfIRhKJk F1cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731608589; x=1732213389; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VScOdavd7GqMmM4vW+UCkjyET/fp4yoVk49WK7EMK50=; b=S1MU6SQvCF06DBikZ8bxQdNSo/wm4NxOkF8eLXh3Nl6JE7YNB1WhebqZjdvXZ8NKN8 YvYYfaboFA9VedornpcsaySFhWoc1aZ0b1ArE/AP2rx2Ox7zHHHyooi7wZMLISAX/DjD KlOS4IPlOA7NfrExEZAUEzD5RWzYIX8IkOEdB75kjmNBgy1i8exKW2xLvJ/41yFZgpmx QJ3FYPXCDGNlCdHXn3+EIBYFHNtkFLoOOVAFR+uEXfcrsCFaQDiCvItkwMNfXwWukxmN um4c4gUifQ6TDmhhcIqYGognmPcYm7yyPgxnMqoojIKChyFtiokL9tI8G0k/CXjT2J+S dcVA== X-Gm-Message-State: AOJu0Yy8XZhF22Hx6I5YvWlM2nOl+dm3T0ez7uhztEyxmKxyVziRK6Ei Tccs2kPFnTXWjxf+pFNjNp7yE5PLiseRvT+AqtxdlqFLS1swOv4Q X-Google-Smtp-Source: AGHT+IER2l/T3fJCxGOPrTIFfKDJffe6BiJg8ySGrJ0NAEXH99viiGubwCbX2nnKg68KmnpWpD7NZQ== X-Received: by 2002:a2e:a99f:0:b0:2fb:3d1d:dd96 with SMTP id 38308e7fff4ca-2ff606a860fmr386251fa.20.1731608588892; Thu, 14 Nov 2024 10:23:08 -0800 (PST) Received: from ?IPv6:2a02:810d:a8c0:7ec:2969:d8ad:db31:9070? ([2a02:810d:a8c0:7ec:2969:d8ad:db31:9070]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa20dc6d364sm89666066b.0.2024.11.14.10.23.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2024 10:23:08 -0800 (PST) To: mailing list for ConTeXt users , juh+ntg-context--- via ntg-context References: <8291d068-6311-422d-a6d2-eaadba2a2a9a@mailbox.org> <120fd637-7671-4252-921c-9dc08c328d77@fiee.net> <0a76a466-ba65-43a9-806f-eac63f6a882f@mailbox.org> <97c32d55-eefd-4e9c-a5ef-71e4ded75696@mailbox.org> From: Wolfgang Schuster Message-ID: Date: Thu, 14 Nov 2024 19:23:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.64 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Message-ID-Hash: 5UUV3LJK3C2SPPMBJDN2QASDD5W5WPI4 X-Message-ID-Hash: 5UUV3LJK3C2SPPMBJDN2QASDD5W5WPI4 X-MailFrom: wolfgang.schuster.lists@gmail.com 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.9 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: string.formatters 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"; format="flowed" Content-Transfer-Encoding: 7bit juh+ntg-context--- via ntg-context schrieb am 14.11.2024 um 09:18: > Am 14.11.24 um 08:59 schrieb juh+ntg-context--- via ntg-context: >> \starttext >> \startluacode >> context(string.formatters["%0.2M"](1000)) >> \stopluacode >> \stoptext >> >> Gives 10.2000,00 > > context(string.formatters["%M"](1000)) > > Gives the right result. But I am still confused. You can't specify the precision but it's possible to set the thousand separator (no idea for the rule what can be used as separator). \starttext \cldcontext{string.formatters["\letterpercent .m"](1)} \cldcontext{string.formatters["\letterpercent .m"](10)} \cldcontext{string.formatters["\letterpercent .m"](100)} \cldcontext{string.formatters["\letterpercent .m"](1000)} \cldcontext{string.formatters["\letterpercent .m"](10000)} \cldcontext{string.formatters["\letterpercent .m"](100000)} \cldcontext{string.formatters["\letterpercent .m"](1000000)} \cldcontext{string.formatters["\letterpercent .m"](10000000)} \cldcontext{string.formatters["\letterpercent .m"](100000000)} \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________