Am 15.03.2013 um 07:46 schrieb H. Özoguz
Maybe I have not made it clear, what I mean?
My Minexample is:
\setuplist[chapter][pagenumber=no] \starttext \completecontent \chapter{Chapter 1} \section{Section 1} \chapter{Chapter 2} \stoptext
Now Chapter 1 is without pagenumber in the TOC, correct, because it has a section after the chapter-title! But Chapter 2 has no sections, so it need a page number, how to do that?
You can play with the following solution, it’s a bit dirty because you have to save the values of the chapter entry before you check for section entries. \setuplist[chapter][alternative=mychapter] \definelistalternative[mychapter][renderingsetup=list:mychapter] \startsetups[list:mychapter] \par \setbox\scratchboxone\hbox{\currentlistentrynumber \quad \currentlistentrytitle \quad \currentlistentrypagenumber} \setbox\scratchboxtwo\hbox{\currentlistentrynumber \quad \currentlistentrytitle} \determinelistcharacteristics[section] \ifnum\listlength=0 \box\scratchboxone \else \box\scratchboxtwo \fi \par \stopsetups \starttext \completecontent \chapter{Chapter 1} \section{Section 1} \chapter{Chapter 2} \stoptext Wolfgang