私は2つのメタポストファイルを持っています:
% test1.mp
beginfig(1):
% foobar code
% code specific to test1
endfig;
end;
% test2.mp
beginfig(1):
% foobar code
% code specific to test2
endfig;
end;
プログラマーとして、私は当然複製が嫌いです。「foobarコード」をfoobar.mpファイルに移動し、このファイルをtest1.mpとtest2.mpの両方に含める方法はありますか?例えば...
% test1.mp
beginfig(1):
% for illustration...
Include.foobar("foobar.mp");
% code specific to test2
endfig;
end;