[NTG-context] Dotted leader in index entries

2010-11-11 Thread Duncan Hothersall

[Now with a proper example!]

Hello all.

I'm using Mk II. I need to set up dotted leaders between an index entry 
and its page number as show in this runnable sample:


\def\Icmd#1{#1\dotfill}
\setupregister[index][n=2,textcommand=\Icmd,distance=1em,alternative=A]
\starttext
\index{Example+This index entry doesn't quite work}\index{This is 
okay}\index{Example+This is okay}\index{This index entry is not correct 
at all}\index{Example+This is another example in which the leaders don't 
work cos of wrapping}A little text.\par

\placeindex
\stoptext

When the entry text is just long enough to fill up the horizontal space 
it is pushing the number over onto the next line. What I really need is 
for all page numbers to be at the right hand side, with leading dots. So 
I'd like a solution to produce either this:


Long index entry text
  123

or this:

Long index entry
  text..123

At the moment I'm putting forced line breaks before the last word to 
achieve what I need, but I would really like to automate this!


Thanks for any help, hope the issue is clear.

Duncan

___
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] Dotted leader in index entries

2010-11-06 Thread Wolfgang Schuster

Am 06.11.2010 um 12:12 schrieb Duncan Hothersall:

> [Reposting because I think my last message got mangled.]

Your message came through but there was no example from you!

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
___


[NTG-context] Dotted leader in index entries

2010-11-06 Thread Duncan Hothersall

 [Reposting because I think my last message got mangled.]

Hello all.

I'm using Mk II. When I use the following setup to get dotted leaders 
between an index entry and its page number:


\def\MyIndexTextCmd#1{#1\dotfill}
\setupregister[Index][n=2,textcommand=\MyIndexTextCmd,distance=1em,alternative=A]

it works okay producing output like this:

Index entry.123

except when the entry text is just long enough to fill up the horizontal 
space, pushing the number over onto the next line. What I get in that 
scenario is this:


Index entry text...
  123

This is no good. What I really need is for all page numbers to be at the 
right hand side, with leading dots. So I'd like a solution to produce 
either this:


Index entry text...
  123

or preferably this:

Index entry
  text..123

At the moment I'm putting forced line breaks before the last word to 
achieve what I need, but I would really like to automate this!


Thanks for any help, hope the issue is clear.

Duncan

___
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
___


[NTG-context] Dotted leader in index entries

2010-11-04 Thread Duncan Hothersall


  
  
Hello all.

[Using Mk II.]

I need to produce an index which looks like this:

Mainentry
     Subentry.3
     Slightly longer
    subentry..5
     See also X

I have the following setup:

\def\MyIndexTextCmd#1{#1\dotfill}
\setupregister[Index][n=2,textcommand=\MyIndexTextCmd,distance=1em,alternative=A]

which gives me something like:

Mainentry
     Subentry.3
     Slightly longer subentry..

    5
     See also X

I can work around the problem of the "See also X" line by adding an
\hfilll to avoid the generation of dots. But I really need all
pagenumbers to be at the right hand side, and not allow them to
break over to the left like in the second example.

At the moment I'm putting forced line breaks before the last word to
achieve what I need, but I would really like to automate this!

Thanks for any help, hope the issue is clear.

Duncan
  

___
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
___