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

39.2. SpacerCell.fo()

Render an empty table-cell element containing a block element, containing a non-breaking space so it won't look empty. See Section 13.11.14, “FO_SPACER_CELL_ATTRS for styling; the optional kw dictionary may contain additional styling attributes like thickened borders.

cbchistlib.py
# - - -    S p a c e r C e l l . f o

    def fo(self, s, **kw):
        '''Make an XSL-FO empty cell.
        '''
        #-- 1
        # [ s  +:=  an open table-cell element styled with 
        #           FO_SPACER_CELL_ATTRS and kw
        #   cell  :=  that element ]
        cell = s.start("table-cell", FO_SPACER_CELL_ATTRS, kw)

        #-- 2
        # [ s  +:=  a block element containing a   character ]
        s.leaf("block", NON_BREAKING_SPACE)

        #-- 3
        # [ s  +:=  cell, closed ]
        cell.end()