Re: [NTG-context] even odd page condition

2012-06-06 Thread Wolfgang Schuster

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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] even odd page condition

2012-06-06 Thread Aditya Mahajan

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}

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] even odd page condition

2012-06-06 Thread Hans Hagen

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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___