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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31812 invoked from network); 12 Jan 2024 11:12:41 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2024 11:12:41 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 0B1F5483E4F for ; Fri, 12 Jan 2024 12:10:43 +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 oYcznltj7iYC for ; Fri, 12 Jan 2024 12:10:42 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 24BDA483DDE for ; Fri, 12 Jan 2024 12:09:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 0B28C483DD9 for ; Fri, 12 Jan 2024 12:08:56 +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 Z3_TPBEksIPY for ; Fri, 12 Jan 2024 12:08:55 +0100 (CET) Received: from mcpmr014msr.fastwebnet.it (mcpmr014msr.fastwebnet.it [85.18.95.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 A447E483DD3 for ; Fri, 12 Jan 2024 12:08:55 +0100 (CET) X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeihedgvdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfetuffvhgfguedpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomhepmhhfuceomhgrshhsihhfrhesfhgrshhtfigvsghnvghtrdhitheqnecuggftrfgrthhtvghrnhepieeltdfhkeeifedtvddvheejteeufeejjeeikeevheeiheetleelueeiieejkeeinecukfhppeelhedrvddvledruddtkedrhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurdehvdgnpdhinhgvthepleehrddvvdelrddutdekrdehtddpmhgrihhlfhhrohhmpehmrghsshhifhhrsehfrghsthifvggsnhgvthdrihhtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepnhhtghdqtghonhhtvgigthesnhhtghdrnhhl X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.52] (95.229.108.50) by mcpmr014msr.fastwebnet.it (5.8.715.01) (authenticated as massifr@fastwebnet.it) id 638481B21B71D895 for ntg-context@ntg.nl; Fri, 12 Jan 2024 12:08:55 +0100 Message-ID: Date: Fri, 12 Jan 2024 12:08:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: it-IT, en-US To: mailing list for ConTeXt users References: <4979282b-0abd-445a-a696-0ef895d20998@fastwebnet.it> <05e1164f-55d8-40fb-b191-4b587aa14ab8@fiee.net> From: mf In-Reply-To: <05e1164f-55d8-40fb-b191-4b587aa14ab8@fiee.net> Message-ID-Hash: PPGVQLAMV5FS6ZXMWL3LTKQ6IPALG7O5 X-Message-ID-Hash: PPGVQLAMV5FS6ZXMWL3LTKQ6IPALG7O5 X-MailFrom: massifr@fastwebnet.it 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] Re: conversion from realpage to pagenumber 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 Il 12/01/24 10:39, Henning Hraban Ramm ha scritto: > Am 12.01.24 um 10:18 schrieb mf: >> Hello list, >> >> how do I convert the realpage number to a page number? >> >> Suppose you have a document with a frontmatter of 20 pages in roman >> numerals, followed by the main text starting from page 1 in arabic >> numerals. >> >> So the twelfth page is 'XII', while the twenty-second is '2'. >> >> How do I get 'XII' from 12 and '2' from 22? > > try \realpagenumber > The right one would be \userpagenumber, but it works only with the current page. The code for registers does that translation -- from an arbitrary realpage of your document to the corresponding user page number, with the right formatting -- but I could not find the code that does that in strc-reg.* source files. Massi ___________________________________________________________________________________ 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 ___________________________________________________________________________________