[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Centering Tables in Print with Fop 1.0
|
Tom
Here is an adjusted version that triggers only when "align" is used on the table. This has some peculiarities when processed with FOP 1.0.
I would suggest that you use fixed column widths and not proportional in the XML tables because proportional is not quite right in FOP when used in a table in a table. But if you use fixed widths it should be fine (or at least in my setup it was).
Cheers,
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]"> <fo:table width="100%" table-layout="fixed"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body start-indent="0pt"> <fo:table-row> <fo:table-cell><fo:block></fo:block></fo:table-cell> <fo:table-cell> <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> &nbs p; </fo:table-cell> <fo:table-cell><fo:block></fo:block></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 11/11/10 06:40:35 Pacific Standard Time, tom.browder@gmail.com writes:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]