ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "honyk" <j.tosovsky@email.cz>
To: "'mailing list for ConTeXt users'" <ntg-context@ntg.nl>
Subject: Re: Index - ranges
Date: Fri, 15 Nov 2013 18:32:52 +0100	[thread overview]
Message-ID: <30066.9821248905$1384536794@news.gmane.org> (raw)
In-Reply-To: <008c01cee201$4a65bff0$df313fd0$@tosovsky@email.cz>

On 2013-11-15 honyk wrote:
> On 2013-11-12 honyk wrote:
> > On 2013-11-07 honyk wrote:
> > >
> > > 1) when a range for my subject index entry is specified and the
> > > text between doesn't overflow to the next page, even in this case
> > > the range of pages 1-1 is created. Is there any option to normalize
> > > it to a single page number?
> > >
> > > \startregister[index][range_01]{primary}
> > > Dummy text.
> > > \stopregister[index][range_01]

I've finally found it is caused by this logic:

if first == last then
  if first.references.lastrealpage then
     -- IMHO this could be optional
     pagerange(first,first,true,prefixspec,pagespec)
  else
     pagenumber(first,prefixspec,pagespec)
  end
elseif last.references.lastrealpage then
  pagerange(first,last,true,prefixspec,pagespec)
else
  pagerange(first,last,false,prefixspec,pagespec)
end

Even after normalization, if there is a range, it is preserved regardless it
spans multiple pages or not. The fix is quite easy. But whether to convert
these single page ranges into a single value or not could be optional, or
applied according to the compress parameter (both 'yes' and 'all' would
collapse the range).

Jan

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


  parent reply	other threads:[~2013-11-15 17:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <007801cedc04$43767660$ca636320$@tosovsky@email.cz>
2013-11-08 19:53 ` honyk
2013-11-12 21:14 ` honyk
     [not found] ` <00d401cedfec$3eb0c090$bc1241b0$@tosovsky@email.cz>
2013-11-15 12:50   ` honyk
     [not found]   ` <008c01cee201$4a65bff0$df313fd0$@tosovsky@email.cz>
2013-11-15 17:32     ` honyk [this message]
2013-11-07 21:56 honyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='30066.9821248905$1384536794@news.gmane.org' \
    --to=j.tosovsky@email.cz \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).