[texhax] asymptote in latex - how?

Bo Thide' bt at phisp.irfu.se
Wed Sep 16 13:30:48 CEST 2009


Hi Philip,

Thanks for your help.

My problem went away when I replaced Ubuntu 9.04's version of asymptote
(1.43) with the latest asymptote (1.86), compiled from source.

A related question:  I would like to have the asymptote code being read
in into my latex file (preferable via an \input mechanism), rather than
having the code embedded in the .tex file, but am not sure how to do it.
Dario Teixeira's "ASYMPTOTE and LaTeX:  An Integration Guide" is unclear
and ambgious on this point.  Everything I have tried in this direcation
has failed so far.  Perhaps there is an Asymptote FAQ somewhere that I
have missed?

Best regards,

Bo

-- 

Professor Dr. Bo Thidé, Head of Programme,  http://www.physics.irfu.se/~bt
Address: Swedish Institute of Space Physics, P.O.Box 537, SE-75121 Uppsala
Phone:   Office +46 18-4715914  Mobile +46 705-613670  Home +46 18-4951801
Visiting address:  Ångström Lab,  Room # 84108, Lägerhyddsvägen 1, Uppsala
Växjö address: LOIS Space Centre, SE-35195 Växjö http://www.lois-space.net




In your e-mail of Wed Sep 16 13:13:24 2009 you wrote:
> 
> This now works for me, /IFF/
> 
> (a) I first install Asymptote
> (b) I next install Ghostscript V8.70
> (c) I use the three-line sequence
> 
>  >> pdflatex document
>  >> asy document
>  >> pdflatex document
> 
> The "[pdftex]" at line.~2 appears to be redundant,
> but I will not swear to this.
> 
> Philip Taylor
> --------
> \documentclass[10pt]{article}
> \usepackage[pdftex]{graphicx}
> \usepackage{asymptote}
> 
> \begin{document}
> 
> \begin{figure}
> \centering
> \begin{asy}
> size (3cm);
> draw (unitcircle);
> \end{asy}
> \caption{This is a test.  Let's see if it works...}
> \label{fig:1}
> \end{figure}
> \end{document}
> 



More information about the texhax mailing list