From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81071 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: problem with initialize_box in mkIV Date: Wed, 06 Mar 2013 09:39:27 +0100 Message-ID: <513700BF.1010009@wxs.nl> References: <5135C724.9090909@free.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1362559172 7962 80.91.229.3 (6 Mar 2013 08:39:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Mar 2013 08:39:32 +0000 (UTC) Cc: Alexandre Gerussi To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 06 09:39:56 2013 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 1UD9tD-0002T0-Ab for gctc-ntg-context-518@m.gmane.org; Wed, 06 Mar 2013 09:39:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 99A04101E3; Wed, 6 Mar 2013 09:39:33 +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 Svv1YLBtUIKl; Wed, 6 Mar 2013 09:39:32 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id E7B12101E7; Wed, 6 Mar 2013 09:39:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4EDB3101E7 for ; Wed, 6 Mar 2013 09:39:30 +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 Cyi4gG3dnzLi for ; Wed, 6 Mar 2013 09:39:29 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 38DB1101E3 for ; Wed, 6 Mar 2013 09:39:29 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r268vd3N004615 for ; Wed, 6 Mar 2013 09:57:39 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 10178-1713362 for multiple; Wed, 06 Mar 2013 09:39:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: <5135C724.9090909@free.fr> 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; latitude=52.5000; longitude=5.7500; http://maps.google.com/maps?q=52.5000,5.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01J88VD6o - cc87923ea564 - 20130306 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:81071 Archived-At: On 3/5/2013 11:21 AM, Alexandre Gerussi wrote: > Hi there, > > i'm having problems with metapost and positional graphics in mkIV. > Here is a small test file that compiles OK with texexec but fails to > compile with context: > > % the beginning > \defineoverlay[frames][\positionoverlay{frames}] > \setupbackgrounds[page][background=frames] > > \startMPpositiongraphic{frame} > initialize_box(\MPpos{\MPvar{self}}); > draw llxy--lrxy--urxy--ulxy--cycle; > \stopMPpositiongraphic > > \startpositionoverlay{frames} > \setMPpositiongraphic{one}{frame} > \setMPpositiongraphic{two}{frame} > \stoppositionoverlay > > \starttext > This \hpos{one}{word} should be \hpos{two}{framed}. > \stoptext > % the end > > My system is a Debian Testing, but I don't believe that it is related to > the distribution, as this example also fails > in the context online compiler @ http://live.contextgarden.net/ > > The problem seems located around the initialize_box macro. The whole positioning mechanism has been overhauled last year (columns, regions, floats, the whole lot should be able to deal with it). \defineoverlay[frames][\positionoverlay{frames}] \setupbackgrounds[text][background=frames] \startMPpositiongraphic{frame} if unknown context_apos : input mp-apos.mpiv ; fi ; \MPgetposboxes{\MPvar{self}}{\MPanchorid} if nofposboxes = 1 : draw posboxes[1] ; fi ; \stopMPpositiongraphic \startpositionoverlay{frames} \setMPpositiongraphic{one}{frame} \setMPpositiongraphic{two}{frame} \stoppositionoverlay \starttext This \hpos{one}{word} should be \hpos{two}{framed}. \stoptext At some point the mp modules will be preloaded. Watch the used layer: text instead of page. At the end of anch-bck.mkiv you can find some more. 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 ___________________________________________________________________________________