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 ___________________________________________________________________________________