[Tex/LaTex] How to run Asymptote with TeX Live


I'm using a clean installation of TeX Live on Windows 7, using TeXworks editor in pdfLaTeX mode. I've tried the following code:

 Text Text Text 
 size(5cm); draw(unitsquare); 

And its produces a .pdf, but with no graphic. I understand that I may have to do a step with the .asy file, but what do I need to do with this .asy file?

For some reason I'm getting this when running the command suggested by Philipp (document is named trial.tex).
enter image description here

Just running the command asy seems to bring up asymptote ok though.

Best Answer

For me, this is as simple as adding a new tool to TeXworks enter image description here

Running pdfLaTeX, the asymptote, the pdfLaTeX again seems to work fine (in the same way you would do pdfLaTeX, BibTeX, pdfLaTeX).

Alternatively, choosing LaTeXmk and building also produces the correct output.

Related Question