* Odd/even page test
@ 2018-10-16 14:25 Procházka Lukáš Ing.
2018-10-16 15:58 ` Pablo Rodriguez
0 siblings, 1 reply; 3+ messages in thread
From: Procházka Lukáš Ing. @ 2018-10-16 14:25 UTC (permalink / raw)
To: ConTeXt
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
Hello,
I need to check whether even or odd page is to be printed. I'm starting with the following simple code:
----
\def\T{\ifodd\pagenumber ODD\else EVEN\fi}
\starttext
\dorecurse{2}{\T\page}
\startTEXpage[width=50mm,height=150mm]\stopTEXpage
\dorecurse{2}{\T\page}
\stoptext
----
Why "user defined page" #3 is skipped in page numbering, so headers shown are:
1 - 2 - (nothing) - 3 - 4 and "ODD"/"EVEN" and text is "ODD" - "EVEN" - (nothing) - "ODD" - "EVEN"
instead of:
1 - 2 - (nothing) - 4 - 5 and "ODD"/"EVEN" and text be "ODD" - "EVEN" - (nothing) - "EVEN" - "ODD"?
TIA.
Best regards,
Lukas
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS: nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4
Mob.: +420 702 033 396
[-- Attachment #2: t.mkiv --]
[-- Type: application/octet-stream, Size: 175 bytes --]
\def\T{\ifodd\pagenumber ODD\else EVEN\fi}
\starttext
\dorecurse{2}{\T\page}
\startTEXpage[width=50mm,height=150mm]\stopTEXpage
\dorecurse{2}{\T\page}
\stoptext
[-- Attachment #3: t.pdf --]
[-- Type: application/pdf, Size: 6442 bytes --]
[-- Attachment #4: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Odd/even page test
2018-10-16 14:25 Odd/even page test Procházka Lukáš Ing.
@ 2018-10-16 15:58 ` Pablo Rodriguez
2018-10-17 6:31 ` Procházka Lukáš Ing.
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2018-10-16 15:58 UTC (permalink / raw)
To: ntg-context
On 10/16/18 4:25 PM, Procházka Lukáš Ing. wrote:
> Hello,
>
> I need to check whether even or odd page is to be printed. I'm starting with the following simple code:
>
> ----
> \def\T{\ifodd\pagenumber ODD\else EVEN\fi}
>
> \starttext
> \dorecurse{2}{\T\page}
> \startTEXpage[width=50mm,height=150mm]\stopTEXpage
> \dorecurse{2}{\T\page}
> \stoptext
> ----
Hi Lukáš,
both makeups and fitting pages aren’t numbered by default.
Either you add this to the preamble:
\setupfittingpage[TEXpage][pagestate=start]
or you add the option "pagestate=start" to \startTEXpage.
I hope it helps,
Pablo
> Why "user defined page" #3 is skipped in page numbering, so headers shown are:
> 1 - 2 - (nothing) - 3 - 4 and "ODD"/"EVEN" and text is "ODD" - "EVEN" - (nothing) - "ODD" - "EVEN"
> instead of:
> 1 - 2 - (nothing) - 4 - 5 and "ODD"/"EVEN" and text be "ODD" - "EVEN" - (nothing) - "EVEN" - "ODD"?
>
> TIA.
>
> Best regards,
>
> Lukas
>
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Odd/even page test
2018-10-16 15:58 ` Pablo Rodriguez
@ 2018-10-17 6:31 ` Procházka Lukáš Ing.
0 siblings, 0 replies; 3+ messages in thread
From: Procházka Lukáš Ing. @ 2018-10-17 6:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello Pablo,
that's it, thank you!
Lukas
On Tue, 16 Oct 2018 17:58:04 +0200, Pablo Rodriguez <oinos@gmx.es> wrote:
> On 10/16/18 4:25 PM, Procházka Lukáš Ing. wrote:
>> Hello,
>>
>> I need to check whether even or odd page is to be printed. I'm starting with the following simple code:
>>
>> ----
>> \def\T{\ifodd\pagenumber ODD\else EVEN\fi}
>>
>> \starttext
>> \dorecurse{2}{\T\page}
>> \startTEXpage[width=50mm,height=150mm]\stopTEXpage
>> \dorecurse{2}{\T\page}
>> \stoptext
>> ----
>
> Hi Lukáš,
>
> both makeups and fitting pages aren’t numbered by default.
>
> Either you add this to the preamble:
>
> \setupfittingpage[TEXpage][pagestate=start]
>
> or you add the option "pagestate=start" to \startTEXpage.
>
> I hope it helps,
>
> Pablo
>
>
>> Why "user defined page" #3 is skipped in page numbering, so headers shown are:
>> 1 - 2 - (nothing) - 3 - 4 and "ODD"/"EVEN" and text is "ODD" - "EVEN" - (nothing) - "ODD" - "EVEN"
>> instead of:
>> 1 - 2 - (nothing) - 4 - 5 and "ODD"/"EVEN" and text be "ODD" - "EVEN" - (nothing) - "EVEN" - "ODD"?
>>
>> TIA.
>>
>> Best regards,
>>
>> Lukas
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS: nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4
Mob.: +420 702 033 396
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-17 6:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 14:25 Odd/even page test Procházka Lukáš Ing.
2018-10-16 15:58 ` Pablo Rodriguez
2018-10-17 6:31 ` Procházka Lukáš Ing.
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).