On 2/7/12 5:37 PM, Paul Tremblay wrote:
Can anyone tell me how to suppress the title for a table just in the
Abstract, using the xsl docbook stylesheets? For my work, it was
suggested I put a table at the beginning of the document to outline
the contents. (This idea did not come from me, and I don't think it a
good one.) Hence, I put the table right after the abstract.
Figured out how to do it:
<!--suppress tol entry-->
<xsl:template match="d:table[@class = 'after-abstract']" mode="toc" />
<!--renumber tables-->
<xsl:template match="d:figure|d:table|d:example" mode="label.markup">
<xsl:variable name="pchap"
select="(ancestor::d:chapter
|ancestor::d:appendix
|ancestor::d:article[ancestor::d:book])[last()]"/>
<xsl:variable name="prefix">
<xsl:if test="count($pchap) > 0">
<xsl:apply-templates select="$pchap" mode="label.markup"/>
</xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="@label">
<xsl:value-of select="@label"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$prefix != ''">
<xsl:apply-templates select="$pchap" mode="label.markup"/>
<xsl:apply-templates select="$pchap" mode="intralabel.punctuation"/>
<xsl:number format="1" from="d:chapter|d:appendix" level="any"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="num">
<xsl:number format="1" from="d:book|d:article" level="any"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="self::d:table">
<xsl:value-of select="$num - 1"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$num"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--suppress title-->
<xsl:template match="d:table[@class='after-abstract']"
mode="object.title.template"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]