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

10.28. hist.cgi: foHeader(): Set up a header

The child of a static-content element must be a block. The text-align-last='justify' attribute forces the content to stretch to the width of the page, so the content must have a leader to fill the extra space.

hist.cgi
# - - -   f o H e a d e r

def foHeader(s):
    '''Set up a running head in a given flow.

      [ s is a sox.Sox instance ->
          s  +:=  an open block element using lib.HEAD_FONT and
              stretched to full page width return that block element ]
    '''
    #-- 1
    return fo.block(s, lib.HEAD_FONT, fo.dash(textAlignLast='justify'))