[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Positioning Tables in printed Output
> -----Original Message----- > From: Russell Seymour > > I have a document that has an informaltable of 60mm in width. > I would like to position this table to the right hand side > of the page and i can't do it. I tried to add align to the > various sections in the markup but all I succeed in doing is > align the text and not the table. > I guess I must have missed something in the documents, sorry > if I have. One method of doing it is described here: http://xmlgraphics.apache.org/fop/fo.html#fo-right-align-table-horizon In a customization layer, you can use the "table.layout" placeholder template to achieve this (see table.xsl). Here is a suggestion: <!-- Align a table based on the value of the table's tabstyle attribute --> <xsl:template name="table.layout"> <xsl:param name="table.content" select="NOTANODE"/> <xsl:choose> <xsl:when test="@tabstyle='right-align'"> <fo:table table-layout="fixed" width="100%"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="60mm"/> <fo:table-body> <fo:table-row> <fo:table-cell column-number="2"> <fo:block> <xsl:copy-of select="$table.content"/> </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> Mauritz
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]