From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112138 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Problem with chapter numbering Date: Thu, 15 Jul 2021 10:26:08 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1631568807143803993==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1172"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 15 10:28:13 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 1m3wj7-00007e-Le for gctc-ntg-context-518@m.gmane-mx.org; Thu, 15 Jul 2021 10:28:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F1BD6285BF2; Thu, 15 Jul 2021 10:27:44 +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 93sEY18FnhF0; Thu, 15 Jul 2021 10:27:43 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 208E4285BF6; Thu, 15 Jul 2021 10:27:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A914F285BF2 for ; Thu, 15 Jul 2021 10:27:40 +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 aXQ8zwUiYVcZ for ; Thu, 15 Jul 2021 10:27:39 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.51; helo=mail-ot1-f51.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (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 262672853F4 for ; Thu, 15 Jul 2021 10:27:39 +0200 (CEST) Original-Received: by mail-ot1-f51.google.com with SMTP id o17-20020a9d76510000b02903eabfc221a9so5442322otl.0 for ; Thu, 15 Jul 2021 01:27:38 -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=MvC8eTNO1f17FyMf3FgDjJZu7kz8IXOwIwgQ0kEpxKw=; b=jLciQ0+qluihLFQn/Rl7U9nt+SEMZeRdupUDOi3GGFMjOZWYIcFFgFkk8a8KoNKt7z wcj553OkMsswcauoZVIa0rUDHWeN2+x2xVbj9MAMUl9cBOu2KvhNSlm11VWfutnRbYqE Hdp9mNX7NDtFsc8j8nTuURkeuHTJyr44QL6TEZO4HoAJCQld6PJup6OZtGgw8ETGNeoc yEBMD2yjbiSn8HR21fQ/W21RFg8GYQzKkxb6MMzDM6JJhUSHo16jN5Rywm68GtGdtu8k cVvRupl8V5LcRHFg+/Y4P5OivAqW5iD/BHAMCKYo/bOjhVmh2R3tNRm/n6j/p0gWjoC1 7vAw== 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=MvC8eTNO1f17FyMf3FgDjJZu7kz8IXOwIwgQ0kEpxKw=; b=S4VKGGJgGdSyYpAd5KO6EBrm3+vzipBBQQWB8SwIxUGNdQSjZrUHsJ4TT8KLUi4Uka hwnWgXDymz10yhtcMmWJzF+A1kxP420AOVjZphapA7+FWfWAONFnZCs25laiVEXbfxHn z9epi7irLnsqqNm06EDC7UMpMdX3/I3vG7dF7JtVCHhYGF18VYJbAobteHiUV+lm4VCI +OELekZ9VzuBzHzxImSsV6Oa/sKU6NgmET7/1yFpbqrIOabfeYRLXk6MI1MDPvfR/lUZ P3z4ULcE7I7AiGK4PC1w4MdUD06zZMy8UVm0aAFH7/ayHuQlXhnGzu50QiTIwF+cb297 9ePw== X-Gm-Message-State: AOAM530QQYCLaJ8PlD4JbuRNX8SD3shhiG2KOfxUJS1BJsWFWLFhWbKw bP/6R5EzTQ47vb2vN6+SV+gTDkKIzt6iy4r2mjZmoJFUIO7jmw== X-Google-Smtp-Source: ABdhPJwGoK5SR2Vqm5makUi/Y7QWBsRsNfH2975g4miISqestsQxRRRgXN0W+4t0qy/WvnCuLN2dVh3kPfHfkjjxYPU= X-Received: by 2002:a9d:75da:: with SMTP id c26mr2657813otl.289.1626337657345; Thu, 15 Jul 2021 01:27:37 -0700 (PDT) In-Reply-To: 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:112138 Archived-At: --===============1631568807143803993== Content-Type: multipart/alternative; boundary="00000000000059d88205c7253e2a" --00000000000059d88205c7253e2a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Bruce, Thanks for the suggestion, it works fine. Fabrice Le mer. 14 juil. 2021 =C3=A0 22:54, Bruce Horrocks a = =C3=A9crit : > On 13 Jul 2021, at 18:47, Fabrice Couvreur > wrote: > > > > Hi, > > For my book, the header for each chapter should be like the attached > image. I don't know if I am using the best method, but the result looks > like what I want. Nevertheless, I am having a problem. > > I don't understand why the first chapter is not numbered while the > second is with number 1 etc. > > Thanks. > > Fabrice > > You were nearly there. Use: > > \unexpanded\def\processheadnumber#1% > {\getmarking[chapternumber][current]} > > =E2=80=94 > Bruce Horrocks > Hampshire, UK > > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > --00000000000059d88205c7253e2a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Bruce,
Thanks for the suggestion, it works fine.<= /span>
Fabrice

Le=C2=A0mer. 14 juil. 2021 =C3=A0=C2=A022:54, Bruce H= orrocks <ntg@scorecrow.com> = a =C3=A9crit=C2=A0:
On 13 Jul 2021, at 18:47, Fabrice Couvreur <fabrice1.couvreur@gmail.com>= ; wrote:
>
> Hi,
> For my book, the header for each chapter should be like the attached i= mage. I don't know if I am using the best method, but the result looks = like what I want. Nevertheless, I am having a problem.
> I don't understand why the first chapter is not numbered while the= second is with number 1 etc.
> Thanks.
> Fabrice

You were nearly there. Use:

\unexpanded\def\processheadnumber#1%
=C2=A0 =C2=A0{\getmarking[chapternumber][current]}

=E2=80=94
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________= ________
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
___________________________________________________________________________= ________
--00000000000059d88205c7253e2a-- --===============1631568807143803993== 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== --===============1631568807143803993==--