On Thu, Mar 24, 2016 at 6:24 PM, Piotr Kopszak <kops...@gmail.com> 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
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to