Next / Previous / Contents / Shipman's homepage

18. repeatMaster: Construct a repeatable page master

This function creates a new page-sequence-master child to be appended to the layout-master-set after any simple-page-master elements. See Section 4.12, “repeatMaster(): Container for multiple alternative page masters”.

This package does not currently implement the single-page-master or repeatable-page-master-reference features. If all the pages are the same, you don't need this master. If they differ according to position or page number or whether they're blank or not, you'll need the full-featured element, repeatable-page-master-alternatives.
# - - -   r e p e a t M a s t e r

def repeatMaster(masterRef, *condList):
    '''Set up a set of page master alternatives.

      [ (masterName is the name of a new page-sequence-master) and
        (the remaining arguments are conditional-page-master-reference
        elements) ->
          return a new page-sequence-master named masterName
          containing a repeatable-page-master-alternatives child
          whose children are condList[0], condList[1], etc. ]
    return E("page-sequence-master", dash(masterName=masterRef),