This page describes how we will do multi-column layout using the Knuth approach.

Specification Links

Topics

Ideas

Column balancing can probably be handled by using a special badness functions which forces breaks that result in more or less balanced columns. The effective BPD of the column set will then be the maximum of all the used BPDs in the set.

Implementation

Most changes happened in PageSequenceLayoutManager which is responsible to handle span changes and to initiate column balancing using a special subclass of PageBreakingAlgorithm, called BalancingColumnBreakingAlgorithm, which essentially replaces the badness/demerit function for the breaking algorithm to encourage choosing breaks that result in balanced columns. The PageViewportProvider (in PSLM) was adjusted to report the correct available BPD in mixed single-/multicolumn situations.

Open problems

Footnotes always span the whole width of the region-body so footnotes from every column add up on the space used by footnotes. The difficulty is the fact that you might get a footnote on the second column while you more or less decided on the break position on the first column already. The code currently doesn't decide on the right breaks on the non-last columns. Luca suggested a possible approach: [1]

[1] http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-dev/200506.mbox/%3cPine.LNX.4.62.0506281836390.12967@malatesta.cs.unibo.it%3e

MultiColumnLayout (last edited 2009-09-20 23:52:12 by localhost)