Re: question about indexes in epubs
Bob Stayton <[email protected]> Fri, 9 Sep 2022 08:59:18 -0700
| Newsgroups | gmane.text.docbook.misc |
|---|---|
| Message-ID | <[email protected]> |
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="'>>'"/> 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]> > Verzonden: vrijdag 9 september 2022 17:09 > Aan:[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] > For additional commands, e-mail:[email protected] >