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 13:50:37 +0100 [thread overview]
Message-ID: <47105.2438057542$1384519861@news.gmane.org> (raw)
In-Reply-To: <00d401cedfec$3eb0c090$bc1241b0$@tosovsky@email.cz>
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 found a promising option compress=no|yes|all in an experimental
> test case located in the strc-reg.mkiv file. The corresponding lua
> code seems to be performing some cleanup of page ranges, but when
> I define it same way, there is no difference in my output (still 1-1).
Looking into the lua code this one is an edge case as normalization is
performed if #pages > 1 which is not achieved here. No problem.
But I've encountered more serious issue now:
When original pages are 'compressed' for the index
114, 117, 119, 122, 130-132, 135, 135-139, 188-204, 321-321
The incorrect result is returned:
114, 117, 119, 122, 130-135, 135-321
I'd expect:
114, 117, 119, 122, 130-132, 135-139, 188-204, 321
Debugging it roughly I've noticed unsorted page numbers before compressing
(in collapsedpage function in strc-reg.lua), which leads to unexpected
result from first/second comparison.
Some kind of page entries sorting might help here.
Regards, 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
___________________________________________________________________________________
next prev parent reply other threads:[~2013-11-15 12:50 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 [this message]
[not found] ` <008c01cee201$4a65bff0$df313fd0$@tosovsky@email.cz>
2013-11-15 17:32 ` honyk
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='47105.2438057542$1384519861@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).