From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112482 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: How not to display the header of the chapter page on the page with the table of contents ? Date: Mon, 16 Aug 2021 12:18:23 +0200 Message-ID: References: <2641f441-f893-a1d6-7ab7-41108c47f2b4@gmx.es> <9f7b9a08-469e-e2ff-cb11-7fb6fa3b7c63@gmx.es> <84cd3003-f9b3-b34a-ab59-d22697b414ae@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4561687742217868585==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19724"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Fabrice Couvreur To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 16 12:20:51 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFZjf-0004xB-Hg for gctc-ntg-context-518@m.gmane-mx.org; Mon, 16 Aug 2021 12:20:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D75A2286850; Mon, 16 Aug 2021 12:20:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KHvostQ-i-us; Mon, 16 Aug 2021 12:20:23 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D3B728685D; Mon, 16 Aug 2021 12:20:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 877F8286859 for ; Mon, 16 Aug 2021 12:20:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xV-X_3v0vSLR for ; Mon, 16 Aug 2021 12:20:19 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.50; helo=mail-ot1-f50.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9D9F7286850 for ; Mon, 16 Aug 2021 12:20:19 +0200 (CEST) Original-Received: by mail-ot1-f50.google.com with SMTP id h63-20020a9d14450000b02904ce97efee36so20288967oth.7 for ; Mon, 16 Aug 2021 03:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=GGQ/4IzSXfZLQfeRYyecKwoyil/7e1M7oBm5ZgmFO+g=; b=oNZZQy3y3w3U6tcmDj5xTYSh6bcdjQLzIwrI0Y65I6jPycfDYNBHK7cMk5wWO/NAZx 8kT6XoEv2MnqxZ1/L1xuyPdbEuc6v4R1TTjAj1oa8dy0zvZePXbH7Xsqx2LemjxqBsBd /ymLZg1C/aAYobqx/L4YCXZF8H+iX/0K3hzzzQ0ttkTRs26G6YS68rhOoGH1Xs69e5ln ieJ2BeIbBwnb+zYImrkti1fwEroOjZsCtnH+0bvOKDFiDOc/VUgq4TMdGfCX5Lwg9ap5 4Kv50SfnsH3UZ0+KUML1dXtEbydbaVWuCo9PZP8YIjp9xDol0drdugJROQO3FYq+iPua vu9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=GGQ/4IzSXfZLQfeRYyecKwoyil/7e1M7oBm5ZgmFO+g=; b=Zy6Zkuoihw/7pILUiu68wlMEXIS0+vnQssOxb9nI5nMUKwLPS30XJHDjwH06Hxrbey JYwlimhqnX9CTYZK5Q2oBWmp3NoNLJZrIuadpB/yYbUMlUsxkO/0M/LoIjo3HAwwhcSP DVJyRmEqO80aBqJ8R1WWusP/YMEw19A9OIZMOiilDPANjjSm2euMD8AKSfPf2MwZyxWc AQpLuydEaq+ZPSea9lmXHUklrcAMTAGstzOauAOlk20Rm5k6g9SnX0T+f7/rF1U3DQKf jaTtz2XAH+rHczNMqglZEoYjCQzOgFKcIYuEIpDa0Ml2BZOZtF2o4xufXm97jBI7iUjU ZxvA== X-Gm-Message-State: AOAM532jb5Sh/xdWS04Ojr0FfLrRXzIECZqkmjBg3+d4GDI5GNPCOvkB EMjWLVCVoDiserKSFrFIV4a5aiZ/6oU8shbzFZebkxvv4cU= X-Google-Smtp-Source: ABdhPJwo9GDB5QyHJagbtOhX80Gzqskm8+G2RHeWQ5+ZBIW05CP/7nR9klyk/uvSCQ6nTjEZqn5MXW3FaxEDjBeTeWw= X-Received: by 2002:a9d:75da:: with SMTP id c26mr11791124otl.289.1629109218138; Mon, 16 Aug 2021 03:20:18 -0700 (PDT) In-Reply-To: <84cd3003-f9b3-b34a-ab59-d22697b414ae@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:112482 Archived-At: --===============4561687742217868585== Content-Type: multipart/alternative; boundary="0000000000003f5e9905c9aa8cec" --0000000000003f5e9905c9aa8cec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Wolfgang, Pablo's solution works, but I tried yours without success. Here are the main lines of my project %%%% begin product \startproduct[terminale-manual] \project[terminale-environment] \startdocument \startfrontmatter ... \stopfrontmatter \startbodymatter \component[terminale_recurrence] ... \stopbodymatter \stopdocument \stopproduct %%%% end product %%%% begin project \startproject[terminale-environment] \environment[terminale-style] ... \stopproject %%%% end project %%%% begin component \project[terminale-environment] \startcomponent[terminale_recurrence] ... \endcomponent %%%% end component %%%% begin environment \startenvironment[terminale-style] ... \startsetups [section:chapter] \setuphead [chapter] [align=3Dflushright, textcommand=3D\groupedcommand{\blank[medium]}{}, numbercolor=3Ddarkgray, textstyle=3DChapterTextStyle, numberstyle=3DChapterNumberStyle, before=3D\startChapterFrame, after=3D\stopChapterFrame, header=3Dhigh] \stopsetups \startsectionblockenvironment [bodypart] \directsetup{section:chapter} \stopsectionblockenvironment \doifmode{*component}{\directsetup{section:chapter}} ... \endenvironment %%%% end environment Le dim. 15 ao=C3=BBt 2021 =C3=A0 19:03, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a =C3=A9crit : > Pablo Rodriguez via ntg-context schrieb am 15.08.2021 um 18:33: > > On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote: > >> A small note : this method works if I compile the project but if I > >> compile only one chapter, the header no longer appears. > > Hi Fabrice, > > > > I have never used projects and chapters (or whatever the right name is)= . > > > > I=E2=80=99m not sure I get what you=E2=80=99re experiencing: with a sin= gle chapter, do > > you have the fancy layout or not? > > > > It would make sense that the fancy chapter doesn=E2=80=99t appear only = compiling > > a chapter. I guess there is no \startbodymatter...\stopbodymatter > > wrapping it. > > > > Another approach would be: > > > > [...] > > Setting values for \title is a way to avoid the chapter setup for the > table of contents etc. > but there is a way to set values which are used only when you process a > component file. > > To make it work one has to load the environment file after > \startcomponent because you > can use the *component mode to check whether the parent file is a > product or a component. > > %%%% begin product > \startproduct [*] > > \environment [...] > > \startfrontmatter > ... > \stopfrontmatter > > \startbodymatter > \component [...] > \stopbodymatter > > \stopproduct > %%%% end product > > %%%% begin component > \startcomponent [*] > > \environment [...] > > ... > > \stopcomponent > %%%% end component > > %%%% begin environment > \startenvironment [*] > > \startsetups [section:chapter] > > \setuphead > [chapter] > [...] > > \stopsetups > > \startsectionblockenvironment [bodypart] > \directsetup{section:chapter} > \stopsectionblockenvironment > > \doifmode{*component}{\directsetup{section:chapter}} > > \stopenvironment > %%%% end environment > > 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 > > _________________________________________________________________________= __________ > --0000000000003f5e9905c9aa8cec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Wolfgang,
Pablo's solution works, but I tri= ed yours without success. Here are the main lines of my project

%%%% begin product<= /span>
\startproduct[terminale-manual]
=C2=A0
\p= roject[terminale-environment]

\startdocument
=C2=A0 =C2=A0
\s= tartfrontmatter
...
\stopfrontmatt= er
=C2=A0 =C2=A0
\startbodymatter
\component[terminale_recurrence= ]
...
\stopbodymatter
=C2=A0 =C2=A0
\stopdocument
=C2=A0 \stopproduct
%%%% end product

%%%% begin = project
\startproject[terminale-environme= nt]

\environment[terminale-style]
=C2=A0...=C2=A0
\stopproject
<= /span>
%%%% end project

%%%% begin component
\project[terminale-environment]

\startcomponen= t[terminale_recurrence]
...=
\endcomponent
%%%% e= nd component

<= /div>
= %%%% begin environment
\star= tenvironment[terminale-style]
...<= /span>
\startsetups [section:chapter]
=C2=A0
\se= tuphead
=C2=A0 =C2=A0[chapter]
=C2=A0 =C2=A0[align=3Dflushright,
= =C2=A0 =C2=A0 textcommand=3D\groupedcommand{\blank[medium]}{},
=C2=A0 = =C2=A0 numbercolor=3Ddarkgray,
=C2=A0 =C2=A0 textstyle=3DChapterTextStyl= e,
=C2=A0 =C2=A0 numberstyle=3DChapterNumberStyle,
=C2=A0 =C2=A0 befo= re=3D\startChapterFrame,
=C2=A0 =C2=A0 after=3D\stopChapterFrame,
=C2= =A0 =C2=A0 header=3Dhigh]

\stopsetups

\startsectionblockenvir= onment [bodypart]
=C2=A0 =C2=A0 =C2=A0\directsetup{section:chapter}
\= stopsectionblockenvironment

\doifmode{*component}{\directsetup{secti= on:chapter}}
=C2=A0
...
\endenvironment=
%%%% end environment
=

Le=C2=A0dim. 15 ao=C3=BBt 2021 =C3=A0=C2=A019:03, Wolfgang Schuster v= ia ntg-context <ntg-context@ntg.nl= > a =C3=A9crit=C2=A0:
Pablo Rodriguez via ntg-context schrieb am 15.08.2021 um 18:33= :
> On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote:
>> A small note : this method works if I compile the project but if I=
>> compile only one chapter, the header no longer appears.
> Hi Fabrice,
>
> I have never used projects and chapters (or whatever the right name is= ).
>
> I=E2=80=99m not sure I get what you=E2=80=99re experiencing: with a si= ngle chapter, do
> you have the fancy layout or not?
>
> It would make sense that the fancy chapter doesn=E2=80=99t appear only= compiling
> a chapter. I guess there is no \startbodymatter...\stopbodymatter
> wrapping it.
>
> Another approach would be:
>
> [...]

Setting values for \title is a way to avoid the chapter setup for the
table of contents etc.
but there is a way to set values which are used only when you process a component file.

To make it work one has to load the environment file after
\startcomponent because you
can use the *component mode to check whether the parent file is a
product or a component.

%%%% begin product
\startproduct [*]

\environment [...]

\startfrontmatter
...
\stopfrontmatter

\startbodymatter
\component [...]
\stopbodymatter

\stopproduct
%%%% end product

%%%% begin component
\startcomponent [*]

\environment [...]

...

\stopcomponent
%%%% end component

%%%% begin environment
\startenvironment [*]

\startsetups [section:chapter]

=C2=A0=C2=A0=C2=A0=C2=A0 \setuphead
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [chapter]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [...]

\stopsetups

\startsectionblockenvironment [bodypart]
=C2=A0=C2=A0=C2=A0=C2=A0 \directsetup{section:chapter}
\stopsectionblockenvironment

\doifmode{*component}{\directsetup{section:chapter}}

\stopenvironment
%%%% end environment

Wolfgang

___________________________________________________________________________= ________
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/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--0000000000003f5e9905c9aa8cec-- --===============4561687742217868585== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4561687742217868585==--