From: mf <massifr@fastwebnet.it>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: conversion from realpage to pagenumber
Date: Fri, 12 Jan 2024 12:08:55 +0100 [thread overview]
Message-ID: <c9e21cf3-7881-401a-bc6b-8fa8846cdde2@fastwebnet.it> (raw)
In-Reply-To: <05e1164f-55d8-40fb-b191-4b587aa14ab8@fiee.net>
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
___________________________________________________________________________________
prev parent reply other threads:[~2024-01-12 11:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 9:18 [NTG-context] " mf
2024-01-12 11:02 ` [NTG-context] " Wolfgang Schuster
2024-01-14 14:18 ` mf
[not found] ` <05e1164f-55d8-40fb-b191-4b587aa14ab8@fiee.net>
2024-01-12 11:08 ` mf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9e21cf3-7881-401a-bc6b-8fa8846cdde2@fastwebnet.it \
--to=massifr@fastwebnet.it \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).