Next / Previous / Contents / Shipman's homepage

6.16. conditionalPageMasterReference()

conditionalPageMasterReference(s, masterRef, **kw)
s

The sox.Sox instance to which output is written.

masterRef

The name of the simple-page-master to be used for this page position.

pagePosition=P

Specifies on which page or pages of a sequence this simple page master is to be used. Values of P may be any of:

first Only on the first page of the sequence.
last Only on the last page of the sequence.
rest On pages that are neither the first nor the last of the sequence.
any On all the pages of the sequence.
oddOrEven=OE

Specifies when this simple page master is used with respect to whether it is a recto (odd-numbered) or verso (even-numbered) page. Possible values of OE:

odd Only on the recto pages.
even Only on the verso pages.
any On recto or verso pages.
blankOrNotBlank=B

Specifies whether this simple page master is to be used with respect to whether there is any content on the page, or whether it is blank. Values may be any of these:

blank Only on blank pages.
not-blank Only on nonblank pages.
any On blank or nonblank pages.

This function does not return a value; it writes a complete conditional-page-master-reference element. Here is an example:

conditionalPageMasterReference(s, 'odd-master', oddOrEven='even')

The resulting element:

    <conditional-page-master-reference master-reference='even-master'
        odd-or-even='even'/>