On Tue, Feb 14, 2006 at 10:26:52AM +0100, Luca Furini wrote:
> In order to preserve all spaces, we could use the elements that are now 
> generated for a nbsp:
>    box  w=0
>    penalty inf
>    glue (elastic or not, according to the alignment)
> They are not suppressed and they do not allow a break, so I think they 
> should fit quite well this situation too, when white-space-treatment = 
> "preserve" and wrap-option="no-wrap".

If wrap-option="no-wrap", cannot we somehow avoid the whole linebreak
calculation? Each line is a Knuth paragraph and creates a single line.
> If wrap-option="wrap", however, we must add some penalties in order to 
> allow a break between spaces; we must be careful, as if there are 3 spaces 
> between two words, there are 4 possible breaks (ignoring, at the moment, 
> unicode breaking rules), so we just cannot add a penalty before or after 
> the other elements.

Isn't it so that in the case of white-space-treatment="preserve" the
line breaks are between the spaces instead of on them? Then for a___b,
where an underscore indicates a space, I would construct

box(a) p box(0) p(inf) glue p box(0) p(inf) glue p box(0) p(inf) glue p box(b)

with possible line breaks at the p.

Simon Pepping
home page: http://www.leverkruid.nl

Reply via email to