[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Table of Contents formatting
Hi Tristan, You will find that emphasis in a TOC title does work except when the emphasis contains a descendant that is a link, as is your ulink. Because a TOC entry is a link, it cannot contain a nested link. I don't think you want to click on the word "Google" in the TOC and go to the Google website. You would expect to go to the section in the document with that title, and from there perhaps click on the Google link. Anyway, any elements in a TOC title that contain a link element are processed in no.anchor.mode to prevent nested links. But there is not a complete set of templates in no.anchor.mode that match the normal templates like emphasis. That would require duplicating a lot of templates. You may ask why not just process the emphasis element with the regular template and just the ulink in no.anchor.mode? Because the regular emphasis template doesn't know to use apply-templates mode="no.anchor.mode" for its children, so the mode usage is lost and you get a nested link. You can work around the problem by nesting your emphasis inside the ulink: <ulink url="http://www.google.com" role="_blank"><emphasis>Google</emphasis></ulink>. Now the regular emphasis template can be used because the element no longer contains a link. The link has already been handled in no.anchor.mode. Mode handling in XSLT 2 is much more flexible, so it might be possible to handle this better then. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Tristan Fiedler" <fiedler@cshl.edu> To: "'Docbook-Apps'" <docbook-apps@lists.oasis-open.org> Sent: Friday, July 22, 2005 2:25 PM Subject: [docbook-apps] Table of Contents formatting > Software : DocBook 4.4CR2, XSL 1.67.2, FOP 0.20.5, and Saxon 6.5.3 > > I would like my table of contents to render font in italics in PDF and > HTML output, when specified by the <section2><title> shown below, > > <sect2> > <title>This is plain, but <emphasis><ulink > url="http://www.google.com" role="_blank">Google</ulink></emphasis> > should be italics</title> > <para>This is the first paragraph of this section .... > > On the main table of contents for the <article>, currently Google is a > link, but is not rendered in italics. (The italics are correctly shown > in the body of the article however, just not on the table of contents) > > > > > Cheers, Tristan > --- > Tristan J. Fiedler > Postdoctoral Fellow - Stein Lab > Cold Spring Harbor Laboratory > > > --------------------------------------------------------------------- > 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]