[NTG-context] overlay

John Kitzmiller kitz at inradius.net
Sat Nov 22 21:32:19 CET 2014


Given rectangles with text:

\starttext
Before:\\
\startMPcode
  draw unitsquare xscaled 2cm yscaled 1cm;  
\stopMPcode
\\
After:\\
\startMPcode
  for i=0 upto 1:
    draw unitsquare scaled 1cm xshifted i*cm;
  endfor;
\stopMPcode
\stoptext

How can a line be drawn connecting the right edges of the rectangles? I have played with:

\startuniqueMPgraphic{line}
  path a;
  a:=(0,0)--(0,3cm);
  draw a withpen pencircle scaled 3pt withcolor green;
\stopuniqueMPgraphic

\defineoverlay[line][{\uniqueMPgraphic{line}}]

and using it in \framed, but placing the line correctly is elusive.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20141122/1404640b/attachment.html>


More information about the ntg-context mailing list