fo:simple-page-master
The fo:simple-page-master is used in the generation of pages and specifies the geometry of the page. The page may be subdivided into up to five regions: region-body, region-before, region-after, region-start, and region-end.
- region-body — the main area of the page in which document contents are placed;
- region-before — page header;
- region-after — page footer;
- region-start — the left margin (for the direction of the text from left to right);
- region-end — the right margin (for the direction of the text from left to right).
Each area has name. By default it corresponds to the name of element. The name can be set in the region-name parameter. The name of area is used that when forming the document to specify, in what area what this to display. For example, static data of fo:static-content are most often output in headlines or to fields.
Sizes of areas
Each of areas (except region-body) has the extent parameter determining the area size in the direction perpendicular to the relevant party of the page. For headlines — it is height, for fields — width. It is set in terms of length, or percentage of the corresponding page size (page-height and page-width parameters).
Region-body area
The sizes of the region-body area are defined otherwise. First, they are limited to the sizes of page fields. Secondly, it has 4 parameters: margin-top, margin-bottom, margin-left and margin-right which define region-body area border indents from the content rectangle of the page reference area area designated by stroke in the second drawing. These indents can be set in terms of length or percentage of the size of the content rectangle of the page reference area area.
Here it is necessary to draw rather significant conclusion that borders of the region-body area do not depend on the sizes and parameters of the next areas.
Indents of the region-body area are located according to orientation of the page. For example, if for the page orientation 90 is set, the upper indent is counted from this direction. If for region-body the orientation (reference-orientation parameter) is set, it does not influence arrangement of indents in any way. All of them are equally counted according to orientation of the page. Orientation of the region-body area influences only how child blocks will be located in it.
For the region-body area the quantity of columns in which document contents will be placed can be set. Two parameters are responsible for it: column-count — sets quantity of columns (has to be more or equally 1); column-gap — distance between the next columns.
Alignment in areas
The display-align parameter which can accept values is intended for alignment in areas: auto, before, center, after. It defines alignment of child blocks in area in the direction of their following which is specified in the writing-mode parameter.
And what with corners?
Two upper corners of the page can be occupied with either page header or left and right fields. Similarly, the lower corners — page footer or left and right fields. The precedence parameter specified for headlines is responsible for it. If parameter matters true, corners are occupied by headline (for what parameter is specified). If parameter matters false, corners occupy fields. By default parameter matters false.
The fo:simple-page-master element has the following parameters:
- master-name — unique identifier of marking.
- page-height — page height.
- page-width — page width.
- margin-top, margin-bottom, margin-left and margin-right — the sizes of page fields. It is necessary to distinguish them from the headlines and fields which are work areas.
- reference-orientation — orientation of top of the page (corner in degrees counterclockwise) concerning value by default. Can accept values:-270,-180,-90, 0, 90, 180, 270. By default — 0.
- writing-mode — the mode defining arrangement of areas and blocks (paragraphs, tables, illustrations, etc.) on the page. There are three modes: lr-tb (from left to right, from top to down), rl-tb (from right to left, from top to down), tb-rl (from top to down, from right to left). The first part of the name of the mode specifies the direction of the text in lines, the second — the direction of following of blocks within area.