On Mon, 5 Sep 2005 03:08 pm, Manuel Mall wrote:
> thanks for your patience in answering my questions.
> On Mon, 5 Sep 2005 02:51 pm, Jeremias Maerki wrote:
> > On 04.09.2005 16:34:35 Manuel Mall wrote:
> > > Another question for the "Knuth" experts. It appears the inline
> > > LMs don't make provisions in the IPD for borders/padding on
> > > inlines. I assume border/padding is logically like a (with
> > > the width of the border + padding) in front of the first and
> > > after the last character of the inline assuming
> > > .conditionality=discard, that is we don't want to have let's say
> > > a left border alone on the end of a line with the text starting
> > > on the next. For .conditionality=retain this width needs to be
> > > reserved as well at the beginning and end of each intermediate
> > > line. Any suggestions how this can/should be integrated into the
> > > linebreaking algorithm?
> > Exactly like spaces, borders and padding in b-p-d for block-level
> > objects: additional auxiliary boxes and penalties. See
> > BlockStackingLayoutManager.addKnuthElementsFor*(). Line breaking is
> > the same as page breaking, only in a different direction.
> Thanks for the pointer. I'll have a look at that.
That seem to have done the trick. I have copied the Border/Padding
before/after logic from BlockStackingLayoutManager and made it into a
Border/Padding start/end for the Inline LM. There were some side
effects in that the Line LM expectd only KnuthInlineBoxes and now we
have some KnuthBoxes as well but I think I solved that ok.
Next problem: border conditionality - how do I model that with the Knuth
approach? At the time I add the Border/Padding start/end boxes we don't
have line breaks so they really only cover the .conditionality=discard
case. How do I tell the algorithm to leave enough space at the end of
each line (and the beginning of the next line) for the borders (in the
case of .conditionality=retain)?
> > <snip/>
> > Jeremias Maerki