On Feb 5, 2006, at 14:13, [EMAIL PROTECTED] wrote:

Hi Manuel,

------- Additional Comments From [EMAIL PROTECTED] 2006-02-05 14:13 ------- Jeremias, no that is not it IMO. Knuth doesn't break between elements as such. The glue or penalty element itself is the break opportunity and is discarded when used as a break. Therefore, IMO we are not breaking before or after a
space or NBSP but at the space/NBSP.

OK, IIC you're directing this at the wrong person... The last question was mine. :-)

The problem is the coding model used for Knuth element element generation for spaces is flawed. What is done is that the only difference between normal space
and NBSP is an infinite penalty at the beginning of the sequence.

Yep. A few other gaps in that coding model, I'm currently looking at. See my most recent commit, and change of the white-space Wiki. Created some nasty side-effects in exotic situations... currently under investigation. A preserved carriage return can be treated the same way as a linefeed, under the very exceptional condition that it survives white- space handling:
 * white-space-treatment="ignore-if-*"
 * the CR does not follow/precede a linefeed
 * it is the first character in a sequence of whitespace, so
   it survives white-space-collapse

Now, what about a tab character under the same circumstances? Do we use an elastic width of X spaces optimum, where X is purely conventional?

However, some sequences are pretty long and involve multiple pen- glue combinations and therefore break opportunities further into the sequence. We probably need to separate this more cleanly. Have one function for non breaking elastic elements (e.g. NBSP) and one function for breaking eleastic elements (e.g. SPACE). The
non breaking sequences are probably very simple:

1. Justified text: pen INF + elastic glue
2. All other justification modes: either just a box of the width of the space
or pen INF + fixed width glue.

Curious what Luca and others think. Are the above two cases OK for NBSP or have I oversimplified and missed something, that is for the text-align values other then "justify", that is "start", "center", "end", is it enough to just reserve
a fixed width for the NBSP?

Still depends on text-align-last, no?
BTW, is this not one of those situations where it's possible that the used font contains a glyph for the NBSP character, so we should check that as well?

Cheers,

Andreas

Reply via email to