Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-17 Thread Taco Hoekwater
Hi,

> On 17 Jan 2019, at 12:27, Jan U. Hasecke  wrote:
> 
> Am 14.01.19 um 19:25 schrieb Wolfgang Schuster:
> 
>> 
>>> I'll try to wikify this later this week.
> 
> I wikified it here:
> https://wiki.contextgarden.net/Command/setuphead
> 
> Is there a way to suppress the context output?
> The output does not show the effect.

I patched your example a little so that it now does show the effect.

Best wishes,
Taco





___
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
___

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-17 Thread Jan U. Hasecke
Am 14.01.19 um 19:25 schrieb Wolfgang Schuster:

> 
>> I'll try to wikify this later this week.

I wikified it here:
https://wiki.contextgarden.net/Command/setuphead

Is there a way to suppress the context output?
The output does not show the effect.

juh
___
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
___

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-14 Thread Wolfgang Schuster

Jan U. Hasecke schrieb am 14.01.19 um 08:39:


Am 13.01.19 um 16:56 schrieb Wolfgang Schuster:


Here is a example which shows how you can change the background color
of a empty page before the chapter title.

\setuppagenumbering
   [alternative=doublesided]

\startsetups [chapter:before]
   \doifoddpageelse
     {}
     {\pushbackground[page]
  \setupbackgrounds[page][background=color,backgroundcolor=black]
  \page[empty,right]
  \popbackground}
\stopsetups

\setuphead
   [chapter]
   [page=yes,
    before=\directsetup{chapter:before}]

\starttext

\startchapter[title={Knuth}]
\dorecurse{10}{\samplefile{knuth}}
\stopchapter

\startchapter[title={Zapf}]
\dorecurse{10}{\samplefile{zapf}}
\stopchapter

\startchapter[title={Ward}]
\dorecurse{10}{\samplefile{ward}}
\stopchapter

\stoptext


Thanks a lot Wolfgang!

This was just the thing I was looking for. These setups seems to be the
golden bullet in ConTeXt but I often have difficulties to understand the
mechanism.


If you mean the setups-environment with setups you’re wrong because this 
is only a alternative way to a command (e.g. \define\mycommand{...}).


The main point is that you finish the page before the section title and 
check on the new page whether you’re on a odd or even numbered page.


When the test tells you that you’re on a even numbered page you know 
there is a empty left page before the chapter which can be used to add 
something special.


Below is a simplified example for the method.

\starttext

\dorecurse{10}{\samplefile{knuth}}

\page

\doifoddpageelse
  {}
  {\pushbackground[page]
   \setupbackgrounds[page][background=color,backgroundcolor=red]
   \page[empty]
   \popbackground}

\dorecurse{10}{\samplefile{zapf}}

\stoptext


I'll try to wikify this later this week.

The push-pop-background pair is mentionend in x-setups-overview together
with some other push-pop-pairs or push single commands. Are they
documented somewhere?


Most of these push/pop commands are used for internal stuff (or 
sometimes in styles) which means there is no documentation for them.


The purpose of them is to store the state of a command (e.g. the page 
background) before you change its values, afterwards you can just revert 
back to the previously saved state.


As these commands are no real environments they are listed as separate 
commands but it’s possible I will change this.


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-13 Thread Jan U. Hasecke

Am 13.01.19 um 16:56 schrieb Wolfgang Schuster:

> Here is a example which shows how you can change the background color
> of a empty page before the chapter title.
> 
> \setuppagenumbering
>   [alternative=doublesided]
> 
> \startsetups [chapter:before]
>   \doifoddpageelse
>     {}
>     {\pushbackground[page]
>  \setupbackgrounds[page][background=color,backgroundcolor=black]
>  \page[empty,right]
>  \popbackground}
> \stopsetups
> 
> \setuphead
>   [chapter]
>   [page=yes,
>    before=\directsetup{chapter:before}]
> 
> \starttext
> 
> \startchapter[title={Knuth}]
> \dorecurse{10}{\samplefile{knuth}}
> \stopchapter
> 
> \startchapter[title={Zapf}]
> \dorecurse{10}{\samplefile{zapf}}
> \stopchapter
> 
> \startchapter[title={Ward}]
> \dorecurse{10}{\samplefile{ward}}
> \stopchapter
> 
> \stoptext

Thanks a lot Wolfgang!

This was just the thing I was looking for. These setups seems to be the
golden bullet in ConTeXt but I often have difficulties to understand the
mechanism.

I'll try to wikify this later this week.

The push-pop-background pair is mentionend in x-setups-overview together
with some other push-pop-pairs or push single commands. Are they
documented somewhere?

juh

___
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
___

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-13 Thread Wolfgang Schuster

Jan U. Hasecke schrieb am 12.01.19 um 22:08:

Hi Aditya,

Am 12.01.19 um 20:11 schrieb Aditya Mahajan:

On Sat, 12 Jan 2019, Jan U. Hasecke wrote:


Hi all,

in my document \startchapter and \starttitle starts a new chapter on the
right (odd) page. So sometimes, there is a blank even page just before a
new chapter.

I would like to manipulate this blank even page.

There are several things I would like to do, eg. having no headers and
footers, setting the background color to a named color, placing an image
or some graphics on the page.

Is there a way to define such a page, name it and call it in
\startchapter so that it is placed on the left side.

See https://tex.stackexchange.com/q/457428/323

Thanks a lot, but I wasn't looking for a way to just delete page numbers
but to style the empty page in arbitrary ways.

Maybe it is better to do this manually.

I would let chapter open on even pages too and just insert a styled page
by hand.


Here is a example which shows how you can change the background color
of a empty page before the chapter title.

\setuppagenumbering
  [alternative=doublesided]

\startsetups [chapter:before]
  \doifoddpageelse
    {}
    {\pushbackground[page]
 \setupbackgrounds[page][background=color,backgroundcolor=black]
 \page[empty,right]
 \popbackground}
\stopsetups

\setuphead
  [chapter]
  [page=yes,
   before=\directsetup{chapter:before}]

\starttext

\startchapter[title={Knuth}]
\dorecurse{10}{\samplefile{knuth}}
\stopchapter

\startchapter[title={Zapf}]
\dorecurse{10}{\samplefile{zapf}}
\stopchapter

\startchapter[title={Ward}]
\dorecurse{10}{\samplefile{ward}}
\stopchapter

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-12 Thread Rik Kabel

On 1/12/2019 16:08, Jan U. Hasecke wrote:

Hi Aditya,

Am 12.01.19 um 20:11 schrieb Aditya Mahajan:

On Sat, 12 Jan 2019, Jan U. Hasecke wrote:


Hi all,

in my document \startchapter and \starttitle starts a new chapter on the
right (odd) page. So sometimes, there is a blank even page just before a
new chapter.

I would like to manipulate this blank even page.

There are several things I would like to do, eg. having no headers and
footers, setting the background color to a named color, placing an image
or some graphics on the page.

Is there a way to define such a page, name it and call it in
\startchapter so that it is placed on the left side.

See https://tex.stackexchange.com/q/457428/323

Thanks a lot, but I wasn't looking for a way to just delete page numbers
but to style the empty page in arbitrary ways.

Maybe it is better to do this manually.

I would let chapter open on even pages too and just insert a styled page
by hand.

juh



I place an epigraph on verso page before a few chapters with the following:

   \definehead[ChapterEpigraph][title]
   \setuphead [ChapterEpigraph][
  page={yes,left},
  insidesection=\vfill,
  aftersection={\vfill\vfill},
  header=empty,
  placehead=no,
 ]

   %% The following always creates a verso page if there is an
   %%   epigraph to set or not.

   \startsetups chapter:epigraph
\doifelsebuffer{ChapterEpigraph}
{\page[yes,header,footer,left]
 \dontleavehmode
 \vfill
 \getbuffer   [ChapterEpigraph]
 \resetbuffer [ChapterEpigraph]
 \vfill
 \vfill
}
{\page[yes,header,footer,left]}
\page[yes,header,footer,right]
   \stopsetups

   <...>

   \stopchapter%   end previous chapter

   \startChapterEpigraph% no epigraph on next

   \stopChapterEpigraph

   \startchapter[reference={cha:no-epigraph-chapter},
  title={Chapter with no epigraph}]
   <...>

   \stopchapter%

   \startChapterEpigraph

   

   \stopChapterEpigraph

   \startchapter[reference={cha:next-chapter},
  title={Chapter with epigraph}]

   <...>

I am not sure where I got the hints for this. I haven't revisited it for 
a while, and it does look like there is some redundant use of \vfill, 
but it worked for me. You may be able to build on it.


___
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
___

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-12 Thread Jan U. Hasecke
Hi Aditya,

Am 12.01.19 um 20:11 schrieb Aditya Mahajan:
> On Sat, 12 Jan 2019, Jan U. Hasecke wrote:
> 
>> Hi all,
>>
>> in my document \startchapter and \starttitle starts a new chapter on the
>> right (odd) page. So sometimes, there is a blank even page just before a
>> new chapter.
>>
>> I would like to manipulate this blank even page.
>>
>> There are several things I would like to do, eg. having no headers and
>> footers, setting the background color to a named color, placing an image
>> or some graphics on the page.
>>
>> Is there a way to define such a page, name it and call it in
>> \startchapter so that it is placed on the left side.
> 
> See https://tex.stackexchange.com/q/457428/323

Thanks a lot, but I wasn't looking for a way to just delete page numbers
but to style the empty page in arbitrary ways.

Maybe it is better to do this manually.

I would let chapter open on even pages too and just insert a styled page
by hand.

juh
___
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
___

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-12 Thread Aditya Mahajan

On Sat, 12 Jan 2019, Jan U. Hasecke wrote:


Hi all,

in my document \startchapter and \starttitle starts a new chapter on the
right (odd) page. So sometimes, there is a blank even page just before a
new chapter.

I would like to manipulate this blank even page.

There are several things I would like to do, eg. having no headers and
footers, setting the background color to a named color, placing an image
or some graphics on the page.

Is there a way to define such a page, name it and call it in
\startchapter so that it is placed on the left side.


See https://tex.stackexchange.com/q/457428/323

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-12 Thread Jan U. Hasecke
Hi all,

in my document \startchapter and \starttitle starts a new chapter on the
right (odd) page. So sometimes, there is a blank even page just before a
new chapter.

I would like to manipulate this blank even page.

There are several things I would like to do, eg. having no headers and
footers, setting the background color to a named color, placing an image
or some graphics on the page.

Is there a way to define such a page, name it and call it in
\startchapter so that it is placed on the left side.

I would like to use the blank pages in an attractive way. Imagine eg. a
title image on the left page while the headline of the chapter is on the
right page.

TIA
juh

___
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
___