Next / Previous / Contents / TCC Help System / NM Tech homepage

13.11. XSL-FO attributes

Constants in this section are attribute dictionaries used to style XSL-FO elements.

13.11.1. Rule widths for FO

Rules that are thick, medium, and thin, respectively.

cbchistlib.py
FO_THICK_DIM = '3pt'
FO_MED_DIM = '1.5pt'
FO_THIN_DIM = '0.5pt'

13.11.2. Borders for FO

Borders of the three weights.

cbchistlib.py
FO_THICK_BORDER = "%s solid black" % FO_THICK_DIM
FO_MED_BORDER = "%s solid black" % FO_MED_DIM
FO_THIN_BORDER = "%s solid black" % FO_THIN_DIM

13.11.3. FO_ALIGN_LEFT

XSL-FO attribute to align text to the left.

cbchistlib.py
FO_ALIGN_LEFT = fo.dash(textAlign='left')

13.11.4. FO_ALIGN_CENTER

XSL-FO attribute to align text to the center.

cbchistlib.py
FO_ALIGN_CENTER = fo.dash(textAlign='center')

13.11.5. FO_ALIGN_RIGHT

XSL-FO attribute to align text to the right.

cbchistlib.py
FO_ALIGN_RIGHT = fo.dash(textAlign='right')

13.11.6. FO_STD_PADDING

Internal padding for all XSL-FO table elements.

cbchistlib.py
FO_STD_PADDING = dict(padding='2pt')

13.11.7. FO_TABLE_ATTRS

Attributes of the fo:table element. For a discussion of the width allocation, see Section 13.10.6, “ODD_DIMS.

cbchistlib.py
FO_TABLE_ATTRS = fo.dash(borderCollapse='collapse', marginTop='2pc',
     border=FO_THICK_BORDER, fontSize='9pt', fontFamily=MAIN_FAMILY,
     width='44pc')

13.11.8. FO_CENSUS_ROW_LABEL_ATTRS

XSL-FO attributes for a census row label.

cbchistlib.py
FO_CENSUS_ROW_LABEL_ATTRS = fo.dash(border=FO_MED_BORDER,
    borderBottomWidth=FO_THICK_DIM,
    borderTopWidth=FO_THICK_DIM, **FO_STD_PADDING)

13.11.9. FO_HEAD_ROW_LABEL_ATTRS

Attributes of a HeadRowLabel as an XSL-FO table-cell element. Same as Section 13.11.8, “FO_CENSUS_ROW_LABEL_ATTRS except for the addition of a distinctive background color.

cbchistlib.py
FO_HEAD_ROW_LABEL_ATTRS = dict(FO_CENSUS_ROW_LABEL_ATTRS)
FO_HEAD_ROW_LABEL_ATTRS.update(fo.dash(borderBottomWidth=FO_THICK_DIM,
    backgroundColor=HEAD_CELL_COLOR))

13.11.10. FO_CENSUS_CELL_ATTRS

XSL-FO attributes of a CensusCell.

cbchistlib.py
FO_CENSUS_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER,
                                **FO_STD_PADDING)

13.11.11. FO_DETAIL_COL_WIDE

Width of a detail column in the PDF rendering.

cbchistlib.py
FO_DETAIL_COL_WIDE = fo.dash(columnWidth='42pt')

13.11.12. FO_TABLE_BODY_ATTRS

Attributes of the table-body element. The actual value will look something like “{border: '3pt solid black'}”.

cbchistlib.py
FO_TABLE_BODY_ATTRS = fo.dash(border="%s solid black" % FO_THICK_DIM)

13.11.13. FO_LABEL_CELL_ATTRS

Attributes of a LabelCell as an XSL-FO table-cell. The 8-point type is necessary to fit in eight-character year IDs such as 101-NMBD.

cbchistlib.py
FO_LABEL_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER,
    fontSize='8pt', backgroundColor=HEAD_CELL_COLOR, **FO_STD_PADDING)

13.11.14. FO_SPACER_CELL_ATTRS

Unused cells in physical rows are colored a middle gray.

cbchistlib.py
FO_SPACER_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER,
    backgroundColor=MIDDLE_GRAY)

13.11.15. FO_PH_CELL_ATTRS

XSL-FO attributes of a PartyHoursCell.

cbchistlib.py
FO_PH_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER, fontSize='8pt',
    backgroundColor=HEAD_CELL_COLOR, **FO_STD_PADDING)

13.11.16. FO_STAT_CELL_ATTRS

XSL-FO attributes of a StatCell.

cbchistlib.py
FO_STAT_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER,
    fontStyle='italic', backgroundColor=STAT_CELL_COLOR, **FO_STD_PADDING)