On Tue, Nov 01, 2005 at 11:40:42PM +0800, Manuel Mall wrote:
> This is probably a question for Luca or Simon.
> In LineLM we have this code:
>                 // ignore KnuthGlue and KnuthPenalty objects
>                 // at the beginning of the line
>                 seqIterator = seq.listIterator(iStartElement);
>                 tempElement = (KnuthElement) seqIterator.next();
>                 while (!tempElement.isBox() && seqIterator.hasNext()) {
>                     tempElement = (KnuthElement) seqIterator.next();
>                     iStartElement++;
>                 }
> What is the background to this? This seems to interfere with certain 
> combinations of white-space-collapse="false" and 
> white-space-treatment="preserve/ignore-if-before-linefeed". I think 
> there is similar code to remove trailing stuff with similar 
> interference.

Glue and penalty items are removed at the start of a line. This is
part of the Knuth algorithm. It does not touch the matter of
white-space-collapse. If there is whitespace that may not be
removed/collapsed at the start of the line, it must be protected by a
preceding zero-width box. I.o.w., the value of white-space-collapse
needs to be taken into account at the phase of getNextKnuthElements.


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

Reply via email to