enumeration counters, way=bysection
Hi! I want to have the following (Theorems and Lemmas share the counter, way=bysection): Section 1. Foo Theorem 1.1 Bar Lemma 1.2 Baz Section 2. Foo Theorem 2.1 Bar Lemma 2.2 Baz The following used to work about a month or two ago. \setupenumerations[way=bysection] \newcounter\theorems \defineenumeration[thm] [text=Theorem,prefix=yes,prefixsegments=section,counter=theorems] \defineenumeration[lem] [text=Lemma,prefix=yes,prefixsegments=section,counter=theorems] \starttext \dorecurse{5}{ \section{Foo} \startthm Bar \stopthm \startlem Baz \stoplem } \stoptext Today the counter doesn't reset, i.e. I get Theorem 2.3, Lemma 2.4, Theorem 3.5 etc. How can I fix it?
Am 25.11.2010 um 09:54 schrieb Yury G. Kudryashov:
The following used to work about a month or two ago.
\setupenumerations[way=bysection] \newcounter\theorems \defineenumeration[thm] [text=Theorem,prefix=yes,prefixsegments=section,counter=theorems] \defineenumeration[lem] [text=Lemma,prefix=yes,prefixsegments=section,counter=theorems]
\newcounter has nothing to do with enumeration counter the counter key expects the name from another enumeration, e.g. „thm“ \defineenumeration[thm][text=Theorem,prefix=yes,prefixsegments=section] \defineenumeration[lem][text=Lemma, prefix=yes,prefixsegments=section,counter=thm] Wolfgang
Wolfgang Schuster wrote:
Am 25.11.2010 um 09:54 schrieb Yury G. Kudryashov:
The following used to work about a month or two ago.
\setupenumerations[way=bysection] \newcounter\theorems \defineenumeration[thm] [text=Theorem,prefix=yes,prefixsegments=section,counter=theorems] \defineenumeration[lem] [text=Lemma,prefix=yes,prefixsegments=section,counter=theorems]
\newcounter has nothing to do with enumeration counter the counter key expects the name from another enumeration, e.g. „thm“
Thanks!
participants (2)
-
Wolfgang Schuster
-
Yury G. Kudryashov