From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83909 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: MetaPost label direction prefix Date: Fri, 23 Aug 2013 14:48:49 +0200 Message-ID: <52175A31.5050601@wxs.nl> References: <20130823094203.GG18239@homerow> 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 1377262168 25058 80.91.229.3 (23 Aug 2013 12:49:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Aug 2013 12:49:28 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 23 14:49:32 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 1VCqny-0005TS-BO for gctc-ntg-context-518@m.gmane.org; Fri, 23 Aug 2013 14:49:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E314A10225; Fri, 23 Aug 2013 14:48:18 +0200 (CEST) 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 hdxlYMCgZlYg; Fri, 23 Aug 2013 14:48:16 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 84C0F10219; Fri, 23 Aug 2013 14:48:16 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6F86C10219 for ; Fri, 23 Aug 2013 14:48:15 +0200 (CEST) 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 FH7uW3j8n0H6 for ; Fri, 23 Aug 2013 14:48:05 +0200 (CEST) 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 6394F10216 for ; Fri, 23 Aug 2013 14:48:05 +0200 (CEST) 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 r7NCnEmN012808 for ; Fri, 23 Aug 2013 14:49:15 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 2584-1713362 for ; Fri, 23 Aug 2013 14:49:14 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <20130823094203.GG18239@homerow> 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: 0VKgcNfbM - 01b8c0bb3cc6 - 20130823 (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:83909 Archived-At: On 8/23/2013 11:42 AM, Marco Patzer wrote: > Hi, > > what is the reason the label direction prefix variables (rt, bot, > llft, etc.) are prefixed with mpfun_ in MkIV (mp-mlib.mpiv)? When > new directional prefixes are being defined it fails when mplib is > used unless the mpfun_ prefix is added. And likewise, code using the > mpfun_ prefix fails on traditional MetaPost. So is anyone using mkiv still using MkII? > Is this prefix required? It breaks old code and required a branch in > every new project. And I don't really see a reason for this > incompatibility. Here is an example defining a new direction =93foo=94: The MpIV code has namespace protection. Why run traditional in MkIV? > \starttext > \startMPcode > label("first", origin); > > %% MkIV > %% pair mfun_laboff.foo ; mfun_laboff.foo :=3D (.5,-1) ; > %% mfun_labxf.foo :=3D mfun_labyf.foo :=3D 1 ; > > %% MkII > pair laboff.foo ; laboff.foo :=3D (.5,-1) ; > labxf.foo :=3D labyf.foo :=3D 1 ; > > label.foo("second", origin); > \stopMPcode > \stoptext I wasn't aware of users defining extra ones. I'll add this: \starttext \startMPcode label("first", origin); if known mfun_laboff : vardef installlabel@\# (expr type, x, y, offset) =3D numeric mfun_labtype @\# ; mfun_labtype @\# :=3D type ; pair mfun_laboff @\# ; mfun_laboff @\# :=3D offset ; numeric mfun_labxf @\# ; mfun_labxf @\# :=3D x ; numeric mfun_labyf @\# ; mfun_labyf @\# :=3D y ; enddef ; else : vardef installlabel@\# (expr type, x, y, offset) =3D numeric labtype @\# ; labtype @\# :=3D type ; pair laboff @\# ; laboff @\# :=3D offset ; numeric labxf @\# ; labxf @\# :=3D x ; numeric labyf @\# ; labyf @\# :=3D y ; enddef ; fi ; installlabel.foo ( 0, 1, 1, (.5,-1) ) ; label.foo("second", origin); \stopMPcode \stoptext ----------------------------------------------------------------- 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 ___________________________________________________________________________= ________