Am 17.04.2014 um 17:27 schrieb Maggyero
Hello,
How can I get the following table of contents?
Contents
Chapter first MyTitle Chapter II MyTitle Chapter III MyTitle
I have tried:
\MyNumber{\doifelse{\currentsectioncountervalue}{1}{first}{#1}} setuplist[chapter][numbercommand=\MyNumber]
but it does not work. Actually because \currentsectioncountervalue always returns 0 in the table of contents. So I need another command which gives me the current number for testing if it is equal to one (first chapter).
\define[1]\Weirdnumber {\ifcase#1\relax % 0 \or First% 1 \else \convertnumber{Romannumerals}{#1}% \fi} \defineconversion[Weirdnumber][\Weirdnumber] \defineconversionset[Weirdchapter][number,Weirdnumber][number] \setuplist[chapter][width=3em,numberconversionset=Weirdchapter] \starttext \completecontent \dorecurse{10}{\expanded{\chapter{Chapter \recurselevel}}} \stoptext Wolfgang