From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72794 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Resetting references or local references? Date: Mon, 28 Nov 2011 11:24:29 +0100 Message-ID: <3D6D0467-38C7-427E-9882-D97CB1362D7B@googlemail.com> References: <256E87E8-CCD2-4843-A1D8-0F90129333E3@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1322475899 32048 80.91.229.12 (28 Nov 2011 10:24:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2011 10:24:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 28 11:24:55 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RUyOM-0003lP-4R for gctc-ntg-context-518@m.gmane.org; Mon, 28 Nov 2011 11:24:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 809A5CB0F0; Mon, 28 Nov 2011 11:24:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Wd+S741xAgr3; Mon, 28 Nov 2011 11:24:47 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EAA93CB0F7; Mon, 28 Nov 2011 11:24:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 78740CB0F7 for ; Mon, 28 Nov 2011 11:24:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id B8Dc2xkvQ+WY for ; Mon, 28 Nov 2011 11:24:39 +0100 (CET) Original-Received: from filter2-nij.mf.surf.net (filter2-nij.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id CB69FCB0F3 for ; Mon, 28 Nov 2011 11:24:39 +0100 (CET) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter2-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pASAOc2R006865 for ; Mon, 28 Nov 2011 11:24:39 +0100 Original-Received: by faaa26 with SMTP id a26so43382faa.14 for ; Mon, 28 Nov 2011 02:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=EXgf8t/q3Hi4mh5rnvtMOO5wdJPY/luwtkJLf5Zj2eQ=; b=wnUv04vusVr2vyDV0W3eK3f/T9BpOG5GO9idKTLWZ2PqpWhweCwUiYWaCTxxkpIbow 3WPWFSEzLRGTNnPPtEEzenjR6C0g7vrOI8PzVWx0auJxXQORIcmre2VvUtr9YYuU7BCz 846JNyq0YwYmz3xyXc9sfbUzxxzGAHLAWkTzo= Original-Received: by 10.204.9.216 with SMTP id m24mr44060429bkm.98.1322475878393; Mon, 28 Nov 2011 02:24:38 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFB6F4.dip.t-dialin.net. [87.175.182.244]) by mx.google.com with ESMTPS id d2sm5343177bky.11.2011.11.28.02.24.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 02:24:37 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0aG2yoCrr - 8313d32939ee - 20111128 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72794 Archived-At: Am 28.11.2011 um 10:18 schrieb Otared Kavian: > Hi Wolfgang, > = > Many thanks for your attention and the link you sent. > I looked up the chapter on references of the main manuel written by Hans,= but unfortunately I could not find a solution, or could not adapt what is = said there. = > It can be that I have to change my approach of defining my =AB exercises = =BB, for instance by defining each exercise as a section or subsection? = > Up to now I have two ways of defining an =AB exercise =BB: = > =95 one is with \defineenumeration[Exo] (when using mkii), = > =95 the other one is with \defineannotation[Exo] and your annotation mod= ule when using mkiv. > = > In neither case the command > \setupreferencing[prefix=3D+] > or > \setupannotation[Exo][prefix=3D+] > seems to generate local tags. = > = > Just in case, below is a minimal file, which shows how I use the annotati= on module. There are a few fixes needed in the mechanism but as you can see below it w= orks when you know what=92s wrong but to complete the function for MkIV Hans needs a shorter example. \setupinteraction[state=3Dstart] \usemodule[annotation] \define[2]\ExoSetup {%doifsomething{\annotationparameter{prefix}}{\setupreferencing[prefix=3D= \annotationparameter{prefix}]}% \doifsomething{\annotationparameter{prefix}}{\setupreferenceprefix[\anno= tationparameter{prefix}]}% \doifsomething{\annotationparameter{prefix}}{\setupformulas[referencepre= fix=3D\annotationparameter{prefix}]}% \resetnumber[formula] \textrule{#1}% \startframedtext[width=3D\textwidth,frame=3Doff,leftframe=3Don]% #2% \stopframedtext} = \defineannotation [Exo] [alternative=3Dcommand, command=3D\ExoSetup, text=3DExercise , number=3Dyes, headcolor=3Ddarkred] \starttext \startExo[prefix=3DCharacTwo] Prove that if $ab=3Dba$ and $2ab=3D0$ then \placeformula[eq:1] \startformula (a+b)^2 =3D a^2 + b^2. \stopformula Using the identity (\in[eq:1]) prove that $(a=3Db)^{2n} =3D a^{2n} + b^{2n}= $. \stopExo \page \startExo[prefix=3DMoivre]{Moivre's formula} Prove that for any integer $n$ \placeformula[eq:1] \startformula (\cos(x) + {\rm i}\sin(x))^n =3D \cos(nx) + {\rm i} \sin(nx). \stopformula Using the identity (\in[eq:1]) compute $\cos{3x}$. \stopExo \page \starttabulate[|Tl|l|] \NC eq:1 \NC \in{Equation}[eq:1] \= NC\NR \NC CharacTwo:eq:1 \NC \in{Equation}[CharacTwo eq:1] \= NC\NR \NC CharacTwo:eq:1 \NC \def\referenceprefix{CharacTwo}\in{Equation}[eq:1] \= NC\NR \NC Moivre:eq:1 \NC \in{Equation}[Moivre eq:1] \= NC\NR \NC Moivre:eq:1 \NC \def\referenceprefix{Moivre}\in{Equation}[eq:1] \= NC\NR \stoptabulate \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________