[
https://issues.apache.org/jira/browse/FOP-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839960#comment-13839960
]
Seifeddine Dridi commented on FOP-2293:
---------------------------------------
Hello,
{quote}
Not sure what you mean here. If the 1st variant doesn't fit... well it doesn't
fit Did you mean, where the 1st variant does fit?
{quote}
In your example (two-valid-variants.fo) if you make the 1st variant too long
while letting the second variant occupy exactly 2 lines. You will have 2
possible final layouts: one without any variant and another where the second
variant has been included. Obviously, the breaking algorithm will tend to
select the possibility with the fewest total demerits which is the first one in
this case.
{quote}
I don't have any case in mind where the par variable is being modified while
the breaking algorithm is run?
{quote}
In BreakingAlgorithm.recoverFromTooLong(), but I don't have to worry about this
matter anymore...
{quote}
why this resetCurrentVariant? Can you not just reset it at the beginning of
computeDifference?
{quote}
I don't reset the current variant because if a variant of the "best-fit"
penalty is too short, there might be a stretching glue next on the Knuth
sequence that can fill up the remaining empty space and leads to a good
breaking node. But just like you said, we will be dealing with these special
cases later...
> Whitespace management extension
> -------------------------------
>
> Key: FOP-2293
> URL: https://issues.apache.org/jira/browse/FOP-2293
> Project: Fop
> Issue Type: New Feature
> Components: general
> Affects Versions: trunk
> Reporter: Seifeddine Dridi
> Priority: Minor
> Labels: XSL-FO
> Fix For: trunk
>
> Attachments: FO_multi-switch_best-fit_ext_rev2.patch,
> FO_multi-switch_best-fit_ext_rev3.patch,
> FO_multi-switch_best-fit_ext_rev4.patch,
> FO_multi-switch_best-fit_ext_rev5.patch,
> FO_multi-switch_best-fit_ext_rev6.patch,
> FO_multi-switch_best-fit_ext_rev7.patch, FO_multi-switch_test.fo,
> FO_multi-switch_with_best-fit_extension.patch, bestfit.fo, doc.pdf,
> multi-switch_bestfit.fo, multiple-feasible-nodes.fo, patch-rev1.1.patch,
> patch-rev1.patch, patch-rev2.patch, patch.patch, two-valid-variants.fo
>
>
> I have been working on an extension for whitespace management, similar to
> what's described here:
> http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement
> The logic of the extension is very simple: the user defines a set of
> alternatives that he wishes to insert at the end of a page, then if there is
> enough space left, FOP will pick the alternative that best matches the user's
> selection criteria (first fit, smallest fit, biggest fit).
> This is my first work on FOP and it took me almost 2 months to reach this
> stage in development. But it's not the end of course, so I'm relying on your
> feedback to improve it.
> Thank you
--
This message was sent by Atlassian JIRA
(v6.1#6144)