* Background on the 1st page only, page numbering from the 2nd page
@ 2012-05-02 7:45 Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 10:13 ` Marco
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-05-02 7:45 UTC (permalink / raw)
To: ConTeXt
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
Hello,
how to specify the page background for the first page only and how to start page numbering from the second page?
Here's my trial:
----
\defineoverlay[Bkg][{\externalfigure[cow]}]
\setupbackgrounds[paper][background=Bkg]
%\setuppagenumbering[state=2]
\starttext
\dorecurse{5}{\input knuth}
\stoptext
----
- The background is on all pages, so is the page numbering.
Any ideas?
Best regards,
Lukas
--
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
[-- Attachment #2: t.mkiv --]
[-- Type: application/octet-stream, Size: 176 bytes --]
\defineoverlay[Bkg][{\externalfigure[cow]}]
\setupbackgrounds[paper][background=Bkg]
%\setuppagenumbering[state=2]
\starttext
\dorecurse{5}{\input knuth}
\stoptext
[-- Attachment #3: t.pdf --]
[-- Type: application/pdf, Size: 16216 bytes --]
[-- Attachment #4: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 7:45 Background on the 1st page only, page numbering from the 2nd page Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-05-02 10:13 ` Marco
2012-05-02 12:24 ` Wolfgang Schuster
2012-05-02 13:56 ` Aditya Mahajan
2 siblings, 0 replies; 11+ messages in thread
From: Marco @ 2012-05-02 10:13 UTC (permalink / raw)
To: ntg-context
On 2012-05-02 Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz> wrote:
> how to specify the page background for the first page only and how to start
\definelayer [Bkg]
\setlayer [Bkg] {\externalfigure [cow]}
\setupbackgrounds [paper] [background=Bkg]
\starttext
\dorecurse{5}{\input knuth}
\stoptext
> page numbering from the second page?
It's \setuppagenumbering [state=stop|start], the state command
doesn't accept a number.
Marco
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 7:45 Background on the 1st page only, page numbering from the 2nd page Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 10:13 ` Marco
@ 2012-05-02 12:24 ` Wolfgang Schuster
2012-05-02 13:09 ` Procházka Lukáš Ing. - Pontex s. r. o.
` (2 more replies)
2012-05-02 13:56 ` Aditya Mahajan
2 siblings, 3 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2012-05-02 12:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 02.05.2012 um 09:45 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
> Hello,
>
> how to specify the page background for the first page only and how to start page numbering from the second page?
>
> Here's my trial:
>
> ----
> \defineoverlay[Bkg][{\externalfigure[cow]}]
> \setupbackgrounds[paper][background=Bkg]
>
> %\setuppagenumbering[state=2]
>
> \starttext
> \dorecurse{5}{\input knuth}
> \stoptext
> ----
>
> - The background is on all pages, so is the page numbering.
>
> Any ideas?
\defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}]
\setupbackgrounds[paper][background=Bkg]
\starttext \noheaderandfooterlines
\dorecurse{5}{\input knuth\par}
\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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 12:24 ` Wolfgang Schuster
@ 2012-05-02 13:09 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 13:22 ` Alan BRASLAU
2012-05-02 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
2 siblings, 0 replies; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-05-02 13:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
... Thanks to Marco and Wolfgang for the solution - both ideas work well.
I also added a test to print the page number, so the whole code is:
----
\defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}]
\setupbackgrounds[paper][background=Bkg]
\def\MyPageNumber#1{\doifelse{\pagenumber}{1}{}{\pagenumber}}
\setuppagenumbering[location={footer,middle},command=\MyPageNumber]
\starttext \noheaderandfooterlines
\dorecurse{5}{\input knuth\par}
\stoptext
----
Best regards,
Lukas
--
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 12:24 ` Wolfgang Schuster
2012-05-02 13:09 ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-05-02 13:22 ` Alan BRASLAU
2012-05-02 13:52 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
2 siblings, 1 reply; 11+ messages in thread
From: Alan BRASLAU @ 2012-05-02 13:22 UTC (permalink / raw)
To: ntg-context
On Wed, 2 May 2012 14:24:24 +0200
Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
>
> Am 02.05.2012 um 09:45 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
>
> > how to specify the page background for the first page only and how
> > to start page numbering from the second page?
>
> \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}]
>
> \setupbackgrounds[paper][background=Bkg]
>
> \starttext \noheaderandfooterlines
> \dorecurse{5}{\input knuth\par}
> \stoptext
If you want to create a title page (which may not be your intention),
why not simply
\definemakeup[titlepage][align=middle]
\defineoverlay[COW][\externalfigure[cow]]
\starttext
\setupbackgrounds[page][background=COW]
\starttitlepagemakeup
A title
\stoptitlepagemakeup
\setupbackgrounds[page][background=]
\setuppagenumbering[alternative=doublesided,way=bytext]
\dorecurse{5}{\input knuth\par}
\stoptext
Question (for Wolfgang):
Why did you use "paper" rather than "page" (what is the difference)?
Alan
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 13:22 ` Alan BRASLAU
@ 2012-05-02 13:52 ` Procházka Lukáš Ing. - Pontex s. r. o.
0 siblings, 0 replies; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-05-02 13:52 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks for the code -
- actually, I'm not trying to create a "typical book" title page but just a kind of "cover" page.
But I'll keep your suggestion in mind, I may use it in the future.
Thanks anyway.
Best regards,
Lukas
On Wed, 02 May 2012 15:22:01 +0200, Alan BRASLAU <alan.braslau@cea.fr> wrote:
> On Wed, 2 May 2012 14:24:24 +0200
> Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
>
>>
>> Am 02.05.2012 um 09:45 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
>>
>> > how to specify the page background for the first page only and how
>> > to start page numbering from the second page?
>>
>> \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}]
>>
>> \setupbackgrounds[paper][background=Bkg]
>>
>> \starttext \noheaderandfooterlines
>> \dorecurse{5}{\input knuth\par}
>> \stoptext
>
> If you want to create a title page (which may not be your intention),
> why not simply
>
> \definemakeup[titlepage][align=middle]
> \defineoverlay[COW][\externalfigure[cow]]
>
> \starttext
> \setupbackgrounds[page][background=COW]
> \starttitlepagemakeup
> A title
> \stoptitlepagemakeup
> \setupbackgrounds[page][background=]
> \setuppagenumbering[alternative=doublesided,way=bytext]
> \dorecurse{5}{\input knuth\par}
> \stoptext
--
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 12:24 ` Wolfgang Schuster
2012-05-02 13:09 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 13:22 ` Alan BRASLAU
@ 2012-05-02 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 14:19 ` Wolfgang Schuster
2 siblings, 1 reply; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-05-02 13:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
... One more question. Let's have three cases - some of them hide the page number on the first page, some of them don't.
The question is - why:
---- 1 - OK, no page number on page 1
\def\MyPageNumber#1{\doifelse{\pagenumber}{1}{}{\pagenumber}} % Testing \pagenumber
\setuppagenumbering[location={footer,middle},command=\MyPageNumber]
\starttext %\noheaderandfooterlines % COMMAND NOT USED
\dorecurse{5}{\input knuth\par}
\stoptext
----
---- 2 - BAD, page number IS on page 1
\def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of \pagenumber
\setuppagenumbering[location={footer,middle},command=\MyPageNumber]
\starttext %\noheaderandfooterlines % COMMAND NOT USED
\dorecurse{5}{\input knuth\par}
\stoptext
----
---- 3 - OK, no page number on page 1
\def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of \pagenumber
\setuppagenumbering[location={footer,middle},command=\MyPageNumber]
\starttext \noheaderandfooterlines % COMMAND IN USE
\dorecurse{5}{\input knuth\par}
\stoptext
----
So -
1) What exactly does \noheaderandfooterlines do?
2) Why testing the #1 argument in the case 2 doesn't work?
TIA.
Lukas
--
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-05-02 14:19 ` Wolfgang Schuster
2012-05-02 14:22 ` Procházka Lukáš Ing. - Pontex s. r. o.
0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2012-05-02 14:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 02.05.2012 um 15:49 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
> ... One more question. Let's have three cases - some of them hide the page number on the first page, some of them don't.
>
> The question is - why:
>
> ---- 1 - OK, no page number on page 1
> \def\MyPageNumber#1{\doifelse{\pagenumber}{1}{}{\pagenumber}} % Testing \pagenumber
>
> \setuppagenumbering[location={footer,middle},command=\MyPageNumber]
>
> \starttext %\noheaderandfooterlines % COMMAND NOT USED
> \dorecurse{5}{\input knuth\par}
> \stoptext
> ----
>
> ---- 2 - BAD, page number IS on page 1
> \def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of \pagenumber
>
> \setuppagenumbering[location={footer,middle},command=\MyPageNumber]
>
> \starttext %\noheaderandfooterlines % COMMAND NOT USED
> \dorecurse{5}{\input knuth\par}
> \stoptext
> ----
>
> ---- 3 - OK, no page number on page 1
> \def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of \pagenumber
>
> \setuppagenumbering[location={footer,middle},command=\MyPageNumber]
>
> \starttext \noheaderandfooterlines % COMMAND IN USE
> \dorecurse{5}{\input knuth\par}
> \stoptext
> ----
>
> So -
>
> 1) What exactly does \noheaderandfooterlines do?
It disables the header/footer on the page where \noheaderandfooterlines was inserted.
> 2) Why testing the #1 argument in the case 2 doesn't work?
When you use “\pagenumber” you check the numeric value of the counter but when you check
against “#1” you check again a formatted version of the pagenumber which can be colored or
or even be a roman numeral which you have set with the conversion key.
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] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 14:19 ` Wolfgang Schuster
@ 2012-05-02 14:22 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 14:34 ` Wolfgang Schuster
0 siblings, 1 reply; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-05-02 14:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
... OK, thanks for the explanation.
Best regards,
Lukas
>> 1) What exactly does \noheaderandfooterlines do?
>
> It disables the header/footer on the page where \noheaderandfooterlines was inserted.
>
>> 2) Why testing the #1 argument in the case 2 doesn't work?
>
> When you use “\pagenumber” you check the numeric value of the counter but when you check
> against “#1” you check again a formatted version of the pagenumber which can be colored or
> or even be a roman numeral which you have set with the conversion key.
>
> Wolfgang
--
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Background on the 1st page only, page numbering from the 2nd page
2012-05-02 7:45 Background on the 1st page only, page numbering from the 2nd page Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 10:13 ` Marco
2012-05-02 12:24 ` Wolfgang Schuster
@ 2012-05-02 13:56 ` Aditya Mahajan
2 siblings, 0 replies; 11+ messages in thread
From: Aditya Mahajan @ 2012-05-02 13:56 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 317 bytes --]
On Wed, 2 May 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
> Hello,
>
> how to specify the page background for the first page only
Also see my replies in
http://archive.contextgarden.net/thread/20120419.180814.c604f461.en.html#20120419.180814.c604f461
on how to achieve this using layers.
Aditya
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-05-02 14:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02 7:45 Background on the 1st page only, page numbering from the 2nd page Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 10:13 ` Marco
2012-05-02 12:24 ` Wolfgang Schuster
2012-05-02 13:09 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 13:22 ` Alan BRASLAU
2012-05-02 13:52 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 14:19 ` Wolfgang Schuster
2012-05-02 14:22 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-05-02 14:34 ` Wolfgang Schuster
2012-05-02 13:56 ` Aditya Mahajan
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).