As per suggestion on fop-users@, entering an issue: I am trying to prevent a line from breaking, so I wrapped it inside a <fo:inline keep-together.within-line="always">...</fo:inline>. This works as long as the line is a plain text, but does not work if there is a nested fo:inline. In that case, the line breaks at the nested fo:inline. Here is a FO snippet: =========================== <fo:inline keep-together.within-line="always">very long and nasty <fo:inline/>line that should not probably wrap unless somebody is using a nested fo inline <fo:inline/> which allows this line to wrapping around<fo:inline/> even though it should not</fo:inline> =========================== I am using FOP 0.95, packages from Ubuntu 10.04.
Studying this issue closer, it seems to originate in TextLM, line 708: ... } else if (inWhitespace) { processWhitespace(alignment, sequence, true); ... The literal 'true' means that when finishing the TextLM element list, it is assumed that there is always supposed to be a break opportunity at the end, while in reality, this obviously depends... Using a literal 'true' as parameter value, we get a sequence of Glue-Penalty-Glue for the space before the nested inline. This produces a break opportunity that is used by the LineBreakingAlgorithm. Using '!keepTogether' instead, produces only an auxiliary box in this case and seems to resolve it.
Fixed in Trunk. See: http://svn.apache.org/viewvc?rev=1056945&view=rev
batch transition to closed; if someone wishes to restore one of these to resolved in order to perform a verification step, then feel free to do so