[xep-support] How to get a table caption to center over the table (and not the page)

From: Andy Black <andy_black@sil.org>
Date: Mon Aug 13 2007 - 12:14:50 PDT
Hello,

I'm wondering if there is a way to get a table caption to center over the width of the (left-aligned) table that it is the caption for.  I've only been able to get a table caption to center within the page width itself.  For example, if the table has a width of 3 inches and the page has a width of 6 inches, the table caption will be centered on 6 inches, not on 3 inches.

Here's an example snippet:

------------

            <fo:block space-before="10pt" space-after="10pt" start-indent=".125in" end-indent=".125in">
                <fo:table-and-caption>
                    <fo:table-caption>
                        <fo:block font-weight="bold" text-align="center" display-align="auto" space-after=".3em" keep-with-next.within-page="10">This is the caption</fo:block>
                    </fo:table-caption>
                    <fo:table space-before="0pt">
                        <fo:table-body start-indent="0pt" end-indent="0pt">
                            <fo:table-row>
                                <fo:table-cell border-collapse="collapse" padding=".2em" text-align="start" display-align="auto" border="solid 1pt black">
                                    <fo:block>Table row one, column one</fo:block>
                                </fo:table-cell>
                                <fo:table-cell border-collapse="collapse" padding=".2em" text-align="start" display-align="auto" border="solid 1pt black">
                                    <fo:block>Table row one, column two</fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                            <fo:table-row>
                                <fo:table-cell border-collapse="collapse" padding=".2em" text-align="start" display-align="auto" border="solid 1pt black">
                                    <fo:block>Table row two, column one</fo:block>
                                </fo:table-cell>
                                <fo:table-cell border-collapse="collapse" padding=".2em" text-align="start" display-align="auto" border="solid 1pt black">
                                    <fo:block>Table row two, column two</fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>
                </fo:table-and-caption>
            </fo:block>


----

I can supply the full FO source if needed.

Thanks for your help,

--Andy
------------------- (*) To unsubscribe, send a message with words 'unsubscribe xep-support' in the body of the message to majordomo@renderx.com from the address you are subscribed from. (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html Received on Mon Aug 13 12:43:10 2007

This archive was generated by hypermail 2.1.8 : Mon Aug 13 2007 - 12:43:11 PDT