[xep-support] Center a table on a page

G. Ken Holman gkholman at CraneSoftwrights.com
Mon Sep 29 16:40:44 PDT 2003


At 2003-09-29 17:42 +0200, Obenaus, Detlef wrote:
>I want to center a table on a page.
>
><fo:block text-align="center">
>  <fo:table table-layout="fixed">
>   <xsl:apply-templates/>
>  </fo:table>
></fo:block>
>
>or
>
><fo:table table-layout="fixed" text-align="center">
>   <xsl:apply-templates/>
></fo:table>
>
>But it works not. What is wrong?

The way to centre a table in XSL-FO 1.0 is to use the <table-and-caption> 
construct:

     <table-and-caption text-align="center">
       <table border="solid" width="10cm">
       ...
       </table>
     </table-and-caption>

I see by trying it that this is not yet supported by XEP so if you know the 
width of the table you can use start-indent= and end-indent= on the table.

I hope this helps.

........................ Ken

--
Next public US delivery:        3-day XSLT/2-day XSL-FO 2003-10-13
Next public European delivery:  3-day XSLT/2-day XSL-FO 2003-11-??
Instructor-led on-site corporate, government & user group training
for XSLT and XSL-FO world-wide:  please contact us for the details

G. Ken Holman                 mailto:gkholman at CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                       Definitive XSLT and XPath
ISBN 0-13-140374-5                               Definitive XSL-FO
ISBN 1-894049-08-X   Practical Transformation Using XSLT and XPath
ISBN 1-894049-11-X               Practical Formatting Using XSL-FO
Member of the XML Guild of Practitioners:     http://XMLGuild.info
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/f/bc

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at 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/tos.html



More information about the Xep-support mailing list