Manuel Mall wrote:

Is that actually conceptually the right thing to do, that is removing the trailing spaces before the end of a block as part of the Knuth handling?

For leading spaces it is done somewhere completely different (and currently in the same piece of code it is done incorrectly for embedded spaces).

I'm not sure it is the best place to do it, although I think that before the breaks are computed trailing spaces should exist no more: otherwise, the content width would take into account the width of these spaces too, and right / center alignment could be incorrect.

Moreover, a glue just before the elements appended by the LineLM could be a feasible break, and this would create an empty page after the last one with some content.

In other words, that removal is there as it could not be performed any later: but the sooner we get rid of the trailing spaces, the better! :-)

I have a picture in mind with all white space handling done as part of the layout (area tree building) but before the actual Knuth sequences are constructed. But that's only a rough idea driven by the description of white space handling in the 1.1WD.

Would you like to share it with us? I always find the specs quite obscure as far as white space handling is concerned, so your explanation could really be of great help!

Regards
    Luca

Reply via email to