From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83910 Path: news.gmane.org!not-for-mail From: Marco Patzer Newsgroups: gmane.comp.tex.context Subject: Re: MetaPost label direction prefix Date: Fri, 23 Aug 2013 15:14:50 +0200 Message-ID: <20130823131450.GI18239@homerow> References: <20130823094203.GG18239@homerow> <52175A31.5050601@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0159226789==" X-Trace: ger.gmane.org 1377263710 10994 80.91.229.3 (23 Aug 2013 13:15:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Aug 2013 13:15:10 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 23 15:15:14 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 1VCrCq-000370-Sj for gctc-ntg-context-518@m.gmane.org; Fri, 23 Aug 2013 15:15:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2F6BB10223; Fri, 23 Aug 2013 15:14:01 +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 FPVeMjwD+y9d; Fri, 23 Aug 2013 15:13:59 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 3416B1021A; Fri, 23 Aug 2013 15:13:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 828781021A for ; Fri, 23 Aug 2013 15:13:57 +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 KGwRSWenR3LO for ; Fri, 23 Aug 2013 15:13:43 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 6395C10216 for ; Fri, 23 Aug 2013 15:13:43 +0200 (CEST) Original-Received: from forward9l.mail.yandex.net (forward9l.mail.yandex.net [IPv6:2a02:6b8:0:1819::9]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r7NDEqAO030337 for ; Fri, 23 Aug 2013 15:14:53 +0200 Original-Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward9l.mail.yandex.net (Yandex) with ESMTP id 576B7E62693 for ; Fri, 23 Aug 2013 17:14:52 +0400 (MSK) Original-Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id 1552CE40555 for ; Fri, 23 Aug 2013 17:14:52 +0400 (MSK) Original-Received: from miun110-230.dynamic.miun.se (miun110-230.dynamic.miun.se [193.10.110.230]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id vzKlcMDYOX-EplOO1Ki; Fri, 23 Aug 2013 17:14:51 +0400 Mail-Followup-To: ntg-context@ntg.nl In-Reply-To: <52175A31.5050601@wxs.nl> X-PGP-Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB8CFCB65D4F08C27 User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0543 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a02:6b8:0:1819::9; country=RU X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03KgdeRM7 - c95eef40a0b8 - 20130823 X-Scanned-By: CanIt (www . roaringpenguin . com) 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:83910 Archived-At: --===============0159226789== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NgG1H2o5aFKkgPy/" Content-Disposition: inline --NgG1H2o5aFKkgPy/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2013=E2=80=9308=E2=80=9323 Hans Hagen wrote: > >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 =E2=80=9Cfo= o=E2=80=9D: >=20 > The MpIV code has namespace protection. Why run traditional in MkIV? > >=20 > >\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 >=20 > I wasn't aware of users defining extra ones. I'll add this: Probably not many users will tinker with custom label directions, but MetaPost package authors do. Some packages like piechartmp=C2=B9 internally use laboff.foo and the mpfun_ prefix breaks those packages. They work in traditional MetaPost, plain TeX, LaTeX and ConTeXt MkII, but since mplib uses the mpfun_ prefix, those packages are broken in MkIV. > [=E2=80=A6] > installlabel.foo ( 0, 1, 1, (.5,-1) ) ; This does not fix the problem since it only *defines* the correct variant, it doesn't help *using* those values. If the label values are being changed in the package one still has to branch out to support both variants. And even if there was an abstraction assisting to *use* the laboff values, all MetaPost packages tinkering with laboff would need to be adjusted. I can't imagine that to happen. Here's what the piechartmp package is doing, for instance: if laboff.@# =3D (-3,-3): % auto justification [=E2=80=A6] laboff.auto :=3D ((cosd l),(sind l)) ; labxf.auto :=3D ((cosd l) - 1) / -2 ; labyf.auto :=3D ((sind l) - 1) / -2 ; [=E2=80=A6] This code is being executed every time a label is typeset. Marco =C2=B9 http://mirrors.ctan.org/graphics/metapost/contrib/macros/piechartmp/= piechartmp.mp --NgG1H2o5aFKkgPy/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAEBAgAGBQJSF2BKAAoJEPGqVaNSn0iK3DcH/2Ju/tV8pAl118rO0NNKiFUp fnNQN5ukmidDAdE/0o5pS1koj5j1WTvhwixMSZ7b4E4+h83wRmnr+XqBed2Evl/B hGKOprOZmeKDaOVyVrYE7aWRAUYU28WWxDf1V09dhdWt2t5bW6CTi3PCz0b8lp6M iZwJZXIQwG/IpRh4zM7+F8iEl67Rg9WQqXDtqJ3T9b0EBVJv70tXz5yuZihCYyUr R8cXzsi3kjlSpXSKu38q3UJGJh5m0zkKVmmyKtDgRfQ7SZBwfUa+8pgaqEE/8lNr HaHlNp3VRplWlA281E49dQovYfefpFyBaRGLyGGOEN3bxWClPtYK9cPg7I1sI9I= =8+k4 -----END PGP SIGNATURE----- --NgG1H2o5aFKkgPy/-- --===============0159226789== 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 ___________________________________________________________________________________ --===============0159226789==--