I have been trying to put Asymptote graphs in Context with the filter example below. The Asymptote graph is written in a separate PDF file, but is not included in the final completed PDF document. Is there a simple way to achieve this?


\usemodule[filter]


\defineexternalfilter

[ASY]

[filtercommand={asy -tex "context" -View -outformat pdf -outname \externalfilteroutputfile\space \externalfilterinputfile},

output=\externalfilterbasefile.out,

readcommand=\typefile,

cache=force,

location=text,

continue=yes]


\starttext

\startASY[myplot]

draw((1,1)--(2,4));

\stopASY


\externalfigure[myplot]

\stoptext


Thanks

Jeroen