From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74547 Path: news.gmane.org!not-for-mail From: Philipp Gesang Newsgroups: gmane.comp.tex.context Subject: Re: [beta] anch-pos.lua Date: Fri, 17 Feb 2012 02:05:14 +0100 Message-ID: <20120217010514.GB16002@phlegethon> References: <4F3CC994.1090509@wxs.nl> <20120216180142.GA16002@phlegethon> <4F3D78A9.8080200@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0876902736==" X-Trace: dough.gmane.org 1329440733 18496 80.91.229.3 (17 Feb 2012 01:05:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2012 01:05:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 17 02:05:28 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RyCGK-0007sl-DB for gctc-ntg-context-518@m.gmane.org; Fri, 17 Feb 2012 02:05:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C017ACB286; Fri, 17 Feb 2012 02:05:23 +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 AKOrmELthu9L; Fri, 17 Feb 2012 02:05:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DBA26CB27E; Fri, 17 Feb 2012 02:05:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E9E5CCB27E for ; Fri, 17 Feb 2012 02:05:15 +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 Z93acnJDqC3i for ; Fri, 17 Feb 2012 02:05:01 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 1EB37CB27A for ; Fri, 17 Feb 2012 02:05:01 +0100 (CET) Original-Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q1H14w2r009134 for ; Fri, 17 Feb 2012 02:04:58 +0100 Original-Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q1H14t17009824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Feb 2012 02:04:56 +0100 Original-Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q1H14tK8030568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Feb 2012 02:04:55 +0100 Original-Received: from localhost (dslb-188-104-152-147.pools.arcor-ip.net [188.104.152.147]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id q1H14soJ032050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 17 Feb 2012 02:04:54 +0100 Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: <4F3D78A9.8080200@wxs.nl> X-Operating-System: Linux phlegethon 3.2.5-1-ARCH X-Polite-Request: "Please try to be nice, don't send html mail." User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=129.206.210.211; country=DE; region=01; city=Heidelberg; latitude=49.4167; longitude=8.7000; http://maps.google.com/maps?q=49.4167,8.7000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bGyN4WMh - 1ed8dfe3936b - 20120217 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:74547 Archived-At: --===============0876902736== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CUfgB8w4ZwR/yMy5" Content-Disposition: inline --CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-02-16 22:44, Hans Hagen wrote: > On 16-2-2012 19:01, Philipp Gesang wrote: > >there seems to be a typo in anch-pos.lua, line 100: > > > >=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7 > >- local r =3D collected[region] > >+ local r =3D collected[tag] > >=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7 > > > >(=E2=80=9Cregion=E2=80=9D references a boolean.) >=20 > not so much a typo but i'll add some more checks The new code is solid. >=20 > >Here=E2=80=99s an example that triggers the bug and works after the > >patch is applied. I have no idea as to why this exact series of > >macros causes the issue. Please have a look at it anyways because > >the text background looks weird even after. > > > >=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7 > >\definetextbackground[tb] > >\setuptyping[ > > after=3D{\stoptextbackground}, > > before=3D{\starttextbackground[tb]}, > >] >=20 > add [location=3Dparagraph] Thanks, looks good now! Philipp >=20 > >\starttext > > > >foo > >\starttyping > >bar > >\stoptyping > >baz > > > >\starttabulate[|r|l|] > > \NC foo \NC bar \AR > >\stoptabulate% >=20 > ^^ missing \NC >=20 >=20 >=20 >=20 > >\stoptext > >=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7 > > > >Regards > >Philipp > > > > > > > > > >> > >>\setuptextbackground > >> [mp=3Dmpos:par:region, > >> method=3Dmpos:par:region] > >> > >>or with some more visual tracing > >> > >>\setuptextbackground > >> [mp=3Dmpos:par:region:kind, > >> method=3Dmpos:par:region] > >> > >>A simple test with some 200 backgrounds brings down runtime with one > >>second on my machine (not the fastest anyway). > >> > >>Apart from a performance gain, backgrounds are now also supported in > >>regular multicolumns as well as in some specific mechanisms like > >>tabulate and xtables. In xtables one needs to set region=3Dyes in > >>order to get the desired results. Actually, the region key is a new > >>one in framed so anything that can be framed can also have fancy > >>text backgrounds. > >> > >>Yet another improvement is that (although rather untested) you can > >>do things like > >> > >> \starttextbackground[r] START > >> \dorecurse{10}{ > >> \dorecurse{1}{\input ward } > >> \placefigure[right]{}{} > >> some text before BEGIN \dorecurse{2}{\input ward } END some af= ter > >> \placefigure[left]{}{} > >> some text before BEGIN \dorecurse{2}{\input ward } END some af= ter > >> \placefigure[right]{}{} > >> some text before BEGIN \dorecurse{2}{\input ward } END some af= ter > >> } > >> STOP \stoptextbackground > >> \dorecurse{1}{\input ward } > >> > >>and get more or less expected results. Keep in mind that it can > >>never get perfect due to all kind of possible interference. Also, > >>keep away from internals as they will quite certainly change. > >> > >>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 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 > >>_______________________________________________________________________= ____________ > > > > > > > >________________________________________________________________________= ___________ > >If your question is of interest to others as well, please add an entry t= o the Wiki! > > > >maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-c= ontext > >webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > >archive : http://foundry.supelec.fr/projects/contextrev/ > >wiki : http://contextgarden.net > >________________________________________________________________________= ___________ >=20 >=20 > --=20 >=20 > ----------------------------------------------------------------- > 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= the Wiki! >=20 > 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 > _________________________________________________________________________= __________ --=20 () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --CUfgB8w4ZwR/yMy5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAk89p8oACgkQ02lYlJYWs9Lr8gCghrWXwTyI12Y8LV9j1+Q3x/ZE fKYAoILXlV/EhZ2mDzYjFxha5UN5nS8o =yUBp -----END PGP SIGNATURE----- --CUfgB8w4ZwR/yMy5-- --===============0876902736== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0876902736==--