From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64913 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: counter values as label names Date: Mon, 3 Jan 2011 22:15:01 +0100 Message-ID: <3268D707-0647-4A8E-8803-4A9F71278704@uni-bonn.de> References: <4D21D905.8000800@aon.at> <334F07D3-29E5-4036-94C9-835541F1D12D@uni-bonn.de> <4D2210CE.5010709@aon.at> 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 1294089349 24585 80.91.229.12 (3 Jan 2011 21:15:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 21:15:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 03 22:15:45 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 1PZrkm-0005yK-N7 for gctc-ntg-context-518@m.gmane.org; Mon, 03 Jan 2011 22:15:44 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D6726CA9C4; Mon, 3 Jan 2011 22:15:43 +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 G2UAXpCMLO6K; Mon, 3 Jan 2011 22:15:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 62723CA9BB; Mon, 3 Jan 2011 22:15:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 74B79CA9BB for ; Mon, 3 Jan 2011 22:15:30 +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 Rdn2qCttLJ7u for ; Mon, 3 Jan 2011 22:15:19 +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 EF359CA9BA for ; Mon, 3 Jan 2011 22:15:18 +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 p03LFI7e008843 for ; Mon, 3 Jan 2011 22:15:18 +0100 Original-Received: from [87.178.62.3] (account tschmit1@uni-bonn.de HELO [192.168.0.2]) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.2.12) with ESMTPA id 52504110 for ntg-context@ntg.nl; Mon, 03 Jan 2011 22:15:17 +0100 In-Reply-To: <4D2210CE.5010709@aon.at> X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.5 (Score 0, tokens from: ) 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: 0eDP9fiaE - ebea4916d7eb - 20110103 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:64913 Archived-At: On Jan 3, 2011, at 7:09 PM, Daniel Schopper wrote: > \setupfootnotes[ > location=text, > numberconversion=empty, > paragraph=, > ] > \newcount\entrycounter > \entrycounter=0 > \def\appentry#1#2{% > \startline[line:\the\entrycounter]% > \pagereference[page:\the\entrycounter]% > #1% > \stopline[line:\the\entrycounter]% > \footnote{{\bf \at[page:\the\entrycounter]} \inline[line:\the\entrycounter] #1] #2}}% > \advance\entrycounter by1% > \starttext\startlinenumbering > This is a sample \appentry{paragraph}{om. h1}.\\ > An this is another \appentry{one}{sentence}. > \stoplinenumbering > \bigskip > Endnotes > \placefootnotes > \stoptext Tricky. I can't figure out how to do it. First, the code you write can never work. You define a \newcount and set it to 0. Before your text starts, you increase this count, so now its value is 1. Then, you never touch this value again, so effectively, all your references expand to page:1 and line:1. (And, on top of it all, your file has only one line since \\ doesn't start a new line.) But even if you try to increment your counter within the definition of your macro, it won't work because it will be advanced and frozen by the time your footnotes are typeset. So this approach will not work, I'm afraid. I'm not sure this can be done in ConTeXt. 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 ___________________________________________________________________________________