OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: put a table in abstract: suppress title


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) &gt; 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"/>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]