Re: [NTG-context] Page numbering in latest beta

2012-04-02 Thread Steffen Fritzsche
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
 -
 



smime.p7s
Description: S/MIME cryptographic signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Page numbering in latest beta

2012-03-30 Thread Hans Hagen

On 30-3-2012 17:39, Steffen Fritzsche wrote:

Hi,

nice surprise, with the latest beta my document just grew 15 pages ;)

On a closer look, it turned out that the numbering of my body part is not reset 
to 1, instead it continues with the next number after my frontpart. Here is how 
I did set this up long time ago:


What time did you update? I fixed a side effect of some counter code 
renaming efforts.


Hans


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

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

\startsectionblockenvironment[backpart]
   \setupheader [before={\ss\switchtobodyfont[10pt]}]
   \setupheadertexts [chapter][pagenumber][pagenumber][chapter]
   \setuppagenumbering [alternative=doublesided, partnumber=no, location=, 
style={\ss\bold}]
   \setupuserpagenumber[numberconversion=numbers]
\stopsectionblockenvironment

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

Any ideas or suggestions?

Thanks in advance!

Steffen





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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___



--

-
  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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Page numbering in latest beta

2012-03-30 Thread Wolfgang Schuster

Am 30.03.2012 um 17:39 schrieb Steffen Fritzsche:

 Hi,
 
 nice surprise, with the latest beta my document just grew 15 pages ;)
 
 On a closer look, it turned out that the numbering of my body part is not 
 reset to 1, instead it continues with the next number after my frontpart. 
 Here is how I did set this up long time ago:
 
 \startsectionblockenvironment[frontpart]
  \setupheader [before={\ss\switchtobodyfont[10pt]}]

  \setupheader[style={\switchtobodyfont[ss,10pt]}]

or use

  \definefont[HeaderFont][Sans at 10pt]

in combination with

  \setupheader[style=HeaderFont]

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

The partnumber setting is now controlled by the prefix for the pagenumber.

A better value for the style key is “style=sansbold”, “style=\ss\bf” or 
“style=\ssbf”.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Page numbering in latest beta

2012-03-30 Thread 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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___