From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91589 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.comp.tex.context Subject: Re: How to properly `\setuplayout' for several pages and then restore back? Date: Sun, 24 May 2015 19:53:39 +0200 Message-ID: References: <556197D1.3030106@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0543076398==" X-Trace: ger.gmane.org 1432490084 20465 80.91.229.3 (24 May 2015 17:54:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 May 2015 17:54:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun May 24 19:54:32 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ywa6Y-0005DY-BX for gctc-ntg-context-518@m.gmane.org; Sun, 24 May 2015 19:54:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 529F610219 for ; Sun, 24 May 2015 19:54:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RUP7WlWyJx7h for ; Sun, 24 May 2015 19:54:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 83A3F10230 for ; Sun, 24 May 2015 19:53:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 43402101FA for ; Sun, 24 May 2015 19:53:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wDCWXBj0yr4W for ; Sun, 24 May 2015 19:53:41 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id C8072101E8 for ; Sun, 24 May 2015 19:53:41 +0200 (CEST) Original-Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com [IPv6:2a00:1450:4010:c04::230]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t4OHre2X017547 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 24 May 2015 19:53:40 +0200 Original-Received: by lbbuc2 with SMTP id uc2so40008244lbb.2 for ; Sun, 24 May 2015 10:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UEJb4szNt1h5hb0XvBYqL/VnMLLT4DnHdC2wpG5j75Y=; b=lx/QD2/2bCP51Jn/zgP/WZyPA9SMeMofY1jahyh16nPdMarYmnj/HFgi3vGfJpZDIN DQn8gnj9l5H+MbVszsff/hFWcJT5mT6+ZvDbvdZvTayU2pqkDOnYJT3QyCkAWjO9SxJP jJEK3zNhNZvE7D3HcS/DcdH5T2xqckpRj4L4dFXbHnuUPFH0Oyj7sL6/kjz7tICjpxgl G6pcWYs8j8w39PLHXqwc4GSQmYeoM/Qe3amTgAIHaUZS9J7XVIQNHRPY+odpoDiwN7lc 56rGcGpsigtFJZhDKdsSXo7fMbWM+OogURfSW8ZpzdajPi/+kM93j+mxTDL7J8oOFdp0 yKIg== X-Received: by 10.112.171.101 with SMTP id at5mr15262569lbc.66.1432490019752; Sun, 24 May 2015 10:53:39 -0700 (PDT) Original-Received: by 10.112.36.103 with HTTP; Sun, 24 May 2015 10:53:39 -0700 (PDT) In-Reply-To: <556197D1.3030106@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:4010:c04::230; country=FI; region=South Karelia; city=Lappeenranta; latitude=61.0667; longitude=28.1833; http://maps.google.com/maps?q=61.0667,28.1833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VOvRREQW - 6dd9096c369e - 20150524 (trained as not-spam) Received-SPF: pass (filter4-til.mf.surf.net: domain of haroogan@gmail.com designates 2a00:1450:4010:c04::230 as permitted sender) receiver=filter4-til.mf.surf.net; client-ip=2a00:1450:4010:c04::230; envelope-from=; helo=mail-lb0-x230.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:91589 Archived-At: --===============0543076398== Content-Type: multipart/alternative; boundary=001a11c38be2c590770516d79214 --001a11c38be2c590770516d79214 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, May 24, 2015 at 11:20 AM, Hans Hagen 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=3D{stop}, >> headerstate=3D{stop}, >> pagestate=3D{stop}, >> page=3D{yes}, >> bottom=3D{\vfill}, >> top=3D{}, >> ] >> >> \setuplayout >> [contentspage][% >> footer=3D{\zeropoint}, >> header=3D{\zeropoint}, >> ] >> >> \setuplayout >> [contentspage][% >> footerdistance=3D{\zeropoint}, >> headerdistance=3D{\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=3D{stop}] >> \setupfooter[state=3D{stop}] >> >> \setuppagenumbering[state=3D{stop}] >> >> \setuplayout[% >> footer=3D{\zeropoint}, >> header=3D{\zeropoint}, >> ] >> >> \setuplayout[% >> footerdistance=3D{\zeropoint}, >> headerdistance=3D{\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 > > _________________________________________________________________________= __________ =E2=80=8BWorks as intended, thanks!=E2=80=8B --001a11c38be2c590770516d79214 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sun, May 24, 2015 at 11:= 20 AM, Hans Hagen <pragma@wxs.nl= > wrote:<= br>
On 5/23/2015 8:3= 6 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][%
=C2=A0 =C2=A0footerstate=3D{stop},
=C2=A0 =C2=A0headerstate=3D{stop},
=C2=A0 =C2=A0 =C2=A0pagestate=3D{stop},
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 page=3D{yes},
=C2=A0 =C2=A0 =C2=A0 =C2=A0 bottom=3D{\vfill},
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0top=3D{},
]

\setuplayout
[contentspage][%
=C2=A0 =C2=A0footer=3D{\zeropoint},
=C2=A0 =C2=A0header=3D{\zeropoint},
]

\setuplayout
[contentspage][%
=C2=A0 =C2=A0footerdistance=3D{\zeropoint},
=C2=A0 =C2=A0headerdistance=3D{\zeropoint},
]

\startcontentspagemakeup

\setupwhitespace
[line]

% ToC

\stopcontentspagemakeup

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

\start

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

\setuppagenumbering[state=3D{stop}]

\setuplayout[%
=C2=A0 =C2=A0footer=3D{\zeropoint},
=C2=A0 =C2=A0header=3D{\zeropoint},
]

\setuplayout[%
=C2=A0 =C2=A0footerdistance=3D{\zeropoint},
=C2=A0 =C2=A0headerdistance=3D{\zeropoint},
]

% ToC

\stop

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

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

\startlayout[name]

\stoplayout

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

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 H= ans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Ridderstraat 27 | 8061 GH = Hasselt | The Netherlands
=C2=A0 =C2=A0 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0| www.p= ragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/contextrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

=E2=80=8BWorks as intend= ed, thanks!=E2=80=8B

--001a11c38be2c590770516d79214-- --===============0543076398== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0543076398==--