It is the opposite I need: uppercase in the main text and lower case in the TOC. Here below is how I achieved it:

\define[2]\MyChapterCommand%
  
{\framed[frame=on,bottomframe=on,leftframe=off,rightframe=off,topframe=off,align=middle]
     {\vbox{\headtext{chapter} ##1\blank[small]##2}}}

\setuphead[chapter][
    header=empty,
    alternative=middle,
    style={\ssc},
    after=\blank,
    command=\MyChapterCommand,
    sectionsegments=chapter,
    sectionresetset=jbfreset,
    number=yes,
    after={\blank[1cm]}
    ]
\setuplabeltext[chapter=CHAPTER  ,list:chapter=Chapter ,]

\setupcombinedlist
  [content]
  [list={chapter}]
\setuplist[chapter][label=list:chapter,distance=1.3cm,style=,alternative=c,margin=.5cm,stopper={:
 },before=,after=]

Julian

On 3/10/25 03:00, Wolfgang Schuster wrote:
Am 02.10.2025 um 05:57 schrieb jbf:
I am presenting a solution I worked out for a relatively simple issue, and simply want to know if there is an alternative solution. What I came up with works, but is it the best or only way of achieving what I wanted?


\setuplabeltext [en] [chapter=Chapter~]

\setuplist
  [chapter]
  [label=yes,
   width=6em]

\setuphead
  [chapter]
  [numberstyle=WORD]

\starttext

\completecontent

\chapter{XXX}

\stoptext


I had \setuplabeltext[chapter=CHAPTER  ] to give me CHAPTER 1 etc. in the bodymatter. But I wanted Chapter 1 etc. instead, in the TOC. I tried all kinds of options among the \setuplist keys, but was still getting CHAPTER instead of Chapter in the TOC.

Then I hit upon a solution. I reworked \setuplabeltext so that now it reads \setuplabeltext[chapter=CHAPTER ,list:chapter=Chapter ] and this gives me what I want. But it was just a stroke of luck. I can't find any reference to a list:option anywhere in the documentation. Does it exist somewhere? Or is there another way of achieving what I want, using the \setuplist options instead?


Do you have a example for this?

Wolfgang

___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to