On 7/7/06, David Arnold wrote:
All,
Let me adjust my previous post with this request. How can I get my enumerations and my formulae to use the same counter?
All,
How do you get two enumerations to use a common counter? This didn't work.
\setupoutput[pdf]
\newcounter\NonFigCtr \define\nctr{\doglobal\increment\NonFigCtr \color[red]{[\NonFigCtr]}}
\defineenumeration [remark] [location=serried, width=broad, text=Remark, headstyle=bold, inbetween=\blank, before=\blank, after=\blank, way=bysection, number=nctr]
\defineenumeration [definition] [location=serried, width=broad, text=Definition, headstyle=bold, inbetween=\blank, before=\blank, after=\blank, way=bysection, number=nctr]
\starttext
\startremark Foo \stopremark
\placeformula[eqa;one] \startformula f(x)=x^2 \stopformula
\startdefinition Foo \stopdefinition
\stoptext
The goal is to have these come out:
Remark 1.
f(x)=x^2 (2)
Definition 3.
A second goal is to include the section number.
Remark 5-1.
f(x)=x^2 (5-2)
Definition 5-3.
My idea was to trigger commands such as \nextdefinition, \nextremark, \incrementnumber[formula] in "after=", but \nextdefinition for example gives an error. Mojca