[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] xsl:text and "\fB" results in \efB in manpage output
Daniel Leidert <daniel.leidert.spam@gmx.net>, 2007-03-20 00:31 +0100: > If I use e.g. > > <xsl:template match="literal"> > <xsl:text>\fB</xsl:text> > <xsl:apply-templates/> > <xsl:text>\fR</xsl:text> > </xsl:template> Better to use the following: <xsl:template match="literal"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:apply-templates mode="bold" select="."/> </xsl:template> If you look at the manpages source (for example, the manpages/inline.xsl file), you’ll notice that’s the way boldfacing of similar elements is handled. That’s also why I put the following big comment in the source of the utility.xsl file where the template@mode=bold template is - <!-- * NOTE TO DEVELOPERS: For ease of maintenance, the current --> <!-- * manpages stylesheets use the mode="bold" and mode="italic" --> <!-- * templates for *anything and everything* that needs to get --> <!-- * boldfaced or italicized. --> <!-- * --> <!-- * So if you add anything that needs bold or italic character --> <!-- * formatting, try to apply these templates to it rather than --> <!-- * writing separate code to format it. This can be a little odd if --> <!-- * the content you want to format is not element content; in those --> <!-- * cases, you need to turn it into element content before applying --> <!-- * the template; see examples of this in the existing code. --> > in the customization layer for a manpage XSLT stylesheet, I get an > output of: > > \efB...\efR > > I'm wondering, what is so different to using > > <xsl:template match="literal"> > <xsl:apply-templates mode="bold" select="."/> > </xsl:template> > > which results in \fB...\fR? I can reproduce this issue with the latest > release, but not with the latest snapshot. I'm wondering, what's causing > this (different) behaviour? Can someone point me into the right > direction? So I guess (see my previous reply) you know now that what you were running into was a (misguided) change I made for the 1.72.0 (that is, using U+2593 as an internal representation for backslashes). But I have since reverted that change, so your original customization will work as expected with the latest snapshot. But I recommend using the template@mode=bold mechanism instead. \Mike
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]