Am 27.11.2011 um 23:27 schrieb Otared Kavian:

> Dear all,
> 
> Is it possible to have a sort of « local references for formulas » or else to 
> clear previous references to formulas at a certain point?
> In a chapter where a certain number of exercices and formulas are to be 
> numbered, assume I have the following minimal example
> 
> %%%%%%%%% begin
> \starttext
> 
> Exercice 1. Prove that if $ab=ba$ and $2ab=0$ then
> \placeformula[eq:1]
> \startformula
> (a+b)^2 = a^2 + b^2.
> \stopformula
> Using the identity (\in[eq:1]) prove that $(a=b)^{2n} = a^{2n} + b^{2n}$.
> 
> \blank[big]
> \hrule
> \blank[big]
> 
> Exercice 2. Prove that for any integer $n$
> \resetnumber[formula]
> %\reset[formulas][references]
> \placeformula[eq:2] % I would like the reference to be [eq:1]
> \startformula
> (\cos(x) + {\rm i}\sin(x))^n = \cos(nx) + {\rm i} \sin(nx).
> \stopformula
> Using the identity (\in[eq:2]) % I would like here to say [eq:1]
> compute $\cos{3x}$.
> 
> \stoptext
> %%%%%%%%% end
> 
> I would like to be able to have the equations numbered within each exercise 
> (which is in fact defined through an enumeration environment), and be able to 
> have the reference to each formula « local » within that exercise.
> The resaon is that the execises and problems may have several equations which 
> are referenced to with [eq:1] through [eq:10] (say…), and have been prepared 
> and given previously to students on independent sheets. When I want to give 
> out a booklet of all the exercises, then it would be handy to have such a 
> feature.
> 
> I understand that I am not being very clear… Hope someone would understand 
> what I mean and need :-)

Look at page 168: http://pragma-ade.com/general/manuals/cont-enp.pdf

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to