[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Table Center
Here is what I use in my stylesheets.
Regards
Dean Nelson
<!-- center tables in print, from p. 474 in Stayton: -->
<xsl:template name="table.layout"> <xsl:param name="table.content"/> <xsl:choose> <xsl:when test="self::table[@align = 'center']"> <fo:table width="100%" table-layout="fixed"> <!-- <fo:table width="100%" table-layout="fixed" border="solid"> --> <fo:table-column column-width="proportional-column-width(1)"/> <xsl:choose> <xsl:when test="self::table[@width]"> <fo:table-column column-width="{@width}"/> <xsl:message>Table width set to <xsl:value-of select="@width"></xsl:value-of> </xsl:message> </xsl:when> <xsl:otherwise> <fo:table-column/> <xsl:message>Table width NOT set.</xsl:message> </xsl:otherwise> </xsl:choose> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell column-number="2"> <fo:table> <fo:table-body start-indent="0pt"> <fo:table-row><fo:table-cell><fo:block> <xsl:copy-of select="$table.content"/> </fo:block></fo:table-cell></fo:table-row> </fo:table-body> </fo:table> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:when> <xsl:when test="self::table[@align = 'right']"> <fo:table width="100%" table-layout="fixed"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="proportional-column-width(1)"/> <xsl:choose> <xsl:when test="self::table[@width]"> <fo:table-column column-width="{@width}"/> <xsl:message>Table width set to <xsl:value-of select="@width"></xsl:value-of> </xsl:message> </xsl:when> <xsl:otherwise> <fo:table-column/> <xsl:message>Table width NOT set.</xsl:message> </xsl:otherwise> </xsl:choose> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell column-number="3"> <fo:table> <fo:table-body start-indent="0pt"> <fo:table-row><fo:table-cell><fo:block> <xsl:copy-of select="$table.content"/> </fo:block></fo:table-cell></fo:table-row> </fo:table-body> </fo:table> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$table.content"/> </xsl:otherwise> </xsl:choose> </xsl:template> In a message dated 3/26/2014 7:05:43 A.M. Pacific Daylight Time,
farensmeier@gmail.com writes:
26 mar 2014 kl. 14:09 skrev Rogério Rosa <rogerio.rosa@eixodigital.com>: |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]