Different counters for titles
To solve my last asked question, I chose a somewhat easiert way and defined an own chapter-title, which is unnumbered. Here is my Minexample: \definehead[mychapter][chapter] \setuphead[mychapter][number=no] \setupcombinedlist[content] [list={mychapter, chapter, section}] \starttext \completecontent \mychapter{Vorwort} \chapter{First Chapter} \section{Some section in the first chapter} \chapter{Second chapter} \section{Some section in the second chapter} \stoptext The problem is now: Obviously the counter of mychapter and chapter is the same. Because "first chapter" begins with number 2, but should with 1 – that was the intention of this new chapter style, which is nothing but a unnumbered copy of the default chapter. Was that idea wrong? How to give chapter and mychapter their own counters, to achieve this result – or any other way to let "first chapter" begin with 1 (but not subtract 1 from the numbers, because that ends up in the first section "1.0". The first section of the first chapter should be numbered with "1.1", as usual). Huseyin
On 9/3/2013 8:14 AM, "H. Özoguz" wrote:
To solve my last asked question, I chose a somewhat easiert way and defined an own chapter-title, which is unnumbered.
Here is my Minexample:
\definehead[mychapter][chapter] \setuphead[mychapter][number=no] \setupcombinedlist[content] [list={mychapter, chapter, section}]
\starttext \completecontent \mychapter{Vorwort} \chapter{First Chapter} \section{Some section in the first chapter} \chapter{Second chapter} \section{Some section in the second chapter} \stoptext
The problem is now: Obviously the counter of mychapter and chapter is the same. Because "first chapter" begins with number 2, but should with 1 – that was the intention of this new chapter style, which is nothing but a unnumbered copy of the default chapter. Was that idea wrong? How to give chapter and mychapter their own counters, to achieve this result – or any other way to let "first chapter" begin with 1 (but not subtract 1 from the numbers, because that ends up in the first section "1.0". The first section of the first chapter should be numbered with "1.1", as usual).
Indeed they are clones and the main reason is that you can use different rendering. In fact the topmost levels are : \definesection[section-1] % part \definesection[section-2] % chapter \definesection[section-3] % section \definesection[section-4] % subsection \definesection[section-5] % subsubsection \definesection[section-6] % subsubsubsection \definesection[section-7] % subsubsubsubsection There's a lot going on with section heading so having a copy of the same is non trivial as one should decide what gets copied (think of all kind of references). Here's a cheat: \starttext \placelist[chapter][criterium=all] \startchapter[ownnumber=1,title=chap 1] \startsection[title=sec 1]\input ward \stopsection \stopchapter \startchapter[ownnumber=1,title=chap 1] \startsection[title=sec 1]\input ward \stopsection \stopchapter \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
"H. Özoguz"
-
Hans Hagen