Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Wolfgang Schuster

Am 02.05.2012 um 16:22 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> ... OK, thanks for the explanation.

You can look if this is useful for you (there is a example at the end of 
t-title.mkvi): https://bitbucket.org/wolfs/title

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] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... 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:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___

Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Wolfgang Schuster

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
___

Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Aditya Mahajan

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___
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] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Procházka Lukáš Ing . - Pontex s . r . o .

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  wrote:


On Wed, 2 May 2012 14:24:24 +0200
Wolfgang Schuster  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:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___


Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread 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?

2) Why testing the #1 argument in the case 2 doesn't work?

TIA.

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___


Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Alan BRASLAU
On Wed, 2 May 2012 14:24:24 +0200
Wolfgang Schuster  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
___

Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Wolfgang Schuster

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
___


Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Marco
On 2012-05-02 Procházka Lukáš Ing. - Pontex s. r. o.  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
___

[NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread 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?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t.mkiv
Description: Binary data


t.pdf
Description: Adobe PDF document
___
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
___