From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64915 Path: news.gmane.org!not-for-mail From: Daniel Schopper Newsgroups: gmane.comp.tex.context Subject: Re: counter values as label names Date: Tue, 04 Jan 2011 09:38:17 +0100 Message-ID: <4D22DC79.5000505@aon.at> 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 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294130321 15459 80.91.229.12 (4 Jan 2011 08:38:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 Jan 2011 08:38:41 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 04 09:38:37 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 1Pa2Pc-0004cP-7U for gctc-ntg-context-518@m.gmane.org; Tue, 04 Jan 2011 09:38:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 988E1CA9CA; Tue, 4 Jan 2011 09:38:35 +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 ovzeco-Tj6A7; Tue, 4 Jan 2011 09:38:33 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1E30DCA9C6; Tue, 4 Jan 2011 09:38:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8D930CA9C6 for ; Tue, 4 Jan 2011 09:38:31 +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 Yq7rNafQ3tdR for ; Tue, 4 Jan 2011 09:38:20 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 0D61DCA9C5 for ; Tue, 4 Jan 2011 09:38:20 +0100 (CET) Original-Received: from email.aon.at (smtpout06.highway.telekom.at [195.3.96.89]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p048cJHw021796 for ; Tue, 4 Jan 2011 09:38:19 +0100 Original-Received: (qmail 17799 invoked from network); 4 Jan 2011 08:38:18 -0000 Original-Received: from 188-23-178-109.adsl.highway.telekom.at (HELO Daniel-Schoppers-iMac.local) ([188.23.178.109]) (envelope-sender ) by smarthub93.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 4 Jan 2011 08:38:18 -0000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=195.3.96.89; country=AT; latitude=47.3333; longitude=13.3333; http://maps.google.com/maps?q=47.3333,13.3333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cDPkCjhT - 90d5bbef1645 - 20110104 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:64915 Archived-At: Thomas and Aditya, thank you both for your replies! As Thomas already = suspected it was a mere typo that \advance\entrycounter lied outside of = the macro definition - sorry for the unnecessary confusion. I tried to compile Aditya's attempt (MKIV ver: 2010.12.31) but receive = the following errors: references : unknown reference [][lr:b:line:0] ! Missing control sequence inserted. \inaccessible > I am not sure what you want to do, My simple idea - being a total newbie to macro programming - was to = create an automation of the following, in which the unique numbers in = the label names would be inserted by a counter: \starttext \startlinenumbering This is a sample % % wrapper macro would start here \startline[line:1]\pagereference[page:1]lemma\stopline[line:1] \footnote{\at[page:1] \inline[line:1] some comment}% % and end here . \crlf And this is another = \startline[line:2]\pagereference[page:2]one\stopline[line:2]\footnote{\at[p= age:2] = \inline[line:2] another comment}. \crlf \stoplinenumbering \bigskip Endnotes \placefootnotes \stoptext But probably my whole approach is completely out of the (Con)TeXt-Way of = thinking=85 (May it be possible to collect the "endnotes" into various = buffers and recurse over them at the end?) Thanks for the hints, Daniel Am 03.01.11 23:23, schrieb Aditya Mahajan: > On Mon, 3 Jan 2011, Daniel Schopper wrote: > >> First of all thanks for the advice and sorry for my na=EFve posting! >> Here's a test file for what I try to do. The problem is that the page- >> and linenumbers printed by \placefootnotes all take the values of the >> last reference. >> >> \setupfootnotes[ >> location=3Dtext, >> numberconversion=3Dempty, >> paragraph=3D, >> ] >> \newcount\entrycounter >> \entrycounter=3D0 >> \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 >> >>> Finally: is the format of your apparatus (endnotes) a requirement? >> Yes, unfortunately it is. > > I am not sure what you want to do, but the following at least increments > the references (in MKIV) > > \setupfootnotes > [ > location=3Dtext, > numberconversion=3Dempty, > paragraph=3D, > ] > > \newcount\entrycounter \entrycounter=3D0 > \def\appentry#1#2% > {\expanded > {\startline[line:\the\entrycounter]% > \noexpand\pagereference[page:\the\entrycounter]% > #1% > \noexpand\stopline[line:\the\entrycounter]% > \noexpand\footnote{{\bf \at[page:\the\entrycounter]} > \inline[line:\the\entrycounter] > #1 #2}}% > \advance\entrycounter by 1\relax} > > \starttext > \startlinenumbering > This is a sample \appentry{paragraph}{om. h1}. \crlf > An this is another \appentry{one}{sentence}. > \stoplinenumbering > \bigskip > Endnotes > \placefootnotes > \stoptext > > > Aditya > > > > _________________________________________________________________________= __________ > 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-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________