lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distinguishing odd/even pages


From: Mark Summerfield
Subject: Distinguishing odd/even pages
Date: Mon, 16 Jan 2012 08:39:26 +0000

Hi,

I need to output different things depending on whether a page is odd or
even.

I've tried this but it doesn't work:

def @PlaceAdvert left mark right advert
{
    @PageParityOf{mark} @Case {
    Odd @Yield @PlaceOddAdvert{advert}
    Even @Yield @PlaceEvenAdvert{advert}
    }
}

@NP
@PageMark{advert.a}
advert.a @PlaceAdvert{"publisher/Informit_7_00x9_00_bw_ad.eps"}
@NP

The error is:
page.lout:102:1: replacing unknown @Case option advert.a by Odd
page.lout:102:10: value of right parameter of && is not a simple word

What am I doing wrong?

And is there a nicer way to do it anyway where I don't have to create my
own @PageMarks?

Thanks!

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Advanced Qt Programming" - ISBN 0321635906
            http://www.qtrac.eu/aqpbook.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]