RE: question about indexes in epubs

Michel van den Burg <[email protected]> Mon, 12 Sep 2022 08:27:38 +0000
Newsgroups gmane.text.docbook.misc
Message-ID <[email protected]>
Hello Bob,

Thanks for pointing me in the right direction. I will check it out!

Michel

Van: Bob Stayton <[email protected]>
Verzonden: vrijdag 9 september 2022 17:59
Aan: [email protected]
Onderwerp: Re: [docbook] question about indexes in epubs


The stylesheets have a parameter to substitute titleabbrev (if it exists) instead of title for an index entry:

   http://docbook.sourceforge.net/release/xsl/current/doc/html/index.prefer.titleabbrev.html

That would require populating your content with titleabbrev elements.  You can also customize your output by copying and editing this template from autoidx.xsl in your customization layer:

<xsl:template match="indexterm" mode="reference">

In that template you'll see "<a>" which starts the link output and then defines a "title" variable.  The $title value is used in both the @title attribute on the anchor element and as the displayed text in the index entry, as you'll see further down the template:

        <xsl:value-of select="$title"/> <!-- text only -->
      </a>

You can either modify the title variable, or just leave that title in the @title attribute and replace the final value-of with something like:

<xsl:value-of select="'&gt;&gt;'"/>

or whatever you want to put there.

Bob
On 9/9/2022 8:11 AM, Michel van den Burg wrote:

No, they are automatically numbered, and we don't want to use numbering in our short titles, because we also combine different xml files to make new products.



Michel



-----Oorspronkelijk bericht-----

Van: Peter Flynn <[email protected]><mailto:[email protected]>

Verzonden: vrijdag 9 september 2022 17:09

Aan: [email protected]<mailto:[email protected]>

Onderwerp: Re: [docbook] question about indexes in epubs



On 09/09/2022 15:59, Michel van den Burg wrote:

[...] the hyperlinks in the indexes display the titles of the sections

as link text, instead of page numbers.



Are your sections numbered? If so, is there an option to display the section number (eg 3.1.4.2) instead of the title?



Peter



---------------------------------------------------------------------

To unsubscribe, e-mail: [email protected]<mailto:[email protected]>

For additional commands, e-mail: [email protected]<mailto:[email protected]>