ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Dotted leader in index entries
@ 2010-11-06 11:12 Duncan Hothersall
  2010-11-06 16:05 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Duncan Hothersall @ 2010-11-06 11:12 UTC (permalink / raw)
  To: ntg-context

  [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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Dotted leader in index entries
  2010-11-06 11:12 Dotted leader in index entries Duncan Hothersall
@ 2010-11-06 16:05 ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2010-11-06 16:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Dotted leader in index entries
@ 2010-11-11 10:34 Duncan Hothersall
  0 siblings, 0 replies; 4+ messages in thread
From: Duncan Hothersall @ 2010-11-11 10:34 UTC (permalink / raw)
  To: ntg-context

[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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Dotted leader in index entries
@ 2010-11-04 10:08 Duncan Hothersall
  0 siblings, 0 replies; 4+ messages in thread
From: Duncan Hothersall @ 2010-11-04 10:08 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/html, Size: 1567 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-11 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-06 11:12 Dotted leader in index entries Duncan Hothersall
2010-11-06 16:05 ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2010-11-11 10:34 Duncan Hothersall
2010-11-04 10:08 Duncan Hothersall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).