From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59210 Path: news.gmane.org!not-for-mail From: "Yury G. Kudryashov" Newsgroups: gmane.comp.tex.context Subject: Re: referenceformat MkIV Date: Mon, 31 May 2010 22:32:09 +0400 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart3990813.eNTIcorCPl" X-Trace: dough.gmane.org 1275330750 16724 80.91.229.12 (31 May 2010 18:32:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 May 2010 18:32:30 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon May 31 20:32:29 2010 connect(): No such file or directory 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 1OJ9mm-0008MY-CE for gctc-ntg-context-518@m.gmane.org; Mon, 31 May 2010 20:32:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C5E9CC9BD4; Mon, 31 May 2010 20:32:26 +0200 (CEST) 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 nusoc2If1+Bb; Mon, 31 May 2010 20:32:24 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 36405C9CCE; Mon, 31 May 2010 20:32:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 17390C9CCE for ; Mon, 31 May 2010 20:32:23 +0200 (CEST) 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 woh1Uba1hCA1 for ; Mon, 31 May 2010 20:32:20 +0200 (CEST) Original-Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by balder.ntg.nl (Postfix) with ESMTP id C9856C9BD4 for ; Mon, 31 May 2010 20:32:20 +0200 (CEST) Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OJ9md-0008G9-8W for ntg-context@ntg.nl; Mon, 31 May 2010 20:32:19 +0200 Original-Received: from 212.192.251.49 ([212.192.251.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 May 2010 20:32:19 +0200 Original-Received: from urkud by 212.192.251.49 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 May 2010 20:32:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Followup-To: gmane.comp.tex.context Original-Lines: 78 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.192.251.49 User-Agent: KNode/4.4.3 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:59210 Archived-At: --nextPart3990813.eNTIcorCPl Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Yury G. Kudryashov wrote: > Hi! > > I try the following: > > \definereferenceformat[ineq][left=(,right=),text=Equation] > \starttext > \placeformula[first] > \startformula > 2=2 > \stopformula > In \in[first] ineq \ineq[first] in \in[first]. > \stoptext > > The result is: > 2 = 2 (1) > In 1 ineq (1) in (1). > > It seems that \ineq doesn't clear some variables, and the next \in uses > the previous format. Please, apply the attached patch upstream. It fixed the problem for me. Another problem fixed by my patch: \definereferenceformat[ineq][text=equation] \starttext \placeformula[first] \startformula 1=1\stopformula \ineq[first] \stoptext printed "1", not "equation 1". --nextPart3990813.eNTIcorCPl Content-Type: text/x-patch; name="referenceformat-fix.patch" Content-Disposition: attachment; filename="referenceformat-fix.patch" Content-Transfer-Encoding: quoted-printable --- a/tex/texmf-context/tex/context/base/strc-ref.mkiv 2010-05-21 15:44:0= 4.000000000 +0400 +++ b/tex/texmf-context/tex/context/base/strc-ref.mkiv 2010-05-31 22:18:3= 8.000000000 +0400 @@ -983,10 +983,13 @@ {\ifx\next\bgroup \afterassignment\doinatreferenceonetwo \expandafter\leftreferencetoks - \else + \else\ifx\textofreference\empty \leftreferencetoks\emptytoks \expandafter\dodoinatreferencenone - \fi} + \else + \leftreferencetoks{\textofreference}% + \expandafter\doinatreferenceonetwo + \fi\fi} =20 \def\doinatreferenceonetwo {\futurelet\next\doinatreferencetwo} @@ -1022,7 +1025,11 @@ \doifreferencefoundelse{#4} {\doifelsenothing{#1}\dosymbolreference\dowantedreference{#1}{#2}[#= 4]}% {\dounknownreference{#1}{#2}[#4]}% - \endgroup} + \endgroup% + \global\let\leftofreference\relax + \global\let\rightofreference\relax + \global\let\textofreference\empty + } =20 \let\dosymbolreference\dowantedreference =20 --nextPart3990813.eNTIcorCPl Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --nextPart3990813.eNTIcorCPl--