From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85315 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: (critical edition) nesting linenotes Date: Mon, 18 Nov 2013 23:25:54 +0100 Message-ID: <528A93F2.8060803@wxs.nl> References: <528A709A.3020902@gmx.es> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1384813560 28871 80.91.229.3 (18 Nov 2013 22:26:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Nov 2013 22:26:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 18 23:26:06 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ViXGf-0003pr-M8 for gctc-ntg-context-518@m.gmane.org; Mon, 18 Nov 2013 23:26:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A1D8F10245; Mon, 18 Nov 2013 23:26:04 +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 idJJdXMqUWq5; Mon, 18 Nov 2013 23:26:02 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2DD3410249; Mon, 18 Nov 2013 23:26:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C3AD210249 for ; Mon, 18 Nov 2013 23:26:00 +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 flQHr8XZXx2O for ; Mon, 18 Nov 2013 23:25:59 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 2F5CE10245 for ; Mon, 18 Nov 2013 23:25:59 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rAIMPwiv019598 for ; Mon, 18 Nov 2013 23:25:58 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.104; Original-Received: from [10.100.1.104] (unverified [10.100.1.104]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 182-1713362 for ; Mon, 18 Nov 2013 23:25:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: <528A709A.3020902@gmx.es> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VKPapW6i - 967fdf36ee31 - 20131118 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85315 Archived-At: On 11/18/2013 8:55 PM, Pablo Rodriguez wrote: > Dear Thomas, Luigi and Hans, > > my second sample might be related to the first one. But I=92m not sure it > is a bug. > > Here is the code: > > \setuppapersize[A8] > \newcounter\MyCounter > \def\CritApp#1#2{\increment\MyCounter% > \startlinenote[Varia:\MyCounter]{#1] #2}#1% > \prewordbreak\stoplinenote[Varia:\MyCounter]} > > \starttext > \startlinenumbering > \startlinenote[one]{hyphenated}this is a test on > \startlinenote[two]{with nested > linenote}hyphenation\prewordbreak\stoplinenote[two]\stoplinenote[one] > > \CritApp{this is a test on \CritApp{hyphenation}{nested linenote: bad > line number}}{not hyphenated} > \stoplinenumbering > \stoptext > > A command such as \CritApp above is intended to generate all linenote > references automagically. > > It works fine, but I cannot nest \CritApp linenotes. The problem is in > within this line: > > \startlinenote[Varia:\MyCounter]{#1] #2}#1% > > If I replace "{#1] #2}#1" with {#2}#1, nesting \CritApp linenotes, > everything works as expected. > > Is this a bug? you need to separate cases: (1) some macro that uses grouping with nested notes (2) hyphenation here is an example of the first case \setuppapersize [A8][A7] \setuplayout [location=3Dmiddle] \unexpanded\def\doCritApp#1#2#3% {\startlinenote[#1]{#2 #3}(#2)\stoplinenote[#1]} \newcounter\MyCounter \unexpanded\def\CritApp {\doglobal\increment\MyCounter \normalexpanded{\doCritApp{Varia:\MyCounter}}} % \setupnotes[linenote][split=3Dverystrict,scope=3Dpage] \starttext \startlinenumbering \startlinenote[one]{note one} one one one one one one one one one one one one one one one \startlinenote[two]{note two} two two two two two two two \stoplinenote[two] one one one one one one one one one one one one one one one \stoplinenote[one] \par \CritApp {(one one one one one one) \CritApp {(two two)} {two two two two two two} (one one one one one one)} {one one one one one one} \stoplinenumbering \stoptext so, in your macro you need to make sure that the counter (1) gets = incremented global and (2) gets expanded in time. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________