xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas L Delmelle <a_l.delme...@pandora.be>
Subject Re: Hyphetation broken with last commits
Date Sun, 18 Dec 2005 10:10:37 GMT
On Dec 18, 2005, at 06:16, Manuel Mall wrote:

Hi Manuel / Simon,

> On Sun, 18 Dec 2005 03:30 am, Simon Pepping wrote:
>> It is not a formal contradiction, but it feels like one: nbsp should
>> not have a linebreak around it, but here we have to solve the problem
>> how to deal with it when it does have a linebreak preceding or
>> following it.
> <snip />
> While I still don't quite agree with the statement
> 'nbsp should not have a linebreak around it' because nbsp  
> surrounded by
> whitespace (and therefore surrounded by possible linebreaks) for
> example is perfectly legal and sensible in some situations this really
> is not important here.

Good point, although that is again a very exceptional situation...

<fo:inline>     &#xA0;    </fo:inline>

Very theoretical. Although one can imagine this occurring, I believe  
the probability is extremely low.

> Does it mean because the Knuth algorithm removes all glues after a
> linebreak (and we also remove all glues at the end of a paragraph) a
> nbsp should not be modelled not like this:
>    pen p=INF
>    glue w=...
> but like this:
>    box w=0 aux=true
>    pen p=INF
>    glue w=...
>    box w=0 aux=true
> with the leading box preventing removal at the beginning of a line,  
> the
> trailing box prevents removal at the end of a paragraph, and the
> penalty prevents a line break.

As far as my understanding of the Knuth algorithm goes, that might be  
a way to solve it. Even better would be to make the creation of the  
auxiliary zero-width boxes conditional --depending on whether there  
are already other boxes surrounding the nbsp (if at all possible).  
It's really only in the cases where there are no preceding/following  
boxes that we need special treatment, no? In case of surrounding non- 
whitespace, the first model would seem to be sufficient.


View raw message