[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: adjust width of block to previous block

Subject: Re: adjust width of block to previous block
From: "Tony Graham" <tgraham@xxxxxxxxxx>
Date: Fri, 15 Jul 2011 17:50:05 +0100 (IST)
Re:  adjust width of block to previous block
On Fri, July 15, 2011 4:07 pm, Mathis Mvrke wrote:
...
> I don't know how to adjust the width of a next block to the previous
> block. I have an external graphic in a block and want the next block
> to have the same size as the block containing the external graphic.

Put them both in a fo:block-container with 'inline-progression-dimension'
set to the width of the graphic, which you are already using to set
'content-width' on the fo:external-graphic.

It's a bit trickier when you don't know the width of the graphic, but you
could try using a <length-range> for the 'inline-progression-dimension' of
the fo:block-container and set 'inline-progression-dimension.optimum' to
something very small and (possibly redundantly) set
'inline-progression-dimension.maximum' to 'auto'.  If you are lucky, FOP
*may* size the fo:block-container to the width of the fo:external-graphic
and not increase it when the caption turns out to be wider than the
graphic.

If FOP supported 'table-layout="auto"', then you would have had another
option by using a table to contain the graphic and caption.

Regards,


Tony Graham                                   tgraham@xxxxxxxxxx
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL FO and XSLT consulting, training and programming

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.