Re: indexterm between two para tags
James Devenish <[email protected]> Thu, 17 Jun 2004 20:02:06 +0800
| Newsgroups | gmane.text.docbook.db2latex.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, In message <[email protected]> on Thu, Jun 17, 2004 at 12:38:13PM +0200, Melanie R?sch wrote: > The parent element is for example <chapter>, > but if <indexterm> is an inline element, then I only > must avoid this tag between two <para> tags. It appears that it is valid to mix <para> and <indexterm> within <chapter>, so DB2LaTeX needs to be able to handle it. There must be other elements with which this problem arises, too. I'm not sure how we handle it. Will have to think about this one. For the time being, you can add something like this to your customisation layer. It will make the indexterm snap to the preceding paragraph, if there is one, or otherwise the following paragraph. <xsl:template match="indexterm"> <xsl:if test="not(preceding-sibling::para) and following-sibling::para"> <xsl:text> </xsl:text> </xsl:if> <xsl:apply-imports/> <xsl:if test="not(preceding-sibling::para) and following-sibling::para"> <xsl:text>%</xsl:text><!-- gobble following para's initial newline --> </xsl:if> <xsl:if test="preceding-sibling::para"> <xsl:text> </xsl:text> </xsl:if> </xsl:template> ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND