Menu

#32 Overlapping ranges in the raw index

open
nobody
4
2005-08-02
2005-08-01
No

Consider the following raw index:

(indexentry :key ("Test") :open-range :locref "1")
(indexentry :key ("Test") :close-range :locref "3")
(indexentry :key ("Test") :open-range :locref "2")
(indexentry :key ("Test") :close-range :locref "4")

This raw index defines two overlapping ranges for the keyword
"Test": 1-3 and 2-4.

When processing this raw index with xindy, xindy drops the
second range and omits the following warning:

WARNING:
Found a :close-range in the index that wasn't opened before!
Location-reference is 4 in keyword (Test)
I'll continue and ignore this.

Accordingly, xindy outputs the Index "Test 1-3" instead of "Test
1-4" for the following simple index style:

(define-attributes (("default")))
(define-location-class
"arabic-page-numbers" ("arabic-numbers") )
(markup-locclass-list :open " ")
(markup-locref-list :sep ", ")
(markup-range :sep "-")

A problem of the same kind occurs when the first of the two
ranges is reduced to a one-page range:

(indexentry :key ("Test") :open-range :locref "2")
(indexentry :key ("Test") :close-range :locref "2")
(indexentry :key ("Test") :open-range :locref "2")
(indexentry :key ("Test") :close-range :locref "4")

Xindy issues the same warning and outputs the index "Test 2"
instead of "Test 2-4".

Discussion

  • Joachim Schrod

    Joachim Schrod - 2005-08-02
    • labels: --> Kernel (incl. scripts)
    • priority: 5 --> 4
     
  • Joachim Schrod

    Joachim Schrod - 2005-08-02

    Logged In: YES
    user_id=70318

    xindy does currently not handle overlapping location ranges
    -- and I don't know if it should. At least, this should be
    mentioned in the documentation. The error messages are bad,
    too; they should refer to the 2nd entry with the :open-range
    attribute.

    To support overlapping ranges, the main task is probably to
    define the location sort order for overlapping ranges in
    context of other entries. We should sort it according to the
    start location.

    In fact, the second error case should be looked at first, as
    the page ranges are not overlapping. Seems to be an error
    with border computation there.

     
  • Andreas Nolda

    Andreas Nolda - 2005-08-02

    Logged In: YES
    user_id=950793

    I agree. The second issue is clearly more annoying, as it can also arise
    from non-overlapping index range commands in, e.g., a LaTeX source.

     
  • Andreas Nolda

    Andreas Nolda - 2005-08-23

    Logged In: YES
    user_id=950793

    I've done some further exploration of the second issue. According to
    the log file (log-level = 3), xindy appears to drop the second
    open-range indexentry quite early:

    ...
    (Inital location-refrence group::
    [Nor:OPEN:"2"=("2")=(2);{"arabic-page-numbers":1};`default'NIL]
    [Nor:CLOSE:"2"=("2")=(2);{"arabic-page-numbers":1};`default'NIL]
    [Nor:CLOSE:"4"=("4")=(4);{"arabic-page-numbers":1};`default'NIL]
    )
    ...

     

Log in to post a comment.