even odd page condition
Hello, is it possible to find if you’re on an odd or an even page in context? I want to do something like this: \def\makemytext#1{ %if page is even \rightaligned{#1} %else \leftaligned{#1} } Thanks for the answer. Pavel Dohnal
Am 06.06.2012 um 17:13 schrieb Pavel Dohnal:
Hello, is it possible to find if you’re on an odd or an even page in context? I want to do something like this:
\def\makemytext#1{ %if page is even \rightaligned{#1} %else \leftaligned{#1} }
\defineframed[noframed][frame=off,width=broad,align=outer] \setuppagenumbering[alternative=doublesided] \starttext \noframed{Left or right?} \page \noframed{Left or right?} \stoptext or \define[1]\AlignOuter {\doifoddpageelse\rightaligned\leftaligned{#1}} \starttext \AlignOuter{Left or right?} \page \AlignOuter{Left or right?} \stoptext Wolfgang
On 6-6-2012 17:40, Aditya Mahajan wrote:
On Wed, 6 Jun 2012, Wolfgang Schuster wrote:
\define[1]\AlignOuter {\doifoddpageelse\rightaligned\leftaligned{#1}}
you can simplify this to:
\define\AlignOuter {\doifoddpageelse\rightaligned\leftaligned}
there's also the pair: \signalrightpage \doifrightpageelse where the signal generates a node Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Pavel Dohnal
-
Wolfgang Schuster