I'm using a clean installation of TeX Live on Windows 7, using TeXworks editor in pdfLaTeX mode. I've tried the following code:
\documentclass{minimal}
\usepackage[pdftex]{graphicx}
\usepackage{asymptote}
\begin{document}
Text Text Text
\begin{center}
\begin{asy}
size(5cm); draw(unitsquare);
\end{asy}
\end{center}
\end{document}
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
).
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
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.