From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64911 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 17:47:36 +0100 Message-ID: <334F07D3-29E5-4036-94C9-835541F1D12D@uni-bonn.de> References: <4D21D905.8000800@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="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294073298 8280 80.91.229.12 (3 Jan 2011 16:48:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 16:48:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 03 17:48:14 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 1PZnZt-00071S-Lv for gctc-ntg-context-518@m.gmane.org; Mon, 03 Jan 2011 17:48:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 96142CA931; Mon, 3 Jan 2011 17:48:12 +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 pvHRt5tQt013; Mon, 3 Jan 2011 17:48:08 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9EE88CA9B6; Mon, 3 Jan 2011 17:48:08 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8EBC7CA9B6 for ; Mon, 3 Jan 2011 17:48:07 +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 wlPVDao9NQog for ; Mon, 3 Jan 2011 17:47:55 +0100 (CET) Original-Received: from filter7-ams.mf.surf.net (filter7-ams.mf.surf.net [192.87.102.75]) by balder.ntg.nl (Postfix) with ESMTP id 63B9ECA931 for ; Mon, 3 Jan 2011 17:47:55 +0100 (CET) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by filter7-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p03GlqJT028584 for ; Mon, 3 Jan 2011 17:47:53 +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 52493627 for ntg-context@ntg.nl; Mon, 03 Jan 2011 17:47:52 +0100 In-Reply-To: <4D21D905.8000800@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: 0DDP4LQRt - a08793979609 - 20110103 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.75 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:64911 Archived-At: On Jan 3, 2011, at 3:11 PM, Daniel Schopper wrote: > Dear list, > this seems a really basic question (and probably not even strictly ConTeX= t-focused) - so please accept my apologies=85 > = > I'm trying to construct a macro which first creates two labels in the tex= t (\start/stopline and \pagereference) with the value of a counter as the l= abel name and then a footnote which prints the page and line numbers of tho= se two. Supposedly because of my limited understanding of TeX's expansion m= echanism I haven't been able to get things working with this code: > = > \setuplinenumbering[% > location=3Dinner, > step=3D5, > method=3Dpage, > style=3D\tfxx, > align=3Dleft, > distance=3D1.5cm, > width=3D0.3cm] > \setupfootnotes[ > location=3Dtext, > numberconversion=3Dempty, > paragraph=3Dyes, > ] > \definenumber[entrycounter] > \setnumber[entrycounter]{0} > \def\appentry#1#2{% > \startline[line:\getnumber[entrycounter]]% > \pagereference[page:\getnumber[entrycounter]]% > #1% > \stopline[line:\getnumber[entrycounter]]% > \footnote{{\bf \at[page:\getnumber[entrycounter]]}% > \inline[line:\getnumber[entrycounter]] #1] #2}% > \incrementnumber[entrycounter]% > } > = > By now I tried to adapt a LaTeX-only-solution which Uwe Lueck suggested o= n the texhax-mailinglist some years ago (cf. http://tug.org/pipermail/texha= x/2006-July/006599.html) but failed quite miserably. > I also tried the same with plain TeX registers (\newcount\entrycounter \e= ntrycounter=3D0 etc.) instead of ConTeXt counters. > Could it be easier to stuff the \pagereference and \startline-commands in= to before=3D and after=3D of setupfootnotes? > Could anyone please give me a hint on this? > = The most important hint: please build test files that will compile. Take ou= t anything which isn't relevant to your problem. Knowledgeable people on th= is list are quite unlikely to wade through code snippets. This page http://= www.minimalbeispiel.de/mini-en.html is somewhat biased towards LaTeX, but y= ou should get the drift. > The purpose of this: I'm trying to use mkIV's page and linenumbering faci= lities for a critical apparatus (in this case endnotes with page and line r= eferences). As I didn't succeed with Hans Hagen's recent suggestion (cf. ht= tp://www.mail-archive.com/ntg-context@ntg.nl/msg49695.html) Again, please provide relevant information. "Didn't work" is not enough inf= ormation - maybe the color of your mousepad isn't quite right, maybe you fo= rgot a closing brace, who knows? = Finally: is the format of your apparatus (endnotes) a requirement? You can = try and search the mail archive for "linenotes" and have a look at strc-lnt= .mkiv. This will build one (or more) apparatus at the bottom of the page; I= 'm not sure if those can be selected in endnotes. Thomas ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________