From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112595 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Reviczky via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: TOC labeltext and no partlabel Date: Wed, 25 Aug 2021 14:41:09 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9134528443067014582==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19756"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Reviczky , mailing list for ConTeXt users To: Wolfgang Schuster Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 25 15:42:01 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 1mItAH-0004yV-Fk for gctc-ntg-context-518@m.gmane-mx.org; Wed, 25 Aug 2021 15:42:01 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CA571286CA2; Wed, 25 Aug 2021 15:41:26 +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 jZppWN-o7KIO; Wed, 25 Aug 2021 15:41:24 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B3649286CA4; Wed, 25 Aug 2021 15:41:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BF3DF286C86 for ; Wed, 25 Aug 2021 15:41:22 +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 pVu3A6Sw6_Hj for ; Wed, 25 Aug 2021 15:41:21 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.43; helo=mail-ed1-f43.google.com; envelope-from=reviczky@gmail.com; receiver= Original-Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 648DD286B38 for ; Wed, 25 Aug 2021 15:41:21 +0200 (CEST) Original-Received: by mail-ed1-f43.google.com with SMTP id dm15so12010081edb.10 for ; Wed, 25 Aug 2021 06:41:21 -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 :cc; bh=i38rQdaKIvm0Kt3jwZRHe9wfnjTkMmDuFit/Op6/ylg=; b=njmPWj4yCdGGOPuiusov47QzFZX+xeKLC3Egdt7XvYJ+b2wnoOaQx6dvOph3rNkSJd p5TioeO5gTQ2pU6UAPwkFrNPSq3A4uqqBAeNGe6osq5N3CrUsC48FIdSgPQpFS4DpanL xytkYsxh5H5qGsNAZQR5PBnahMxRu8aPy8PGJfAjaTF5eJjSuzpbXJJWMITAiJbTDYgg 5/tIbGQTdvumD856gyiYi1UAap12vZbcAZubCBleLoPqm7NVXA+Zz92bn0X0/YWRbXs8 v5M+1KQaQy788+o69yoLnkNv4tZC9Y9GDF3QHsAhOWs8MwogFTF3coq14Aw2Fr8NsvKU imkQ== 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:cc; bh=i38rQdaKIvm0Kt3jwZRHe9wfnjTkMmDuFit/Op6/ylg=; b=iDQEkm/OmwOQfw8VTy8OLORZmlGWBPK5OrNe2XUp5kTn0h1Xb+Dlu2ebL86Csea1IZ +kXp+t3qVfPCLfqjeREEmZd1aZW6WnSbO+U/z2DODZfXI/dNdBepO4UCpmCAtvmphMky thjchB+b5xiF3nZ9AIJqvNwsHjg6zPxgVk5XY90w8NgZkX4pyAa5hsMINYsWZbhyt6ue o6k65L3xGZmhkI7TuIhWuDo8QMcjH2qWj3Oun5QJIIerLurYH7ee3fcS1m+wI6VVdwLa yXIt4RzFZ5a8RB6jP56A7SSndbDE5B6HlwL6U1zLejSghB4t9mq7wyWX0d49h/OB3gwy qIxQ== X-Gm-Message-State: AOAM530rxmDuiHbgIaqYdD3SdnkwseiizxFEUc8FhxDxHd5uhoAko058 t14lrq3xpfwqmjahMaJof+lyFqr9m+jCdIa6di0= X-Google-Smtp-Source: ABdhPJzb0+N3cdcwQCivDvFnv8nXcy/BtINQA5y8R7B3BMXVCm52z+9eTwiHO1bsvXyYjCN8cOK/Y1BsNt38mA76lv8= X-Received: by 2002:a05:6402:2751:: with SMTP id z17mr22632853edd.290.1629898880904; Wed, 25 Aug 2021 06:41:20 -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:112595 Archived-At: --===============9134528443067014582== Content-Type: multipart/alternative; boundary="000000000000d0f48005ca6267e3" --000000000000d0f48005ca6267e3 Content-Type: text/plain; charset="UTF-8" Thank you very much Wolfgang for the explanation, Both solutions make sense now and work great. Regards, Adam On Wed, Aug 25, 2021 at 11:46 AM Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> wrote: > Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02: > > Hi, > > > > I have asked this question before, but now I cannot get it working again. > > > https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc > > > > I want to set partlabels in my TOC but not in the document itself. > > > > The desired output would be: > > --- > > Contents > > Chapter 1 Bodypart > > Appendix A Appendix > > > > 1 Bodypart > > A Appendix > > --- > > > > [...] > > > > But that does not show the labels in the TOC (trying it with LMTX and > MKIV). > > The easy way is to create a new heading for the appendices (e.g. > \extrachapter) and set the label you want to use in the list. > > \setuplist [chapter] [label=chapter] > \setuplist [extrachapter] [label=appendix] > > > A complexer solution where you can keep \chapter in the appendices can > be achieved with a customized number type and the use of the processor > mechanism to set the labels in the list entries. > > \setuplist > [chapter] > [width=fit, > distance=\spaceamount] > > \defineconversionset [bodypart:chapternumber] [] [bodypartnumber->n] > \defineconversionset [appendix:chapternumber] [] [appendixnumber->A] > > \setuphead > [chapter] > [sectionconversionset=chapternumber] > > \startsectionblockenvironment [frontpart] > > \defineprocessor [bodypartnumber] [left=Chapter~] > \defineprocessor [appendixnumber] [left=Appendix~] > > \stopsectionblockenvironment > > \starttext > > \startfrontmatter > \completecontent > \stopfrontmatter > > \startbodymatter > \chapter{Bodypart} > \stopbodymatter > > \startappendices > \chapter{Appendix} > \stopappendices > > \stoptext > > Wolfgang > --000000000000d0f48005ca6267e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you very much Wolfgang for the= explanation,

Both solutions make sense now and wo= rk great.

Regards,
Adam

On Wed, Aug 25, 2021 at 11:46 AM Wolfgang Schuster <wolfgang.schuste= r.lists@gmail.com> wrote:
Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:= 02:
> Hi,
>
> I have asked this question before, but now I cannot get it working aga= in.
> https:/= /ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-= in-toc
>
> I want to set partlabels in my TOC but not in the document itself.
>
> The desired output would be:
> ---
> Contents
> Chapter 1 Bodypart
> Appendix A Appendix
>
> 1 Bodypart
> A Appendix
> ---
>
> [...]
>
> But that does not show the labels in the TOC (trying it with LMTX and = MKIV).

The easy way is to create a new heading for the appendices (e.g.
\extrachapter) and set the label you want to use in the list.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 \setuplist [chapter]=C2=A0 =C2=A0 =C2=A0 [label= =3Dchapter]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \setuplist [extrachapter] [label=3Dappendix]

A complexer solution where you can keep \chapter in the appendices can
be achieved with a customized number type and the use of the processor
mechanism to set the labels in the list entries.

\setuplist
=C2=A0 =C2=A0[chapter]
=C2=A0 =C2=A0[width=3Dfit,
=C2=A0 =C2=A0 distance=3D\spaceamount]

\defineconversionset [bodypart:chapternumber] [] [bodypartnumber->n]
\defineconversionset [appendix:chapternumber] [] [appendixnumber->A]

\setuphead
=C2=A0 =C2=A0[chapter]
=C2=A0 =C2=A0[sectionconversionset=3Dchapternumber]

\startsectionblockenvironment [frontpart]

=C2=A0 =C2=A0 =C2=A0\defineprocessor [bodypartnumber] [left=3DChapter~]
=C2=A0 =C2=A0 =C2=A0\defineprocessor [appendixnumber] [left=3DAppendix~]
\stopsectionblockenvironment

\starttext

\startfrontmatter
\completecontent
\stopfrontmatter

\startbodymatter
\chapter{Bodypart}
\stopbodymatter

\startappendices
\chapter{Appendix}
\stopappendices

\stoptext

Wolfgang
--000000000000d0f48005ca6267e3-- --===============9134528443067014582== 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== --===============9134528443067014582==--