lout-users
[Top][All Lists]
Advanced

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

Re: odd or even page in margin note?


From: Jeff Kingston
Subject: Re: odd or even page in margin note?
Date: Wed, 12 Sep 2007 07:58:40 +1100

> I don't know how (or if) it is possible to know whether
> I am on an odd or even page.

I've looked carefully through the implementation, and at the
moment there is no way to tell.  @OuterNote knows which way
to shift its content based on a PostScript state variable,
which is of course not available to Lout.

I'll add this feature to my list of things to do for the
next release.  It will have to use the cross reference
database, like footnote numbers etc. - you can't tell,
when setting text on the first run, whether it will end
up on an odd or even page.

I might even do it by adding a "mod" operator - then you
could use @PageMark to get the page number, "mod" to
reduce it to 0 or 1, and there you are.  Hmmm, no this
won't work for introductory text.  I think the right way
is to add an operator similar to @PageOf but which returns
just "odd" or "even" instead of a page number.  This is
not a job for @SetContext by the way; it is about physical
not logical structure.

Excuse the ramblings.

Jeff


reply via email to

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