OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] use titleabbrev for index but not for TOC: how?

Hi Robert,
It seems the TOC is hardwired to use the titleabbrev it is exists, so when you add 
them for the index you also get them for the TOC.  There ought to be a param to 
control which title is used in the TOC instead of just assuming that titleabbrev 
should always be used if available.  But there isn't such a param, so you need to 
customize the template named 'toc.line' in html/autotoc.xsl to change:

<xsl:apply-templates select="." mode="titleabbrev.markup"/>


<xsl:apply-templates select="." mode="title.markup"/>

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Robert Nagle" <idiotprogrammer@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, February 27, 2011 10:55 PM
Subject: [docbook-apps] use titleabbrev for index but not for TOC: how?

> Hi, I'm trying to create a specialized index in HTML output (for an
> ebook actually).
> This specialized index will be called "Literary works mentioned in this book."
> I see how to do that in Bob's XSLT book.
> Here's my problem. In HTML output, default behavior in the index  is
> for the hyperlink to go to the label for the chapter or section where
> the indexterm is found. Output will look like
> T
> Twain, Mark, Chapter 4. (1001 Different Types of metaphors and how to
> use them).
> where 1001 Different types of metaphors and how to use them is the
> section containing the indexterm.
> This is not ideal for me. Ideally I'd like the names of the literary
> works to become hyperlinks. Failing that, I'd prefer that the
> hyperlink for the index item to be a titleabbrev so that the output
> displays as:
> T
> Twain, Mark, (Ch. 4)
> If I leave the section or chapter title, the size of the section
> title will take up more room than the literary works themselves. That
> will look strange on the page (because the reader does not really need
> to know the section but the specific location of the mention).
> I see that I can set the index.prefer.titleabbrev  to a numerical
> value so that the index will display abbreviated titles instead of the
> complete title. That is good. But I notice that the titleabbrev value
> will show up in the TOC (and that is bad).
> Is there a way to tell the stylesheets to pay attention to the
> titleabbrev value in the index but NOT the TOC? Thanks.
> -- 
> Robert Nagle
> 12777 Ashford Point Dr #1417
> Houston, Texas 77082
> 713 893 3424
> http://www.robertnagle.info
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]