ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to properly `\setuplayout' for several pages and then restore back?
@ 2015-05-23 18:36 Alexander Shukaev
  2015-05-24  9:20 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Shukaev @ 2015-05-23 18:36 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1225 bytes --]

Hello,

I have a table of contents that now has grown to span several pages.
Before that I used the following setup:

\definemakeup
[contentspage]

\setupmakeup
[contentspage][%
  footerstate={stop},
  headerstate={stop},
    pagestate={stop},
         page={yes},
       bottom={\vfill},
          top={},
]

\setuplayout
[contentspage][%
  footer={\zeropoint},
  header={\zeropoint},
]

\setuplayout
[contentspage][%
  footerdistance={\zeropoint},
  headerdistance={\zeropoint},
]

\startcontentspagemakeup

\setupwhitespace
[line]

% ToC

\stopcontentspagemakeup

and that indeed worked when ToC spanned only one page.  Since page breaking
does not work inside `makeup', I had ti give it up.  Now I try the
following:

\start

\setupheader[state={stop}]
\setupfooter[state={stop}]

\setuppagenumbering[state={stop}]

\setuplayout[%
  footer={\zeropoint},
  header={\zeropoint},
]

\setuplayout[%
  footerdistance={\zeropoint},
  headerdistance={\zeropoint},
]

% ToC

\stop

Why after `\stop' previous setups for `layout', `header', `footer', and
`pagenumbering' do not restore?  Is there a way to achieve this or do I
have to manually duplicate the setups which were before `\start'?  Thank
you.

Kind regards,
Alexander

[-- Attachment #1.2: Type: text/html, Size: 5372 bytes --]

[-- 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] 3+ messages in thread

* Re: How to properly `\setuplayout' for several pages and then restore back?
  2015-05-23 18:36 How to properly `\setuplayout' for several pages and then restore back? Alexander Shukaev
@ 2015-05-24  9:20 ` Hans Hagen
  2015-05-24 17:53   ` Alexander Shukaev
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2015-05-24  9:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/23/2015 8:36 PM, Alexander Shukaev wrote:
> Hello,
>
> I have a table of contents that now has grown to span several pages.
> Before that I used the following setup:
>
> \definemakeup
> [contentspage]
>
> \setupmakeup
> [contentspage][%
>    footerstate={stop},
>    headerstate={stop},
>      pagestate={stop},
>           page={yes},
>         bottom={\vfill},
>            top={},
> ]
>
> \setuplayout
> [contentspage][%
>    footer={\zeropoint},
>    header={\zeropoint},
> ]
>
> \setuplayout
> [contentspage][%
>    footerdistance={\zeropoint},
>    headerdistance={\zeropoint},
> ]
>
> \startcontentspagemakeup
>
> \setupwhitespace
> [line]
>
> % ToC
>
> \stopcontentspagemakeup
>
> and that indeed worked when ToC spanned only one page.  Since page
> breaking does not work inside `makeup', I had ti give it up.  Now I try
> the following:
>
> \start
>
> \setupheader[state={stop}]
> \setupfooter[state={stop}]
>
> \setuppagenumbering[state={stop}]
>
> \setuplayout[%
>    footer={\zeropoint},
>    header={\zeropoint},
> ]
>
> \setuplayout[%
>    footerdistance={\zeropoint},
>    headerdistance={\zeropoint},
> ]
>
> % ToC
>
> \stop
>
> Why after `\stop' previous setups for `layout', `header', `footer', and
> `pagenumbering' do not restore?  Is there a way to achieve this or do I
> have to manually duplicate the setups which were before `\start'?  Thank
> you.

switching layouts is tricky as there is a mix between local and global 
settings and actions around the page crossing

\startlayout[name]

\stoplayout

also, when there is a layout defined with the same name as a makeup, 
then the makeup will take that layout

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 3+ messages in thread

* Re: How to properly `\setuplayout' for several pages and then restore back?
  2015-05-24  9:20 ` Hans Hagen
@ 2015-05-24 17:53   ` Alexander Shukaev
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Shukaev @ 2015-05-24 17:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2856 bytes --]

On Sun, May 24, 2015 at 11:20 AM, Hans Hagen <pragma@wxs.nl> wrote:

> On 5/23/2015 8:36 PM, Alexander Shukaev wrote:
>
>> Hello,
>>
>> I have a table of contents that now has grown to span several pages.
>> Before that I used the following setup:
>>
>> \definemakeup
>> [contentspage]
>>
>> \setupmakeup
>> [contentspage][%
>>    footerstate={stop},
>>    headerstate={stop},
>>      pagestate={stop},
>>           page={yes},
>>         bottom={\vfill},
>>            top={},
>> ]
>>
>> \setuplayout
>> [contentspage][%
>>    footer={\zeropoint},
>>    header={\zeropoint},
>> ]
>>
>> \setuplayout
>> [contentspage][%
>>    footerdistance={\zeropoint},
>>    headerdistance={\zeropoint},
>> ]
>>
>> \startcontentspagemakeup
>>
>> \setupwhitespace
>> [line]
>>
>> % ToC
>>
>> \stopcontentspagemakeup
>>
>> and that indeed worked when ToC spanned only one page.  Since page
>> breaking does not work inside `makeup', I had ti give it up.  Now I try
>> the following:
>>
>> \start
>>
>> \setupheader[state={stop}]
>> \setupfooter[state={stop}]
>>
>> \setuppagenumbering[state={stop}]
>>
>> \setuplayout[%
>>    footer={\zeropoint},
>>    header={\zeropoint},
>> ]
>>
>> \setuplayout[%
>>    footerdistance={\zeropoint},
>>    headerdistance={\zeropoint},
>> ]
>>
>> % ToC
>>
>> \stop
>>
>> Why after `\stop' previous setups for `layout', `header', `footer', and
>> `pagenumbering' do not restore?  Is there a way to achieve this or do I
>> have to manually duplicate the setups which were before `\start'?  Thank
>> you.
>>
>
> switching layouts is tricky as there is a mix between local and global
> settings and actions around the page crossing
>
> \startlayout[name]
>
> \stoplayout
>
> also, when there is a layout defined with the same name as a makeup, then
> the makeup will take that layout
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________


​Works as intended, thanks!​

[-- Attachment #1.2: Type: text/html, Size: 4469 bytes --]

[-- 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] 3+ messages in thread

end of thread, other threads:[~2015-05-24 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-23 18:36 How to properly `\setuplayout' for several pages and then restore back? Alexander Shukaev
2015-05-24  9:20 ` Hans Hagen
2015-05-24 17:53   ` Alexander Shukaev

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).