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.li...@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
>
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to