[NTG-context] common counter

wwl at musensturm.de wwl at musensturm.de
Sun Sep 3 15:22:53 CEST 2006


Hallo!

This is a question to a somewhat older post:

> Date: Tue, 11 Jul 2006 09:55:28 +0200
> From: Hans Hagen <pragma at wxs.nl>
> Subject: Re: [NTG-context] Common counter
> To: mailing list for ConTeXt users <ntg-context at ntg.nl>
> Message-ID: <44B35970.3070805 at wxs.nl>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> 
> David Arnold wrote:
> > This is excellent. Now, how can I include this
> >
> > \placeformula[eq:nine]
> > \startformula
> > f(x)=x^2
> > \stopformula
> >
> > with the same common counter as remark and definition below?
> >   
> hm, it's incredible what users come up with but this time you're
> lucky -) 
> 
> \defineenumeration[whatever]
> 
> \definenumber[davidsnumber]
> 
> \setupnumber[whatever][number=davidsnumber]
> \setupnumber[formula] [number=davidsnumber]

% If one says additionally here:

\setupnumber[figure][number=davidsnumber]

> 
> \starttext
> 
> \placeformula[x]
>     \startformula x\stopformula
> 
> \startwhatever x\stopwhatever
> 
> \placeformula[x]
>     \startformula y\stopformula
> 
> \startwhatever y\stopwhatever

% and here for example:

\placefigure{image}{\framed[width=1cm,height=1cm]{image}}
 
> \stoptext

then, davidsnumber is incremented by \placefigure but not used for 
the caption etc.

How can I extend the usage of davidsnumber to captions and 
figuretables?

Wolfgang



More information about the ntg-context mailing list