lout-users
[Top][All Lists]
Advanced

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

Odd and even pages


From: Jeff Kingston
Subject: Odd and even pages
Date: Thu, 29 Mar 2001 09:36:50 +1100

> Finally one more question. What is the best way to produce a symbol
> which does two different things depending on whether it is on an odd
> page or even page?

It does depend, but one way would be to modify the @PageList symbols
in the standard packages so that they insert cross reference targets
at the top of each page, containing the word Odd on odd pages and
Even on even pages.  Then you could write code like this:

    { @MyTarget&&preceding @Open { val } } @Case {
        Odd @Yield { whatever you want to happen on odd pages }
        Even @Yield { whatever you want to happen on even pages }
    }

The only catch is that you'll need to run Lout twice for this to
resolve itself.

> More importantly, if it is possible, will this symbol be prone
> to the problem similar to TeX, where the first several lines on
> the next page think they still belong to the previous page
> because TeX always builds some extra lines before it produces
> the current page?

No, the solution I have outlined will not be prone to any such
problem; but the cost is that you have to run Lout twice, as I
said before.

Jeff

ps There are already a couple of symbols, i.e. @MarginNote, that
behave differently on odd or even pages, but from memory I
implemented the interesting parts of these in PostScript.

pps If you are looking for different page layouts on odd and
even pages, there is already a signficant amount of this kind
of thing in the standard packages.


reply via email to

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