Preventing page break in register between reference and page number
![](https://secure.gravatar.com/avatar/4a68af71fe5327c72564458ef9d00c6b.jpg?s=120&d=mm&r=g)
Hello there, I am relatively new to ConTeXt, now typing a small book in it. I have a problem with the register (index). This is an example: |\definepapersize[MyBook][A6] \setuppapersize[MyBook][A6] % Prints on paper the size of MyBook \starttext \index{A} blub \index{B} blub \index{C} blub \index{D} blub \index{E} blub \index{F} blub \index{G} blub \index{H} blub \index{I} blub \index{J} blub \index{K} blub \index{Long Long Long} blub \index{M} blub \index{N} blub \completeindex \stoptext |The page numer of the reference "Long Long Long" is set to the next page. How to prevent this? Maybe the reference "Long Long Long" could break into two lnes or a rule like that?
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 11/9/2012 9:08 AM, "H. Özoguz" wrote:
Hello there,
I am relatively new to ConTeXt, now typing a small book in it. I have a problem with the register (index). This is an example:
|\definepapersize[MyBook][A6] \setuppapersize[MyBook][A6] % Prints on paper the size of MyBook
\starttext \index{A} blub \index{B} blub \index{C} blub \index{D} blub \index{E} blub \index{F} blub \index{G} blub \index{H} blub \index{I} blub \index{J} blub \index{K} blub \index{Long Long Long} blub \index{M} blub \index{N} blub
\completeindex \stoptext
|The page numer of the reference "Long Long Long" is set to the next page. How to prevent this? Maybe the reference "Long Long Long" could break into two lnes or a rule like that?
play with \index{Long Long Long}blub and blub\index{Long Long Long} an index entry (currently) inserts a node in the list and that one should be bound to the word Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/27c34cb91f1e92bd850fe60b3d9ef336.jpg?s=120&d=mm&r=g)
Am 09.11.2012 um 10:19 schrieb Hans Hagen
On 11/9/2012 9:08 AM, "H. Özoguz" wrote:
Hello there,
I am relatively new to ConTeXt, now typing a small book in it. I have a problem with the register (index). This is an example:
[…]
|The page numer of the reference "Long Long Long" is set to the next page. How to prevent this? Maybe the reference "Long Long Long" could break into two lnes or a rule like that?
play with
\index{Long Long Long}blub
and
blub\index{Long Long Long}
an index entry (currently) inserts a node in the list and that one should be bound to the word
The problem is not the \index command but the text in the register, as you can see in the example below the text and the page number are in separate columns (or in the long example on separate pages). \setuppapersize[A6] \starttext \index{Too long entry}Long index entry. \blank \placeindex \stoptext This is caused by this macro in strc-reg.mkiv where you insert only a normal skip between the the text and page number, changing \hskip to \nobreak\hskip moves at least a part of the last word in the entry to the next column in the example above. \unexpanded\def\registerpageseparator% todo: , configurable {\ifconditional\c_strc_registers_page_done \registerpageseparatorsymbol \else \hskip\d_strc_registers_distance\relax \settrue\c_strc_registers_page_done \fi} Wolfgang
![](https://secure.gravatar.com/avatar/4a68af71fe5327c72564458ef9d00c6b.jpg?s=120&d=mm&r=g)
Am 09.11.2012 11:05, schrieb Wolfgang Schuster:
Am 09.11.2012 um 10:19 schrieb Hans Hagen
: Hello there,
I am relatively new to ConTeXt, now typing a small book in it. I have a problem with the register (index). This is an example:
[…]
|The page numer of the reference "Long Long Long" is set to the next page. How to prevent this? Maybe the reference "Long Long Long" could break into two lnes or a rule like that?
On 11/9/2012 9:08 AM, "H. Özoguz" wrote: play with
\index{Long Long Long}blub
and
blub\index{Long Long Long}
an index entry (currently) inserts a node in the list and that one should be bound to the word The problem is not the \index command but the text in the register, as you can see in the example below the text and the page number are in separate columns (or in the long example on separate pages).
\setuppapersize[A6]
\starttext
\index{Too long entry}Long index entry.
\blank
\placeindex
\stoptext
This is caused by this macro in strc-reg.mkiv where you insert only a normal skip between the the text and page number, changing \hskip to \nobreak\hskip moves at least a part of the last word in the entry to the next column in the example above.
\unexpanded\def\registerpageseparator% todo: , configurable {\ifconditional\c_strc_registers_page_done \registerpageseparatorsymbol \else \hskip\d_strc_registers_distance\relax \settrue\c_strc_registers_page_done \fi}
Wolfgang I don't find this macro in
strc-reg.mkiv I am using current version: 2012.05.30 11:26 What do I have to change? Grüße Huseyin strc-reg.mkiv
![](https://secure.gravatar.com/avatar/386a116d129cdc597f2bb6210bbaff7a.jpg?s=120&d=mm&r=g)
On Fri, Nov 9, 2012 at 1:43 PM, "H. Özoguz"
I don't find this macro in
strc-reg.mkiv
I am using
current version: 2012.05.30 11:26
What do I have to change?
Grüße Huseyin
strc-reg.mkiv
update to the new release is an option ?
-- luigi
![](https://secure.gravatar.com/avatar/27c34cb91f1e92bd850fe60b3d9ef336.jpg?s=120&d=mm&r=g)
Am 09.11.2012 um 13:43 schrieb H. Özoguz
I don't find this macro in
strc-reg.mkiv
I am using
current version: 2012.05.30 11:26
What do I have to change?
You need the beta version but before you do this make a copy of your current version. Even then don’t try to modify the macro in the file itself because the next update changes this back to the old definition with the next update and you can never say how long this would work because it’s a internal macro which could change/disappear. Wolfgang
participants (4)
-
"H. Özoguz"
-
Hans Hagen
-
luigi scarso
-
Wolfgang Schuster