From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64803 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: \note and \footnote Date: Thu, 23 Dec 2010 21:58:25 +0100 Message-ID: <7B8BD966-D408-40C8-886B-6518FD3A9403@uni-bonn.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1293137944 4790 80.91.229.12 (23 Dec 2010 20:59:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Dec 2010 20:59:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 23 21:59:00 2010 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 1PVsFX-00083C-Tj for gctc-ntg-context-518@m.gmane.org; Thu, 23 Dec 2010 21:58:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 151F3CA986; Thu, 23 Dec 2010 21:58:59 +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 yXBSylA9KVe0; Thu, 23 Dec 2010 21:58:54 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9E82BCA97C; Thu, 23 Dec 2010 21:58:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B5EAECA97C for ; Thu, 23 Dec 2010 21:58: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 2DSX9SZVKHj1 for ; Thu, 23 Dec 2010 21:58:42 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 81C66CA97B for ; Thu, 23 Dec 2010 21:58:42 +0100 (CET) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBNKwfkY028983 for ; Thu, 23 Dec 2010 21:58:42 +0100 Original-Received: from [87.178.31.133] (account tschmit1@uni-bonn.de HELO [192.168.0.2]) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.2.12) with ESMTPA id 52158235 for ntg-context@ntg.nl; Thu, 23 Dec 2010 21:58:41 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=131.220.15.113; country=DE; region=07; city=Bonn; latitude=50.7333; longitude=7.1000; http://maps.google.com/maps?q=50.7333,7.1000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eDKIWFDo - b097b1d28f94 - 20101223 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:64803 Archived-At: On Dec 23, 2010, at 9:47 PM, Jon Crump wrote: > Attached is a minimal working example, along with the pdf output I got running: > context --environment=doublefoot.tex doublefoot.xml Why do you use the intermediate step of creating a macro? I think this does what you want: \startxmlsetups xml:ref \xmldoifelse{#1}{parent::div[@type='arText']} {\footnote[\xmlatt{#1}{target}] {\xmlfirst{#1} {root::/body/text/div[@type='fnotes']/note[@xml:id==string.sub('\xmlatt{#1}{target}',2)]} } } {\note[\xmlatt{#1}{target}]} \xmlflush{#1} \stopxmlsetups Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________