Next / Previous / Contents / Shipman's homepage

5.2. XSL-FO design: General page layout

In general, assuming 3-ring binding, we want the folio (page number) opposite the binding edge; on the outside for all portrait pages; and on the right for all landscape pages.

In the diagrams above, time is the last modification timestamp of the file; dir is the absolute path to its directory; and the folio has the form F N/T where F is the file's name, N is the page number, and T is the total number of pages.

These are the critical dimensions; for the current values, see Section 8, “Manifest constants”.

Symbolic constantMeaning
BOUND_MARGIN Size of the margin on the bound (hole-punched) side.
COL_GAP For multi-column output, the separation between the columns.
HEADING_EXTENT Height of the running head and the space below it.
NARROW_MARGIN Size of the narrow margin perpendicular to the bound/unbound axis.
UNBOUND_MARGIN Size of the margin on the unbound (not hole-punched) side.

The various options affect not only the setup of page masters, but also the generation of body pages. The logic that breaks long lines must know how many characters will fit in the width of each column, and that is a function of the command line arguments.

XSL-FO does multi-column output easily, so long as all the columns are the same width. In each simple-page-master, the region-body has a column-count attribute that may be any integer, and a column-gap attribute that specifies the distance between columns.

To get a hairline vertical rule at the left side of each column, we wrap the entire content of the XSL-FO flow element in a block-container that specifies border-style='solid' and border-left-width='0.4pt', while setting the other three border widths to zero.