[metapost] [rfe] nesting beginfig

Stephan Hennig mailing_list at arcor.de
Wed Feb 21 01:40:50 CET 2007


Hi,

inside beginfig(k)...endfig I want to output an additional figure that
is not related to k.  I tried nesting beginfig, but that doesn't work.
What's output in the outer figure before the inner figure is opened is
simply lost.  What's output after closing the inner figure is added to
the inner figure, currently.

Would it be hard to make nesting figures possible in MetaPost?

Best regards,
Stephan Hennig


beginfig(1);
  draw (0,0)--(100,100);% Belongs to fig.1, but is lost.
  beginfig(2);
    draw (0,50)--(100,50) withcolor red;% Belongs to fig.2.
  endfig;
  draw (0,100)--(100,0);% Belongs to fig.2, but should go on fig.1.
endfig;
end


More information about the metapost mailing list