[NTG-context] Page numbering in latest beta

Hans Hagen pragma at wxs.nl
Fri Mar 30 20:06:43 CEST 2012


On 30-3-2012 18:41, Steffen Fritzsche wrote:
> Hi Hans,
>
> I just ran my update script again, the issue still exists. Last update before was this morning around 10 a.m. CEST.

>>> Any ideas or suggestions?

The old numbering code had a side effect. Every time one changes 
settings the state of the counters needs to be synchronized and in fact 
a reset happened. Now, normally this is no big deal, as one sets up 
things at the beginning of a document. However, when mid document one 
wants to change the style, this reset becomes annoying. (The linenote 
bug reported a few days ago was a side effect of this.)

So, now we don't reset any longer unless the 'start' key's value 
differs. As a consequence one needs to be explicit in some cases, like 
yours. By default, we number per text (we could change that if needed) 
but in the past the \setupuserpagenumber triggers a synchronization of 
the counter and therefore reset the number, so that obscured the fact. 
Now, you just need to set the 'way':

\starttext

\setupuserpagenumber[way=byblock] % can be default .... yes/no?

\setuppagenumbering [alternative=doublesided, partnumber=no, location=, 
style={\ss\bold}]
\setupheadertexts [section][pagenumber][pagenumber][chapter]
\setupheader [before={\ss\switchtobodyfont[10pt]}]

\startsectionblockenvironment[frontpart]
     \setupuserpagenumber[numberconversion=romannumerals]
\stopsectionblockenvironment

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

\startsectionblockenvironment[backpart]
     \setupuserpagenumber[numberconversion=numbers]
\stopsectionblockenvironment

\startsectionblockenvironment[appendix]
     \setupuserpagenumber[numberconversion=numbers]
\stopsectionblockenvironment

\startfrontmatter test \stopfrontmatter
\startbodymatter  test \stopbodymatter
\startappendices  test \stopappendices
\startbackmatter  test \stopbackmatter

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list