# [NTG-context] Asymptote in Context

Tue Jan 20 04:39:48 CET 2015

```On Fri, 2 Jan 2015, Context NTG wrote:

> Here is an Asymptote example
>
> unitsize(1cm);
> draw((-.1,0) -- (2,0),
> draw((0,-.1) -- (0,2), arrow =
> draw((0,0) .. (1,1) .. (2,sqrt(2)));
>
>
> Below is how I have started setting this up in Context. This creates a pdf
> file with the drawing, but it is not included in the final docuement.

Sorry for the late reply. You just need to change a few options:

\usemodule[filter]

\defineexternalfilter
[ASY]
[
filter={asy -tex "context" -outformat pdf
-outname \externalfilteroutputfile},
output=\externalfilterbasefile.pdf,
cache=yes,
]

\starttext
Testing if we can include an asymptote image
\startplacefigure[location={here}, title={An Asymptote figure}]
\startASY
unitsize(1cm);