[NTG-context] currentreferencerealpage wrong (how to detect even/odd pages?)

Wolfgang Schuster schuster.wolfgang at gmail.com
Sun Mar 15 17:51:44 CET 2015

> Am 15.03.2015 um 16:40 schrieb Harald Koenig <koenig at tat.physik.uni-tuebingen.de>:
> Hi,
> right now I use \currentreferencerealpage to detect if I'm on an even or odd page
> (because my picture placement rules depend on it) like this:
> \newcount\bildpage
> \bildpage=1
> % ...
> \def\bild#1...{%
>     {\global\bildpage=\realpageno}%
>     \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
>     % ...
>     \if o\eo odd...\else even...\fi
>    \message{>> bildpage=\the\bildpage \space eo=\eo \space currentreferencerealpage=\currentreferencerealpage \space << }%
> }
> but now I notice that for some pages/pictures the value of \currentreferencerealpage
> is not correct (only for the first picture on a new page?):-(

To test whether you’re on a left or right page you can use the \signalrightpage and \doifrightpageelse commands.



   \doifrightpageelse{Right page}{Left page}



More information about the ntg-context mailing list