From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64910 Path: news.gmane.org!not-for-mail From: Achim Jander Newsgroups: gmane.comp.tex.context Subject: still struggling with footnotes Date: Mon, 03 Jan 2011 16:51:31 +0100 Message-ID: <4D21F083.8080000@jander.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294069941 22927 80.91.229.12 (3 Jan 2011 15:52:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 15:52:21 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 03 16:52:17 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 1PZmhl-0007wB-JT for gctc-ntg-context-518@m.gmane.org; Mon, 03 Jan 2011 16:52:17 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F28DDCA9A9; Mon, 3 Jan 2011 16:52:16 +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 XyNcrjMGrTCK; Mon, 3 Jan 2011 16:52:13 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D912FCA9B2; Mon, 3 Jan 2011 16:52:12 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 821D7CA9B2 for ; Mon, 3 Jan 2011 16:52:11 +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 ZCZinDVlvd8d for ; Mon, 3 Jan 2011 16:52:00 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 6851DCA9A9 for ; Mon, 3 Jan 2011 16:52:00 +0100 (CET) Original-Received: from p15188155.pureserver.info (p15188155.pureserver.info [212.227.83.96]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p03Fpxt5009150 for ; Mon, 3 Jan 2011 16:51:59 +0100 Original-Received: (qmail 4930 invoked from network); 3 Jan 2011 16:51:59 +0100 Original-Received: from krlh-5f725dac.pool.mediaways.net (HELO ?192.168.1.43?) (95.114.93.172) by p15188155.pureserver.info with SMTP; 3 Jan 2011 16:51:59 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=212.227.83.96; country=DE; region=01; city=Karlsruhe; latitude=49.0047; longitude=8.3858; http://maps.google.com/maps?q=49.0047,8.3858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08DP3PXTK - c09eba47fb24 - 20110103 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:64910 Archived-At: Hi all, I am still trying to get the footnote numbers aligned in a special way: flushright, but the width depends on the width of the max footnote-number on page, so to get 1 2 and ~9 10 After reading the manuals and the source given in strc-not.lua thats how far i am at the moment: \enabletrackers[structures.notes] \setupnote[footnote][numbercommand=, way=bypage] \setupnotedefinition[footnote][location=left,distance=1em,hang=4,headalign={flushright},width=1em] \def\getmaxnote[#1]{\ctxlua{ local n = structures.notes.getn("#1",n) local current = structures.notes.get("#1",n) local cr = current.references local result = cr.realpage -- calculate the width of cr.number and store in maxwidth -- loop through the notes until act.realpage <> cr.realpage -- and for each note calculate the width, compare with maxwidh and store the max -- then set the width to the correct maxwidth -- context.setupnotedefinition({"footnote"}, {width=maxwidth}) } } \appendtoks \getmaxnote[footnote] \to\everybeforenoteinsert \showframe \starttext \dorecurse {100} { test \footnote{test } } \stoptext Now I can not figure out how to get the "real" footnote-number of the note (is there any way?) And does this approach make sense at all? Any hints welcome, i tear my hair for hours now Greetings, Achim ___________________________________________________________________________________ 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 ___________________________________________________________________________________