xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <dev.jerem...@greenmail.ch>
Subject Re: Element list generation for tables (special case)
Date Tue, 02 Aug 2005 16:03:10 GMT
Thanks Simon. Now I understand. I've just committed the general fix for
the problem (I think), but have hard-coded the penalty value to 900 for
the moment. I think your idea might be interesting but I'm a little
clueless about the right formula to calculate an appropriate penalty
value. I'll leave that for someone more mathematically gifted. :-) The
code line is clearly marked with a TODO item if anyone wants to try. I'm
happy enough with the result. :-)

On 31.07.2005 12:17:31 Simon Pepping wrote:
> On Sat, Jul 30, 2005 at 03:46:31PM +0200, Jeremias Maerki wrote:
> > Sorry, but I have trouble understanding what you mean. Could you please
> > elaborate with an example? Thanks.
> >
> > On 30.07.2005 13:54:25 Simon Pepping wrote:
> > > On Wed, Jul 27, 2005 at 10:40:25PM +0200, Jeremias Maerki wrote:
> > > > I was under the impression that the breaker automatically favors break
> > > > decisions that take up less space. It even goes so far that if you have
> > > > a minimum="0pt" and an optimum="2opt" on a space-before, that it
> > > > currently chooses "0pt" which is not so good, actually.
> > >
> > > Penalties would help. If there were a penalty associated with the
> > > break below 'B', then the break above it becomes more favourable. I do
> > > not think the breaker could do that otherwise (without the newly
> > > proposed rule).
> 
> If there were a penalty value associated with a break that makes the
> table longer, e.g. 0.1 * w, then the following list would result:
> 
>  8) box w=9600
>  9) penalty p=0 w=0
> 10) box w=28800
> 11) penalty p=0 w=0
> 12) box w=0             //<-- this is where the second row starts
> 13) penalty p=960 w=9600  //this penalty is due to the possible break after "B"
> 14) box w=28800
> 15) penalty p=0 w=0     //this is the next break poss after three lines
>                         //due to the orphan setting
> 16) box w=28800
> 
> Now a break at 12 would have 960 demerits. A break at 10 would have 0
> demerits, but because it would have less content on the page it would
> have a larger stretch and that would itself associated demerits, say
> 500. Then the break at 10 would be selected.
> 
> In general, the table breaker may select breaks with a skew placement
> of table contents, e.g.
> 
>     xxx  |
> 		 |
>    ------|-----
> 		 |
> 	xxx' | yyy
> 
> over breaks with a more even placement of table contents, e.g.
> 
>     xxx  | yyy'
> 		 |
>    ------|-----
> 		 |
> 	xxx' | yyy"
> 
> Such breaks are rather ugly. They also make the table considerably
> longer. One can use the extra length of the table as a measure of
> skew placement and thus of ugliness and of the penalty value
> associated with this break. This makes that breaks with a skew
> placement of content are disfavoured, and only selected when more
> even breaks have lots of demerits themselves, due to other causes.
> 
> Regards, Simon
> 
> --
> Simon Pepping
> home page: http://www.leverkruid.nl



Jeremias Maerki


Mime
View raw message