Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
> This would be a solution: > > Index term, and some > text > 21, 34, 45, 72, 89, >101, 103, 109 > > where the rule is: when the numbers exceed the text width, close the > paragraph, then start a new, right aligned one. > > So i wrote this: > >

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
\wordright is ok until the numbers don't exceed the text width. It manages these two cases right: Index term, and some text 21, 34, 45, 72 Index term, and some text 21, 34, 45, 72, 89 When the numbers exceed the text width, it fails: Index term, and some text 21, 34, 45, 72, 89, 101, 103,

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread Hans Hagen
On 5/10/2018 12:35 PM, MF wrote: This is a more polite version, that lets you restore the original macros. \let\origstartregisterpages=\startregisterpages% \let\origstopregisterpages=\stopregisterpages% \def\setupregisterpagescommand#1{%

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread Wolfgang Schuster
The following solution which adds two additional keys (pageleft and pageright) is cleaner because it doesn’t have to overload commands. \unprotect \unexpanded\def\startregisterpages {\begingroup \dostarttagged\t!registerpages\empty \useregisterstyleandcolor\c!pagestyle\c!pagecolor

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
This is a more polite version, that lets you restore the original macros. \let\origstartregisterpages=\startregisterpages% \let\origstopregisterpages=\stopregisterpages% \def\setupregisterpagescommand#1{% \unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
Thanks Wolfgang and sorry if i reply to my mail, since i've downloaded yours on another PC. I've found these macros in strc-reg.mkiv, that are called right before and after the page numbers: \unexpanded\def\startregisterpages {\begingroup \dostarttagged\t!registerpages\empty

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-09 Thread Wolfgang Schuster
There is no option to apply a command to all page numbers but you can add something after the register entry with the textcommand key. Be aware this solution isn’t perfect because in the worst case (narrow columns for the register or long entries) page numbers can be split on multiple lines.

[NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-09 Thread MF
Hello list, i'd like moving the page numbers in my index to the right, with a \wordright. \setupregister[index][n=1,alternative=A] \starttext \CONTEXT\index{\ConTeXt} \page \LATEX\index{\LaTeX} \page \CONTEXT\index{\ConTeXt} \page \placeindex \stoptext The index is at page 4. I want to move the