[NTG-context] Re: Setting PDF /PageLabels data (or: make PDF page labels agree with content)

2026-03-06 Thread Jim
On Fri, Mar  6, 2026 at 16:54 (+0100), Wolfgang Schuster wrote:

> Am 06.03.2026 um 03:44 schrieb Jim:
>> Hi,

>> suppose you are making a document where the frontmatter pages use Roman
>> numerals, and the rest uses Arabic numerals.

>> With suitable applications of lines like
>>   \setupuserpagenumber[numberconversion=romannumerals, number=1]
>> I can make that happen, but when looking at the frontmatter section of such
>> a PDF (with your favourite PDF viewer) the viewer reports the current page
>> with Arabic page labels, rather than Roman.

>> Is there any way to get LMTX to output something like
>>  /PageLabels << /Nums [ 0 << St 1 /S /r >>  5 << /St 1 /S /D >> ] >>
>> rather than
>>  /PageLabels
>>  <<
>>  /Nums [0
>>  <<
>>  /St 1
>>  /S /D
>>  >> 5
>>  <<
>>  /St 1
>>  /S /D
>>  >>]
>>  >>

>> (I don't care whether it is one line or many, I just want the initial /S /D
>> to be /S /r.)

> \startsectionblockenvironment[bodypart]
> \setupuserpagenumber[number=1]
> \stopsectionblockenvironment

> \defineconversionset[frontpart:pagenumber][][romannumerals]

> \starttext

> \startfrontmatter
> \dorecurse{5}{\page[dummy]}
> \stopfrontmatter

> \startbodymatter
> \dorecurse{5}{\page[dummy]}
> \stopbodymatter

> \stoptext

Wolfgang,

thanks very much, your example does just what I want.

I have the feeling I will need to study the docs for a few new (new to me)
commands.

Jim
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___


[NTG-context] Re: Setting PDF /PageLabels data (or: make PDF page labels agree with content)

2026-03-06 Thread Wolfgang Schuster

Am 06.03.2026 um 03:44 schrieb Jim:

Hi,

suppose you are making a document where the frontmatter pages use Roman
numerals, and the rest uses Arabic numerals.

With suitable applications of lines like
  \setupuserpagenumber[numberconversion=romannumerals, number=1]
I can make that happen, but when looking at the frontmatter section of such
a PDF (with your favourite PDF viewer) the viewer reports the current page
with Arabic page labels, rather than Roman.

Is there any way to get LMTX to output something like
 /PageLabels << /Nums [ 0 << St 1 /S /r >>  5 << /St 1 /S /D >> ] >>
rather than
 /PageLabels
 <<
 /Nums [0
 <<
 /St 1
 /S /D
 >> 5
 <<
 /St 1
 /S /D
 >>]
 >>

(I don't care whether it is one line or many, I just want the initial /S /D
to be /S /r.)


\startsectionblockenvironment[bodypart]
\setupuserpagenumber[number=1]
\stopsectionblockenvironment

\defineconversionset[frontpart:pagenumber][][romannumerals]

\starttext

\startfrontmatter
\dorecurse{5}{\page[dummy]}
\stopfrontmatter

\startbodymatter
\dorecurse{5}{\page[dummy]}
\stopbodymatter

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___


[NTG-context] Re: Setting PDF /PageLabels data (or: make PDF page labels agree with content)

2026-03-06 Thread Jim
On Fri, Mar  6, 2026 at 11:50 (+0100), Hans Hagen via ntg-context wrote:

> On 3/6/2026 3:44 AM, Jim wrote:
>> Hi,

>> suppose you are making a document where the frontmatter pages use Roman
>> numerals, and the rest uses Arabic numerals.

>> With suitable applications of lines like
>>   \setupuserpagenumber[numberconversion=romannumerals, number=1]
>> I can make that happen, but when looking at the frontmatter section of such
>> a PDF (with your favourite PDF viewer) the viewer reports the current page
>> with Arabic page labels, rather than Roman.

>> Is there any way to get LMTX to output something like
>>  /PageLabels << /Nums [ 0 << St 1 /S /r >>  5 << /St 1 /S /D >> ] >>
>> rather than
>>  /PageLabels
>>  <<
>>  /Nums [0
>>  <<
>>  /St 1
>>  /S /D
>>  >> 5
>>  <<
>>  /St 1
>>  /S /D
>>  >>]
>>  >>

>> (I don't care whether it is one line or many, I just want the initial /S /D
>> to be /S /r.)

> it is supposed to be controlled by the 'option' parameter in
> \setupinteractionscreen

Thanks for getting back Hans.

I tried all of the "option" values listed in
https://wiki.contextgarden.net/Command/setupinteractionscreen
(the bigger list in the autogenerated Syntax section) but no luck.

Is there an option not in the wiki I should try?
Or do I need to use something in addition to \setupinteractionscreen ?
(I tried adding \setupinteraction[state=start] but that didn't help.)

Thanks.
Jim


 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___


[NTG-context] Re: Setting PDF /PageLabels data (or: make PDF page labels agree with content)

2026-03-06 Thread Hans Hagen via ntg-context

On 3/6/2026 3:44 AM, Jim wrote:

Hi,

suppose you are making a document where the frontmatter pages use Roman
numerals, and the rest uses Arabic numerals.

With suitable applications of lines like
  \setupuserpagenumber[numberconversion=romannumerals, number=1]
I can make that happen, but when looking at the frontmatter section of such
a PDF (with your favourite PDF viewer) the viewer reports the current page
with Arabic page labels, rather than Roman.

Is there any way to get LMTX to output something like
 /PageLabels << /Nums [ 0 << St 1 /S /r >>  5 << /St 1 /S /D >> ] >>
rather than
 /PageLabels
 <<
 /Nums [0
 <<
 /St 1
 /S /D
 >> 5
 <<
 /St 1
 /S /D
 >>]
 >>

(I don't care whether it is one line or many, I just want the initial /S /D
to be /S /r.)


it is supposed to be controlled by the 'option' parameter in 
\setupinteractionscreen


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___