Constants in this section are attribute dictionaries used to style XSL-FO elements.
Rules that are thick, medium, and thin, respectively.
FO_THICK_DIM = '3pt' FO_MED_DIM = '1.5pt' FO_THIN_DIM = '0.5pt'
Borders of the three weights.
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
XSL-FO attribute to align text to the left.
FO_ALIGN_LEFT = fo.dash(textAlign='left')
XSL-FO attribute to align text to the center.
FO_ALIGN_CENTER = fo.dash(textAlign='center')
XSL-FO attribute to align text to the right.
FO_ALIGN_RIGHT = fo.dash(textAlign='right')
Internal padding for all XSL-FO table elements.
FO_STD_PADDING = dict(padding='2pt')
Attributes of the fo:table element. For a
discussion of the width allocation, see Section 13.10.6, “ODD_DIMS”.
FO_TABLE_ATTRS = fo.dash(borderCollapse='collapse', marginTop='2pc',
border=FO_THICK_BORDER, fontSize='9pt', fontFamily=MAIN_FAMILY,
width='44pc')
XSL-FO attributes for a census row label.
FO_CENSUS_ROW_LABEL_ATTRS = fo.dash(border=FO_MED_BORDER,
borderBottomWidth=FO_THICK_DIM,
borderTopWidth=FO_THICK_DIM, **FO_STD_PADDING)
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.
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))
XSL-FO attributes of a CensusCell.
FO_CENSUS_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER,
**FO_STD_PADDING)
Width of a detail column in the PDF rendering.
FO_DETAIL_COL_WIDE = fo.dash(columnWidth='42pt')
Attributes of the table-body element. The
actual value will look something like “{border: '3pt solid black'}”.
FO_TABLE_BODY_ATTRS = fo.dash(border="%s solid black" % FO_THICK_DIM)
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.
FO_LABEL_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER,
fontSize='8pt', backgroundColor=HEAD_CELL_COLOR, **FO_STD_PADDING)
Unused cells in physical rows are colored a middle gray.
FO_SPACER_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER,
backgroundColor=MIDDLE_GRAY)
XSL-FO attributes of a PartyHoursCell.
FO_PH_CELL_ATTRS = fo.dash(border=FO_THIN_BORDER, fontSize='8pt',
backgroundColor=HEAD_CELL_COLOR, **FO_STD_PADDING)