[NTG-context] \setupuserpagenumber not working as expected

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Thu Sep 3 06:19:22 CEST 2020


jbf schrieb am 03.09.2020 um 06:04:
> Am seeking to have frontmatter pages in roman numerals and from Chapter 
> 1 onwards in arabic numerals. I have achieved something of the kind, but 
> page 1 (arabic) is appearing on the last page of the frontmatter and not 
> the first page of Chapter 1. I do not know why this is happening. My 
> setup for page numbering is as follows (something I found somewhere - 
> wiki? elsewhere? Not sure. I didn't make it up!):
> 
> \definestructureconversionset[frontpart:pagenumber][][romannumerals]
> \definestructureconversionset[bodypart:pagenumber] [][numbers]
> \startsectionblockenvironment[frontpart]
> \setupuserpagenumber[numberconversion=romannumerals]
> \setuplist[chapter][pageconversionset=pagenumber]
> \setuppagenumber[number=1]
> \stopsectionblockenvironment
> 
> \startsectionblockenvironment[bodypart]
> \setuppagenumber[number=1]
> \stopsectionblockenvironment
> 
> The frontmatter is some 16 pages worth (ends on a verso page but that 
> verso carries the arabic number 1 instead of page xvi which it should 
> be, since the final paragraph on that page ends with \stopfrontmatter. 
> That means Chapter 1 (immediately after \startbodymatter) is now page 2 
> instead of page 1!
> 
> I tried a slightly simpler version of the above which I found on 
> Stackexchange:
> 
> |\definestructureconversionset[frontpart:pagenumber][][romannumerals]||
> |
> 
> |\startsectionblockenvironment[bodypart]|
> 
> |\setcounter[userpage][1]\stopsectionblockenvironment|
> 
> but it gave me the same result. Any idea how I can get the correct result?

Do you have these settings in your document?

     \setupsectionblock [frontpart] [page=]
     \setupsectionblock [bodypart]  [page=]

When this is the case change them to

     \setupsectionblock [frontpart] [page=yes]
     \setupsectionblock [bodypart]  [page=yes]

or add

     \page

before \stopfrontmatter.

Wolfgang


More information about the ntg-context mailing list