From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55615 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \everyaftershipout isn't "called" for every pagebreak Date: Sun, 17 Jan 2010 23:59:29 +0100 Message-ID: <4B539651.8010503@wxs.nl> References: <36ACBB12-6EB5-4ED9-A7A0-70F1CDDEE50D@googlemail.com> <4B53761C.3070106@wxs.nl> <4B5384E1.5010604@wxs.nl> 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: ger.gmane.org 1263769332 21256 80.91.229.12 (17 Jan 2010 23:02:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2010 23:02:12 +0000 (UTC) Cc: Andreas Schneider To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 18 00:02:05 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.50) id 1NWe8A-0004GK-Ai for gctc-ntg-context-518@m.gmane.org; Mon, 18 Jan 2010 00:02:02 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 08FBCC9D0E; Mon, 18 Jan 2010 00:02:03 +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 dbC2wbHh6RDj; Mon, 18 Jan 2010 00:01:56 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 38FBBC9D2A; Sun, 17 Jan 2010 23:59:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EC8F6C9D21 for ; Sun, 17 Jan 2010 23:59:40 +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 c6b6E0ZXIsLG for ; Sun, 17 Jan 2010 23:59:30 +0100 (CET) Original-Received: from mail.solcon.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id 495CEC9D27 for ; Sun, 17 Jan 2010 23:59:30 +0100 (CET) X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.101; Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by controller-9 (SurgeMail 4.2d2) with ESMTP id 701-1713362 for multiple; Sun, 17 Jan 2010 23:59:22 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1 Thunderbird/3.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 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:55615 Archived-At: On 17-1-2010 23:13, Andreas Schneider wrote: >> dealing with multipass data in mkiv is completely different from mkii >> and at some point there will be a proper api for users (makes no sense >> now as i might as well change internals along with luatex developments) >> >> in mkiv we store info in tables and much is available during a document >> run anyway (in mkii we filter data from the tuo file) so the question >> is, what info do you need? it's probably easier to provide it as core >> functionality >> >> so i need speccs and a small test file >> >> Hans > > Thanks for that info! > I think for specs my "plan" is too vague. I will explain what my goal is > then you either see a good solution and/or tell me that this is out of scope > for now :-) > > The test file to demonstrate the problem is in my initial newsgroup post for > this thread. I will re-attach it here. > > What I need would be a precise page break handling. Currently ConTeXt seems > to process a whole paragraph as one object, and then breaks it down to > individual pages. That leads to a problem however: > I want to refine my citation style. All bibliography is inserted into > footnotes. If two (or more) consecutive citations _on the same page_ refer > to the same bib entry, the footnote for that citation should read "Ibidem". > Therefore I have to remember the last cited entry. Currently I use > \appendtoks...\to\everyaftershipout to reset/clear the variable I use for > storing that last entry. That works fine as long as the paragraphs are > small. If however several citations within one (possibly large) paragraph > are separated by a page break, the output will be wrong, since the event to > reset the variable occurs too late (see above). > > The problem can be demonstrated with this example - the first footnote on > each page should be "New". > > \define\test{\doifelse{\getvalue{testvar}}{page}{% > \footnote{Repeat}% > }{% > \footnote{New}% > \setvalue{testvar}{page}% > }} > > \appendtoks > \global\setvalue{testvar}{} > \to\everyaftershipout > > \starttext > \dorecurse{10}{\dorecurse{250}{text }\test} > > \dorecurse{10}{\dorecurse{250}{text }\test} > \stoptext as it takes less time wrting a helper than explaining how to do it i just added it as feature (a few years from probably only wolfgang remembers that it's there) i'll upload a beta to the website that provides ... \starttext \dorecurse {100} { test \footnote{\doifnoteonsamepageelse[footnote]{ibidem}{aaa}} } \stoptext keep in mind that such features, depending on multiple passes, might result in a few more as it will never get things right the first time actually, in some cases it might make sense to delete the tuc file before a run Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________