[xsl] xsl-fo? center external-graphic and align start side of caption with start side of external-graphic

Subject: [xsl] xsl-fo? center external-graphic and align start side of caption with start side of external-graphic
From: Jack Bates <ms419@xxxxxxxxxxxxxx>
Date: Tue, 08 Dec 2009 11:13:09 -0800
I want some XSL-FO external-graphics to appear centered on the page,
with captions underneath

If the external-graphic is wider than the caption, then I want the left
or start side of the caption to be aligned with the left or start side
of the external-graphic

If the caption is wider than the external-graphic, then I want the
caption to appear centered on the page (I want the external-graphic also
centered on the page, as before)

To achieve this I wrapped both the external-graphic and the caption in
blocks, then wrapped both those blocks in one block, and set
text-align="center" on that block's container. Then I set
text-align="start" on the caption's block. I hoped this would have the
effect of centering the block containing both external-graphic and
caption, and aligning the caption against the start side of that block.
I guess it does, except the start side of the block containing both
isn't aligned with the start side of the external-graphic : (

http://www.sfu.ca/~jdbates/tmp/xsl/200912080/block.fo
http://www.sfu.ca/~jdbates/tmp/xsl/200912080/block.pdf

I also tried wrapping both blocks in a block-container, with the same
result,

http://www.sfu.ca/~jdbates/tmp/xsl/200912080/block-container.fo
http://www.sfu.ca/~jdbates/tmp/xsl/200912080/block-container.pdf

Can I achieve the layout I want with XSL-FO?

Current Thread