[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] FO problem: Setting start indent for special tables
I think the simplest way to accomplish what you want is to use the table.properties attribute-set with a conditional attribute. The table.properties attribute-set is applied to the outer fo:block that contains a table and its title, so any title gets outdented as well (I'm assuming that's what you want). This should work: <xsl:attribute-set name="table.properties"> <xsl:attribute name="start-indent"> <xsl:choose> <xsl:when test="@tabstyle = 'smallfont'">0pt</xsl:when> <xsl:otherwise>inherit</xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:attribute-set> If you don't want the title outdented with the table, then you can use the "table.table.properties" attribute-set, which is instead applied to the fo:table element inside the block. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Schramm, Martin" <MSchramm@harmanbecker.com> To: <docbook-apps@lists.oasis-open.org> Sent: Monday, November 13, 2006 7:52 AM Subject: [docbook-apps] FO problem: Setting start indent for special tables Dear all, I would like to ask you for some support with my FO customization: I've got a problem to set oversize tables correctly into my page layout, which indents the main text. These oversize tables usually have numerous columns, extensive content and demand full page width. I do not want to rotate these tables (e. g. with attribute "orient=land"). I have written an XSL customization, which indents the main text (Body text: paras, mediaobjects etc.) 42.25mm to the right. The Headlines (titles of sections etc.) are not indented. So in my customization I have altered the body.start.indent parameter like this: <xsl:param name="body.start.indent">42.25mm</xsl:param> I want the some tables to start directly after the left margin of the page (=not indented) and reduce the font size of the table's content. For this, I have offered the following sample table to those authors, who contains the attribute tabstyle="smallfont". The authors take this sample table, copy it into their document and edit the content. <table tabstyle="smallfont"> <title>Oversize table</title> <thead> <row> <entry> ... ... </row> </thead> <tbody> ... Therefore I have altered the table.cell.block.properties parameter in my customization like shown below. Result: The font sizes are set correctly, the table is correctly set on an extra page, BUT the table is still indented, though I want it to start directly after the left margin of the page (=not indented) . For this I had set the "fo:block start-indent" to a negative value, but it does not work. Could you give me a hint, how I can solve this problem? Many thanks, Martin Customized table.cell.block.properties: <xsl:template name="table.cell.block.properties"> <xsl:choose> <xsl:when test="ancestor-or-self::table[1]/@tabstyle='smallfont' or ancestor-or-self::informaltable[1]/@tabstyle='smallfont'"> <fo:block start-indent="-42.25mm" break-before="page" break-after="page" > <xsl:if test="ancestor::thead"> <xsl:attribute name="font-size">8pt</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> </xsl:if> <xsl:if test="ancestor::tbody"> <xsl:attribute name="font-size">8pt</xsl:attribute> </xsl:if> </fo:block> </xsl:when> <xsl:otherwise> <xsl:if test="ancestor::thead"> <xsl:attribute name="font-size">10pt</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> </xsl:if> <xsl:if test="ancestor::tbody"> <xsl:attribute name="font-size">10pt</xsl:attribute> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> ******************************************* Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden. ******************************************* --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]