ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* enumerations and fomrula with same counter
@ 2006-07-07 17:38 David Arnold
  2006-07-08  9:29 ` Mojca Miklavec
  0 siblings, 1 reply; 2+ messages in thread
From: David Arnold @ 2006-07-07 17:38 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: enumerations and fomrula with same counter
  2006-07-07 17:38 enumerations and fomrula with same counter David Arnold
@ 2006-07-08  9:29 ` Mojca Miklavec
  0 siblings, 0 replies; 2+ messages in thread
From: Mojca Miklavec @ 2006-07-08  9:29 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-08  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 17:38 enumerations and fomrula with same counter David Arnold
2006-07-08  9:29 ` Mojca Miklavec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).