SourceForge has been redesigned. Learn more.
Close

#990 links generated by indexterm

output: HTML
closed-fixed
XSL (1066)
5
2009-03-16
2008-06-06
No

Consider this text:

<firstterm>foo
<indexterm id="my-foo" significance="preferred">
<primary>foo</primary></indexterm></firstterm>

this generates an index entry for foo,
but the reference from the index
entry goes NOT to the anchor
__<a id="my-foo" class="indexterm"></a>__
created next to "foo", but to the enclosing section.
in fact, there are no pointers to the id "my-foo".

(note that when I omit id="my-foo" from <indexterm>,
a generated anchor is created:
___<a id="id12345" class="indexterm"></a>"___
and still there are no references to this anchor)

I think this is a bug.

The correct behavior would be to refer
to the supplied (or generated) id of indexterm,
OR __NOT__ to generate the ID which is never used.
(However, I like that the name of the enclosing
section is used as the label).

Discussion

  • Mauritz Jeanson

    Mauritz Jeanson - 2008-06-30

    Logged In: YES
    user_id=582041
    Originator: NO

    I would say that this is more of a feature request (and an interesting topic for discussion) than an obvious bug. There are different views on what the correct behaviour is.

    See this thread on docbook-apps (from March 2008):
    http://lists.oasis-open.org/archives/docbook-apps/200803/msg00077.html

     
  • Sam Steingold

    Sam Steingold - 2008-06-30

    Logged In: YES
    user_id=5735
    Originator: YES

    creating unused gensym anchors is certainly a bug.
    the thread you mention appears to deal mostly with text, not links.

     
  • Robert Stayton

    Robert Stayton - 2009-03-15

    I added a new param 'index.links.to.section', which when set to zero will cause index entries in HTML output to link directly to the anchor associated with its indexterm. This has been a long standing feature request. Any duplicate entries will produce duplicate titles in the index, however, because they each have different destinations.

     
  • Robert Stayton

    Robert Stayton - 2009-03-15
    • assigned_to: nobody --> bobstayton
    • status: open --> pending-fixed
     
  • Sam Steingold

    Sam Steingold - 2009-03-16
    • status: pending-fixed --> open-fixed
     
  • Robert Stayton

    Robert Stayton - 2009-03-16

    That snapshot works for me. When I cut and paste your example from feature request 747703 into my document, the indexterm location in the section has this anchor:

    <em class="firstterm">no-prim;<a class="indexterm" name="no-prim"></a></em>

    the index entry shows this link:

    <a class="indexterm" href="achap.html#no-prim">My section</a>

    That is, it links to the exact location of the indexterm anchor within the chunk.

    Can you please double check your setup, or test without your customization layer?

    Regarding the default value of the param, I meant to set that to 1 to retain the existing behavior. I'll change that in the source.

     
  • Sam Steingold

    Sam Steingold - 2009-03-16

    wfm too.
    sorry.

     
  • Sam Steingold

    Sam Steingold - 2009-03-16
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.