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

22.6. PriIndex.foMain(): Generate a primary index as XSL-FO

cbchistlib.py
# - - -   P r i I n d e x . f o M a i n

    def foMain(self, s):
        '''Generate a main entry as XSL-FO.
        '''

A block element wraps the entire entry.

cbchistlib.py
        #-- 1
        # [ s  +:=  an open block element
        #   b  :=  that element ]
        b = fo.block(s, BODY_FONT)

The circle name and region list are wrapped in an inline element to apply boldface font to it.

cbchistlib.py
        #-- 2
        # [ s  +:=  an inline using BOLD_FONT and containing
        #       self.circle's name, regions, and coordinates ]
        s.leaf("inline", BOLD_FONT, self.circle.cir_name,
               ", ", self.circle.allRegions(),
               latLonFormat(self.circle.lat, self.circle.lon))

        #-- 3
        # [ s  +:=  self.circle's year list ]
        s.write(yearBrackets(self.effortList))

        #-- 4
        # [ s  +:=  b, closed ]
        b.end()