On 7/7/06, David Arnold wrote:
All,
Let's say I have some enumerations that are numbered, for definitions, examples, theorems, etc. Let's say I want everything in a section numbered consecutively, except figures. So, numbering would proceed like this:
Grrr ... I have exactly the opposite problem: I need the definitions/examples/problems/... to be numbered independent of each other, but I cannot get rid of coupling between these numbers.
Definition 1.1
Where the first number is the section number.
Now, by "consecutive," I mean:
Definition 1.1
f(x)=3x+2 (1.2)
Example 1.3
Definition 1.4
Definition 1.5
f(x)=x^2 (1.6)
Figure 1
Example 1.7
Example 1.8
Definition 1.9
Figure 2
etc.
Hope this give the right idea.
Question: What would be the "Context Way" to go about this?
I didn't know how to automatically increase the subsection number after formulas, but the rest should be OK. \setuphead [subsection] [after={\incrementnumber[formula]}] \definehead [definition] [subsection] \definehead [example] [subsection] \setuplabeltext[en][definition=Definition ] \setuplabeltext[en][example=Example ] % or \setupfloat[figure][...] \setupfloats [way=bysection, location=top, align=right] \setupformulas [way=bysection] % after={\setupheadnumber[subsection][+1]}, \starttext \section{First section} \definition{} \placeformula \startformula f(x)=3x+2 \stopformula \setupheadnumber[subsection][+1] \example{} \definition{} \definition{} \placeformula \startformula f(x)=x^2 \stopformula \setupheadnumber[subsection][+1] \placefigure[here]{}{abc} \example{} \placefigure[here]{}{def} \example{} \definition{} \stoptext Mojca