[NTG-context] positionoverlays problem
Hans van der Meer
hansm at science.uva.nl
Thu Jul 6 21:50:12 CEST 2006
I want to use the positionoverlay mechanism in several different
figures (according to the metafun manual "Anchors and layers").
The problem is that the overlays show up in the last figure only, not
in the first.
If I do not typeset the second overlayseries, the first does appear.
It looks like only the last overlayseries is kept.
Why is this and how to remedy this?
Like this with several names overlay names:
\def\startoverlaygraphics#1{%
\startpositionoverlay{#1}%
}
\def\stopoverlaygraphics#1{%
\stoppositionoverlay
\defineoverlay[#1][\positionoverlay{#1}]
\setupbackgrounds[page][background={foreground,#1}]
}
Using it in:
\startoverlaygraphics{graphics-1}
\setMPpositiongraphic{A1}{syllabus:arrow}{to=B1}
etc.
\stopoverlaygraphics{graphics-1}
...\hpos{A1}{}...\hpos{B1}{}...
\startoverlaygraphics{graphics-2}
\setMPpositiongraphic{E1}{syllabus:arrow}{to=F1}
etc.
\stopoverlaygraphics{graphics-2}
...\hpos{E1}{}...\hpos{F1}{}...
Arrows drawn with:
\setupMPvariables[syllabus:arrow]%
[linestyle={dashed evenly},%
linesize=\tableframethickness,
coloring=FrameColor,%
axoff=0pt, ayoff=0pt, bxoff=0pt, byoff=0pt]
\startMPpositiongraphic{syllabus:arrow}{coloring}
pair a, b;
initialize_box(\MPpos{\MPvar{from}});
a := cxy;
initialize_box(\MPpos{\MPvar{to}});
b:= cxy;
pickup pencircle scaled \MPvar{linesize};
drawarrow (a + (\MPvar{axoff},\MPvar{ayoff})) --
(b + (\MPvar{bxoff},\MPvar{byoff}))
\MPvar{linestyle} withcolor \MPvar{coloring};
anchor_box(\MPanchor{\MPvar{from}});
\stopMPpositiongraphic
\endinput
Hans van der Meer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ntg.nl/pipermail/ntg-context/attachments/20060706/643d28b4/attachment-0001.html
More information about the ntg-context
mailing list