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.
texdoc asymptote
). Probably thelatexmk
method is the easiest one.sub asy {return system("asy '$_[0]'");} add_cus_dep("asy","eps",0,"asy"); add_cus_dep("asy","pdf",0,"asy"); add_cus_dep("asy","tex",0,"asy");
If not, where does it go?latexmk
is indeed the easiest solution you should also be able to useasymptote
without it. Assuming your maintex
document is namedlatexdoc
you have to compile the document once, then execute the following command via the command line:asy latexdoc-*.asy
and then compile the document again with LaTeX.asy trial-1.asy