[NTG-context] enumerations and fomrula with same counter

David Arnold dwarnold45 at cox.net
Fri Jul 7 19:38:44 CEST 2006


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.



More information about the ntg-context mailing list