[Dblatex-users] Using olink to reference a chapter
Status: Beta
Brought to you by:
marsgui
From: Richard W. <wal...@gm...> - 2011-11-21 01:54:49
|
I'm having problems using olink to reference a chapter. The target.db file is generated (as per the dblatex manual) using the HTML version of the DocBook styles. The relevant bit of my target.db file is: <div element="chapter" href="#chapter-passwords" number="2" targetptr="chapter-passwords"> <ttl>Passwords</ttl><xreftext>Chapter 2, <i>Passwords</i></xreftext> (So the the chapter name is surrounded by "i" tags.) When I reference this with an olink and process with dblatex, I only see the text "Chapter 2, ". So the name of the chapter is lost, apparently because of the <i> element around it. I can make the chapter name appear in the PDF by overriding the markup used for target.db, thus: <xsl:template match="chapter|appendix" mode="insert.title.markup"> <xsl:param name="purpose"/> <xsl:param name="xrefstyle"/> <xsl:param name="title"/> <xsl:choose> <xsl:when test="$purpose = 'xref'"> <!-- begin of i element was here --> <xsl:copy-of select="$title"/> <!-- end of i element was here --> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$title"/> </xsl:otherwise> </xsl:choose> </xsl:template> But actually I _would_ like the chapter name to appear in italics, to match what I see when I process the document to produce HTML output. Inserting text nodes for "\emph{" and "}" in the above template doesn't work, as the generated PDF then contains those strings literally. So I can't see how to make this work. |