From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94162 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: metafun Date: Thu, 24 Mar 2016 19:14:03 +0100 Message-ID: References: <4CC338B5.6020000@FU-Berlin.DE> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1559737179261867705==" X-Trace: ger.gmane.org 1458843298 27577 80.91.229.3 (24 Mar 2016 18:14:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2016 18:14:58 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 24 19:14:42 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aj9mG-0008SW-LD for gctc-ntg-context-518@m.gmane.org; Thu, 24 Mar 2016 19:14:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2F86790C9; Thu, 24 Mar 2016 19:14:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4G7AGNrYPuCz; Thu, 24 Mar 2016 19:14:17 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id BE9B790CC; Thu, 24 Mar 2016 19:14:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 08FF490CA for ; Thu, 24 Mar 2016 19:14:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yI5GVXhxLg4g for ; Thu, 24 Mar 2016 19:14:15 +0100 (CET) Original-Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 4306890C9 for ; Thu, 24 Mar 2016 19:14:04 +0100 (CET) Original-Received: by mail-lb0-f169.google.com with SMTP id k12so36342804lbb.1 for ; Thu, 24 Mar 2016 11:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=CWeI1W7GQatJe83FamrM2AVQUgo/1ARUw5dr2QopUtM=; b=M+g3pVcFm444u6TIjKjL0xbnJ4CU3/MJqm7a/4tgkdXWJ9WiBmMeFeaqUE8BX/8mHJ 9UZddqnigXJvu84wXpBa5ZqsFs9OcqmO6H7POBNCyH+ZtLSVEK+aBssZkDak+DiszyQp 5rGqcaoyTN1NN0BQ+KWnerjhwXpDVSpourStgLFkNPqw7HTGZFlp6eQxB7fHW1nDJrOM 6pVzAU2vj2dYrvhySn+6FGJfuvPw+AKZJv0j3ohyBiYNVECKGgLPQhO6qlzWar/mcowE qpo8WhX8YFkJ4A4YIBQL/o/vcIrTpwpxJpvfll//puRrzDxCSPzdzL+VAJqhTn2OrshC 7fGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=CWeI1W7GQatJe83FamrM2AVQUgo/1ARUw5dr2QopUtM=; b=ErPegfPK9zAvSTc3ACWrCEn80KsuB5bOKj3rA1xTU7UfQNVS5Bf35dcPn7hk2QvYXg KdueNl2pF3TAHqW1eSkL/OEiPdZMSiiOBJGfks3GyRGVhlJaxab7NBvHpHaLI3Bz4hr1 QLRWPXworJxOVJfcBz0QfNWiqQHTjqXjzYSJFSYZ3jjmClA5kU1zciq43pmL8x9nBPWf z2i3QsBZMYI8Thx8blbbK9X9EOhR1iUl3tvOwvoA332zvFbvJ4V2k0WQYoQKpHnqzvEJ PzBwOH3rl6WjAC2EmjL8sUM++yecrWN6tTKx0D65R8AYnIVAU4rvqizdGmbH445tNGxx YDfg== X-Gm-Message-State: AD7BkJLQXiB9YHJy3/cXbatrEe4UmkmerI0RlO0TuyFKgWdn42PLTxDyhz3m4TvnPwCUfxyk5wh2yoLtA+1GnA== X-Received: by 10.112.63.135 with SMTP id g7mr4065872lbs.54.1458843243982; Thu, 24 Mar 2016 11:14:03 -0700 (PDT) Original-Received: by 10.25.158.65 with HTTP; Thu, 24 Mar 2016 11:14:03 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:94162 Archived-At: --===============1559737179261867705== Content-Type: multipart/alternative; boundary=001a11c3ea425733ce052ecf6950 --001a11c3ea425733ce052ecf6950 Content-Type: text/plain; charset=UTF-8 On Thu, Mar 24, 2016 at 6:24 PM, Piotr Kopszak wrote: > P.S. > > For your conveniance, the minimal example: > > \startMPpositiongraphic{mypos:arrow} > pair c[] ; > initialize_box(\MPpos{\MPvar{self}}); > c[1] := cxy ; > initialize_box(\MPpos{\MPvar{to}}); > c[2] := cxy ; > drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ; > \stopMPpositiongraphic > \startpositionoverlay{arrow} > \setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2} > \setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3} > \stoppositionoverlay > \defineoverlay[arrow][\positionoverlay{arrow}] > \setupbackgrounds[page][background=arrow] > > > \starttext > > \section {Anchors and layers} > > In a previous section we saw that some \hpos{X-1}{words} were > \hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}. > As with most things in \CONTEXT, marking these words is separated > from declaring what to do with those words. This paragraph is keyed > in as: > > \stoptext > > > context testsuite http://www.pragma-ade.nl/context/latest/cont-tst.7z doc/context/tests/mkiv/metafun/connected-001.tex \startMPdefinitions % I don't know why this does not get loaded automatically. Answer: seldom needed. input mp-abck.mpiv; \stopMPdefinitions \startMPpositiongraphic{mypos:arrow} %if unknown context_apos : input mp-apos.mpiv ; fi ; pair c[] ; initialize_box(\MPpos{\MPvar{self}}); c[1] := cxy ; initialize_box(\MPpos{\MPvar{to}}); c[2] := cxy ; drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ; \stopMPpositiongraphic \startpositionoverlay{arrow} \setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2} \setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3} \stoppositionoverlay \defineoverlay[arrow][\positionoverlay{arrow}] \setupbackgrounds[page][background=arrow] \starttext \section {Anchors and layers} In a previous section we saw that some \hpos{X-1}{words} were \hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}. As with most things in \CONTEXT, marking these words is separated from declaring what to do with those words. This paragraph is keyed in as: \stoptext -- luigi --001a11c3ea425733ce052ecf6950 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Thu, Mar 24, 2016 at 6:24 PM, Piotr Kopszak <kopszak@gmail.com&= gt; wrote:
P.S.

For your conveniance, the minimal example:

\startMPpositiongraphic{mypos:arrow}
=C2=A0 =C2=A0pair c[] ;
=C2=A0 =C2=A0initialize_box(\MPpos{\MPvar{self}});
=C2=A0 =C2=A0c[1] :=3D cxy ;
=C2=A0 =C2=A0initialize_box(\MPpos{\MPvar{to}});
=C2=A0 =C2=A0c[2] :=3D cxy ;
=C2=A0 =C2=A0drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic
\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=3DX-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=3DX-3}
\stoppositionoverlay
\defineoverlay[arrow][\positionoverlay{arrow}]
\setupbackgrounds[page][background=3Darrow]


\starttext

\section {Anchors and layers}

In a previous section we saw that some \hpos{X-1}{words} were
\hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:

\stoptext



context te= stsuite

doc/context/tests/mkiv/metafun/connected-001.tex

\startMPdefinitions
=C2=A0 =C2=A0 % I don'= t know why this does not get loaded automatically. Answer: seldom needed.
=C2=A0 =C2=A0 input mp-abck.mpiv;
\stopMPdefinitions

\startMPpositiongraphic{mypos:arrow}
=C2=A0= =C2=A0%if unknown context_apos : input mp-apos.mpiv ; fi ;
=C2= =A0 =C2=A0pair c[] ;
=C2=A0 =C2=A0initialize_box(\MPpos{\MPvar{se= lf}});
=C2=A0 =C2=A0c[1] :=3D cxy ;
=C2=A0 =C2=A0initia= lize_box(\MPpos{\MPvar{to}});
=C2=A0 =C2=A0c[2] :=3D cxy ;
<= div>=C2=A0 =C2=A0drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic
\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=3DX-2}
\setMPpositi= ongraphic{X-2}{mypos:arrow}{to=3DX-3}
\stoppositionoverlay
<= div>\defineoverlay[arrow][\positionoverlay{arrow}]
\setupbackgrou= nds[page][background=3Darrow]


\star= ttext

\section {Anchors and layers}

=
In a previous section we saw that some \hpos{X-1}{words} were
\hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:

\stoptext

-= -
luigi
--001a11c3ea425733ce052ecf6950-- --===============1559737179261867705== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1559737179261867705==--