(see Harald Armin Massa's posting to the RL mailing list):
on updating some projekt to RL 2.2; and wordaxe 0.3.0, I ran into some
obscure wrapping / splitting bug.
As it turned out:
the SplitRoutine within NewParagraph get's problems when doc.multibuild is used.
I tracked it down to:
if not hasattr(self, "_lines"):
# This can only happen when split has been called
# without a previous wrap for this Paragraph.
# From looking at doctemplate.py and frames.py,
# I assume this is only the case if the free space
# in the frame is not even enough for getSpaceBefore.
# Thus we can safely return 
#~ print "split without previous wrap"
NewParagraph of Wordaxe relying on self._lines NOT being present when
there was no "wrap" in the actual build pass, to return "I cannot
in a multibuild, in the second build pass that self._lines is present
from the first build pass ... , and _unused is an empty list (as some
wraps from the build pass before have used up everything)
So MY fix was in doctemplate multibuild:
#clean up so multi-build does not go wrong - the frame
#packer might have tacked an attribute onto some flowables
for elem in story:
if hasattr(elem, '_postponed'):
if hasattr(elem, '_lines'):
to extend the "cleanup" part to also delete the _lines attribute of a
NewParagraph; together with the _postponed attribut.
So everything works fine ... but I am not sure if this is really the
best approach, and the NewParagraph split/wrap is quite to challenging
to really be sure.
That's why I am posting this fix for others to enjoy and for more
enlightened ones to check:)
Log in to post a comment.