% begin graphic: n=0
; beginfig(1) ; defaultfont:="name:dejavuserif*default"; CurrentLayout:="article"; def OverlayLineColor=black enddef; def OverlayColor =black enddef; ;picture pic; x:=80.000; y:=200.000; w:=133.000; h:=53.000;pic := ApplicationComponentLogo( w, h, typeString) shifted (x, -y); draw pic;picture pic; x:=273.000; y:=253.000; w:=133.000; h:=53.000;pic := Function( w, h, typeString) shifted (x, -y); draw pic;picture pic; x:=380.000; y:=133.000; w:=133.000; h:=53.000;pic := Service( w, h, typeString) shifted (x, -y); draw pic;path p; p := (200.000,-227.000)--(333.000,-227.000)--(333.000,-273.000); draw p;path p; p := (393.000,-253.000)--(393.000,-180.000); draw p;;; endfig ;
% end graphic
This apparently is tried to get run through METAPOST separately and that clearly doesn’t work, because ApplicationComponentLogo isn’t defined. This is the result of the following setup:
\starttext
\startMPdefinitions (or inclusions, no difference)
% ApplicationComponentLogo is defined here with a vardef
\ctxlua{foo(“filename”)} % produces a series of
% context.startMPpage { instance = "doublefun” }
% several of:
% context( METAPOST statements in a string)
\stoptext
How do I get my MPdefinitions available in those METAPOST runs?
G