Next / Previous / Contents / Shipman's homepage

4.19. leader(): Generate a leader

In historical typesetting parlance, a leader is any content that fills an arbitrary area. The most common occurrence of leaders is the row of dots separating section titles from page numbers in a table of contents.

In XSL-FO, a leader fills either a fixed-size area or an arbitrary area. The area may be blank, or it may be filled with any of a set of repeating glyphs. The leader() function returns a leader element, and has this calling sequence.

leader(length=None, pattern=None)

The length can be any dimension, either as a fixed string or as an instance of class FoDim; the default is to produce a leader that fills all the space left over in its parent element. There are quite a number of values for the pattern argument; refer to Pawson's book, pp. 118–119, for details.