ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to know in which page I'm?
@ 2012-08-20 20:41 Xan
  2012-08-20 21:04 ` Peter Münster
  2012-08-20 21:09 ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Xan @ 2012-08-20 20:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I want to print a message depending if the page is even or odd. In 
pseudocode:

\if \inpage.\iseven {
   This page is even
}
\else {
   This page is odd
}

How can I do that in ConTeXt?

Thanks in advance,
Xan.

PS: Please, CCme
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to know in which page I'm?
  2012-08-20 20:41 How to know in which page I'm? Xan
@ 2012-08-20 21:04 ` Peter Münster
  2012-08-20 21:09 ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Münster @ 2012-08-20 21:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Aug 20 2012, Xan wrote:

> I want to print a message depending if the page is even or odd. In pseudocode:
>
> \if \inpage.\iseven {
>   This page is even
> }
> \else {
>   This page is odd
> }
>
> How can I do that in ConTeXt?

\signalrightpage\doifrightpageelse{odd page}{even page}

-- 
           Peter
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to know in which page I'm?
  2012-08-20 20:41 How to know in which page I'm? Xan
  2012-08-20 21:04 ` Peter Münster
@ 2012-08-20 21:09 ` Wolfgang Schuster
  2012-08-20 23:56   ` john Culleton
  2012-08-21  7:11   ` Xan
  1 sibling, 2 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2012-08-20 21:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Xan


Am 20.08.2012 um 22:41 schrieb Xan <dxpublica@telefonica.net>:

> Hi,
> 
> I want to print a message depending if the page is even or odd. In pseudocode:
> 
> \if \inpage.\iseven {
>  This page is even
> }
> \else {
>  This page is odd
> }
> 
> How can I do that in ConTeXt?

http://www.ntg.nl/pipermail/ntg-context/2012/067632.html

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to know in which page I'm?
  2012-08-20 21:09 ` Wolfgang Schuster
@ 2012-08-20 23:56   ` john Culleton
  2012-08-21  6:31     ` Wolfgang Schuster
  2012-08-21  7:11   ` Xan
  1 sibling, 1 reply; 6+ messages in thread
From: john Culleton @ 2012-08-20 23:56 UTC (permalink / raw)
  To: ntg-context

On Mon, 20 Aug 2012 23:09:11 +0200
Wolfgang Schuster <wolfgang.schuster@gmail.com> wrote:

> 
> Am 20.08.2012 um 22:41 schrieb Xan <dxpublica@telefonica.net>:
> 
> > Hi,
> > 
> > I want to print a message depending if the page is even or odd. In
> > pseudocode:
> > 
> > \if \inpage.\iseven {
> >  This page is even
> > }
> > \else {
> >  This page is odd
> > }
> > 
> > How can I do that in ConTeXt?
> 
> http://www.ntg.nl/pipermail/ntg-context/2012/067632.html
> 
> Wolfgang


Will the plain text way still work?
\ifodd\pageno foo \else bar \fi
-- 
John Culleton
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to know in which page I'm?
  2012-08-20 23:56   ` john Culleton
@ 2012-08-21  6:31     ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2012-08-21  6:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.08.2012 um 01:56 schrieb john Culleton <John@wexfordpress.com>:

> On Mon, 20 Aug 2012 23:09:11 +0200
> Wolfgang Schuster <wolfgang.schuster@gmail.com> wrote:
> 
>> 
>> Am 20.08.2012 um 22:41 schrieb Xan <dxpublica@telefonica.net>:
>> 
>>> Hi,
>>> 
>>> I want to print a message depending if the page is even or odd. In
>>> pseudocode:
>>> 
>>> \if \inpage.\iseven {
>>> This page is even
>>> }
>>> \else {
>>> This page is odd
>>> }
>>> 
>>> How can I do that in ConTeXt?
>> 
>> http://www.ntg.nl/pipermail/ntg-context/2012/067632.html
>> 
>> Wolfgang
> 
> 
> Will the plain text way still work?
> \ifodd\pageno foo \else bar \fi

This works only correct when used used in the page header or footer texts which are added after the page is finished and then you can use context’s \doifoddpageelse command. When used in the running text the test can fail when you have a text which ends at the top of the page which was processed by tex when it was on the previous page and the output was moved to the next page because there wasn’t enough space.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to know in which page I'm?
  2012-08-20 21:09 ` Wolfgang Schuster
  2012-08-20 23:56   ` john Culleton
@ 2012-08-21  7:11   ` Xan
  1 sibling, 0 replies; 6+ messages in thread
From: Xan @ 2012-08-21  7:11 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

Al 20/08/12 23:09, En/na Wolfgang Schuster ha escrit:
> Am 20.08.2012 um 22:41 schrieb Xan <dxpublica@telefonica.net>:
>
>> Hi,
>>
>> I want to print a message depending if the page is even or odd. In pseudocode:
>>
>> \if \inpage.\iseven {
>>   This page is even
>> }
>> \else {
>>   This page is odd
>> }
>>
>> How can I do that in ConTeXt?
> http://www.ntg.nl/pipermail/ntg-context/2012/067632.html
>
> Wolfgang
Thank yoy very much, Wolfgang.

Xan.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-21  7:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20 20:41 How to know in which page I'm? Xan
2012-08-20 21:04 ` Peter Münster
2012-08-20 21:09 ` Wolfgang Schuster
2012-08-20 23:56   ` john Culleton
2012-08-21  6:31     ` Wolfgang Schuster
2012-08-21  7:11   ` Xan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).