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

Re: FW: adjust width of block to previous block

Subject: Re: FW: adjust width of block to previous block
From: Mathis Mörke <mathis.moerke@xxxxxxxxxxxxxx>
Date: Tue, 19 Jul 2011 14:32:43 +0200
Re: FW:  adjust width of block to previous block
Sorry for the late response:

Both blocks are part of another block.
I tried <fo:block-container
inline-progression-dimension.optimum="auto"> and it worked!

2011/7/18 Brandon Ibach <brandon.ibach@xxxxxxxxxxxxxxxxxxx>:
> Perhaps a little more background could point to a solution.  Where do
> these two blocks (graphic and caption) fit into the larger layout?  A
> side-float?  Part of a table?  Maybe there's a way to convince the
> formatter to make the content to the side(s) of the blocks as wide as
> possible without exceeding the space remaining after the graphic takes
> up its area.
>
> -Brandon :)
>
>
> On Mon, Jul 18, 2011 at 8:11 AM, Mathis Mvrke
> <mathis.moerke@xxxxxxxxxxxxxx> wrote:
>>> From: "Tony Graham" <tgraham@xxxxxxxxxx>
>>> Date: 15. Juli 2011 19:28:41 MESZ
>>> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>> Subject: Re:  adjust width of block to previous block
>>> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>>
>>> On Fri, July 15, 2011 5:58 pm, G. Ken Holman wrote:
>>>
>>> At 2011-07-15 17:50 +0100, Tony Graham wrote:
>>>
>>> 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.
>>>
>>> But I saw that the input width attribute was
>>>
>>> optional and the comment at the top talked about
>>>
>>> the width being "dynamic" (which I interpreted as "not known").
>>>
>>> Hence the 'trickier' option.
>>>
>>> If FOP supported 'table-layout="auto"', then you would have had another
>>>
>>> option by using a table to contain the graphic and caption.
>>>
>>> In my experience relying on "auto" hasn't been
>>>
>>> very helpful because different vendors interpret
>>>
>>> differently what to do with the width of
>>>
>>> columns.  As I mentioned in my post regarding a
>>>
>>> side float, if the text of the caption of the
>>>
>>> graphic is rendered wider than the width of the
>>>
>>> graphic, then the table cell might simply stretch.
>>>
>>> The 'table-layout="auto"' option would, like the fo:block-container
>>> option, require setting the width, this time of the fo:table, to
something
>>> narrow and relying on the formatter to work at keeping the width of the
>>> formatted table to the minimum possible.  You'd also put the graphic and
>>> the caption in separate cells to maximise the chance that the formatter
>>> won't make the table wider than the graphic.
>>>
>>> An implementation of the CSS2 automatic table layout algorithm [1] would
>>> do what's wanted, but that's non-normative even for CSS2.
>>>
>>> Both ideas are in the realm of a "Hail Mary pass" [2] to the formatter
>>> since there is both leeway over .optimum vs .maximum and non-normative
>>> algorithms in the specs.
>>>
>>> Note also that the requirements for XSL FO 2.0 does include supporting
>>> expressions containing information that's only available at formatting
>>> time [3].
>>>
>>> Regards,
>>>
>>>
>>> Tony Graham                                   tgraham@xxxxxxxxxx
>>> Consultant                                 http://www.mentea.net
>>> Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
>>
>> At first, thank you for your immediatly repsonses.
>> Nothing worked so far. I tried the length range and and setting the
>> table-layout to 'auto' neither. Instead of using a table I simulate a
>> table with fo:blocks. FOP Apache does not support table-and-caption.
>> Other ideas?

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-2013 All Rights Reserved.