On Tue, Jun 01, 2004 at 12:16:24PM +0100, Chris Bowditch wrote: > Simon Pepping wrote: > > >Note that Luca's patch causes a loop on this block. The null > >implementation of AbstractLayoutManager.getNextKnuthElement causes > >this. It should be modified to finish the LM: > > Great stuff. Do you think Luca's patch is ready to be committed with this > change? Or is more testing required?
No. Without this change other childLMs than TextLM cause an infinite loop, because null is returned but the childLM never finishes. This is a special feature of getChildLM(): It is a sort of iterator over the childLMs but it does not advance to the next childLM except when the current childLM is finished. With this change the childLM declares itself finished immediately, without contributing any breakposs. A real null implementation. :-) A way must be found to let childLMs other than TextLM contribute to the Knuth algorithm. Some LMs simply contribute a box. Others, esp. InlineStackingLM, contribute text elements from their own TextLM childLMs. These must be forwarded to the LineLM, and the LineLM must be able to request hyphenation from those TextLMs. This is not trivial. I expect that Luca is working on it. If not, someone else must take it up. Regards, Simon -- Simon Pepping home page: http://www.leverkruid.nl