Next / Previous / Contents / Shipman's homepage

6.3. class MarginSet: Four margin dimensions

The purpose of this class is to represent the four margin sizes of a page master. The constructor:

MarginSet(top=T, bot=B, left=L, right=R)

Each argument defines the width or height of one margin. Each argument defaults to zero. The values supplied for each argument may be either an instance of class FoDim or a string that is acceptable as an XSL-FO dimension, e.g., "3.6pc".

Instances of MarginSet have these attributes and methods:


The top margin height.


The bottom margin height.


The left margin width.


The right margin width.


Return the instance's dimensions as a dictionary with keys margin-top, margin-bottom, margin-left, and margin-right, suitable for describing the margin properties of several kinds of areas that share the “box properties” group.