Loading ...
Sorry, an error occurred while loading the content.

7407Re: [XSL-FO] Re: center image and caption

Expand Messages
  • G. Ken Holman
    Aug 17, 2007
    • 0 Attachment
      At 2007-08-17 17:26 +0000, slwm98 wrote:
      >Ack! I *just* read about the single quote in *your* manual but was on
      >another track and forgot it. I fixed that now, thank you very much.

      :{)}

      >But back to the original problem, I'm still not getting it. My
      >processor is XEP 4.6.

      This is a known issue in XEP ... I tested the example I gave you in
      Antenna House.

      >I cut and pasted your code, but XEP won't run it
      >unless I wrap the table-cell in a table-row. I added that, and my
      >table is still aligned on the left.
      >...
      >What am I messing up here?

      That XEP doesn't (yet) centre a table based on text-align= in
      table-and-caption.

      The XEP workaround is to use a proportional-table-width() trick ...
      though with the code below I'm not quite getting the expected image
      size and I'm not sure why with the limited time I have to look at it.

      I hope this helps.

      . . . . . . . . . . Ken

      <fo:table width="100%">
      <fo:table-column column-width="proportional-column-width(1)"/>
      <fo:table-column column-width="13.68cm"/>
      <fo:table-column column-width="proportional-column-width(1)"/>
      <fo:table-body>
      <fo:table-row>
      <fo:table-cell><fo:block/></fo:table-cell>
      <fo:table-cell border="solid .5mm">
      <fo:block text-align="center">
      <fo:external-graphic src='url("harbour.jpg")'
      width="12.68cm" content-width="scale-to-fit"
      content-height="scale-to-fit" display-align="center"/>
      </fo:block>
      <fo:block padding="1em" start-indent="1em" end-indent="1em"
      border="solid .4mm" text-align="start">
      This is a long caption here that should wrap in the block container
      This is a long caption here that should wrap in the block container
      This is a long caption here that should wrap in the block container
      </fo:block>
      </fo:table-cell>
      <fo:table-cell><fo:block/></fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>


      --
      Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1
      World-wide corporate, govt. & user group XML, XSL and UBL training
      RSS feeds: publicly-available developer resources and training
      G. Ken Holman mailto:gkholman@...
      Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
      Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/f/bc
      Legal business disclaimers: http://www.CraneSoftwrights.com/legal
    • Show all 5 messages in this topic