[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] userinput/sgmltag in TOC
On Wed, Jun 04, 2003 at 07:24:57PM -0600, John W. Shipman wrote: > Sorry for the empty post just before this one. > > I've just joined docbook-apps, and I a have question about > customization of the DocBook-XML stylesheets. I would very much > appreciate any suggestions. We're currently using version 1.60.1 > of the stylesheets with xsltproc. These comments apply to the FO > stylesheets. > > I use <userinput> and <sgmltag> elements inside my section > titles, and they are rendered correctly in the actual title, but > in the table of contents they are rendered in the same font as > everything else. I would prefer that <userinput> elements be > rendered in monospaced type, and that <sgmltag> elements appear > as they do in regular text, with the <...> around them and in > monospaced type. > > I'm guessing that I need something like the match="userinput" > template in inline.xsl, only with a mode="..." attribute that > causes the template to fire during TOC construction. But it's > not obvious to me what mode I want, or even whether this will > work. It certainly isn't obvious, but this customization will achieve what you want for userinput: <xsl:template match="userinput" mode="no.anchor.mode"> <xsl:apply-templates select="." /> </xsl:template> If you want to trace this through the templates: 1. Processes <section> with mode="toc" in autotoc.xsl. That applies templates in mode="title.markup". 2. Matches on <section> in mode="title.markup" in titles.xsl. That sets variable $title = <title> element. Applies templates on $title in mode="title.markup". 3. Matches on <title> in mode="title.markup" in titles.xsl. Applies templates in mode="no.anchor.mode". The 'no.anchor.mode' prevents links and index entries. There are no templates in such mode for inlines, so it defaults to outputting just the text content of the element. The customization above applies the regular userinput template to the element instead. > By the way, the reason we don't use the newer 1.61.2 stylesheets > is that for some reason those want to use "#" as the hyphenation > character. Is anyone else having this problem? Yes, a workaround was posted to reset that character in a gentext customization. See: http://lists.oasis-open.org/archives/docbook-apps/200305/msg00361.html -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]