Re: [NTG-context] Page numbering in latest beta
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 -----------------------------------------------------------------
Hi, thanks for these suggestions. I now use the following settings: \definefont[HeaderFont][Sans at 10pt] \setupheader[style=HeaderFont] \setupheadertexts [section][pagenumber][pagenumber][chapter] \setuppagenumbering [alternative=doublesided, location=, style=sansbold] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals, way=byblock] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupuserpagenumber[numberconversion=numbers] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[backpart] \setupuserpagenumber[numberconversion=numbers] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setupuserpagenumber[numberconversion=numbers] \stopsectionblockenvironment which give me a frontpart with roman numerals starting with i, and a bodypart starting with 1. The pagenumber for the backpart and appendix is continued. This is not the case if I make "way=byblock" a default setting. Thanks again! Steffen Am 30.03.2012 um 20:06 schrieb Hans Hagen:
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Steffen Fritzsche