From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Gonzalez Subject: Re: Bug: Problems with integration between asmyptote and org mode [7.7] Date: Fri, 12 Aug 2011 09:16:27 +0200 Message-ID: References: <87sjp8j8x0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrm06-0007wy-Qg for emacs-orgmode@gnu.org; Fri, 12 Aug 2011 03:17:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qrm05-0003yG-Gh for emacs-orgmode@gnu.org; Fri, 12 Aug 2011 03:17:50 -0400 Received: from mo-p00-ob.rzone.de ([81.169.146.160]:22669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrm05-0003y5-90 for emacs-orgmode@gnu.org; Fri, 12 Aug 2011 03:17:49 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]) by smtp.strato.de (klopstock mo1) (RZmta 26.2) with ESMTPA id e07014n7C3AVYD for ; Fri, 12 Aug 2011 09:16:47 +0200 (MEST) Received: by gwaa20 with SMTP id a20so2000791gwa.0 for ; Fri, 12 Aug 2011 00:16:47 -0700 (PDT) In-Reply-To: <87sjp8j8x0.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hi Nicolas, Thanks for your info. It seems I was following an outdated howto. I didn't know asymptote was already integrated in babel. Now it is working fine. I am using the following org source: #+begin_src asymptote :file generated/asymptote.png :exports both import graph; size(0,4cm); real f(real t) {return 1+cos(t);} path g=3Dpolargraph(f,0,2pi,operator ..)--cycle; filldraw(g,pink); xaxis("$x$",above=3Dtrue); yaxis("$y$",above=3Dtrue); dot("$(a,0)$",(1,0),N); dot("$(2a,0)$",(2,0),N+E); #+end_src #+results: [[file:generated/asymptote.png]] The problem with the subdirectory remains, though. I am able to publish the PNG to the directory where the org file is, but it is not possible to publish to a subdirectory (I call it "generated"), even though the subdirectory already exists. It seems that the export is being done in several steps, and one of them is concatenating subdirectories when the export is not done to the current directory. This is the relevant part of the *Messages* buffer: executing Asymptote code block... asy -globalwrite -f png -o /home/gonvaled/projects/dgv_notes/generated/asymptote.png /tmp/babel-3787Y5M/asymptote-3787wpa /usr/share/asymptote/plain_xasy.asy: 93.7: runtime: Cannot write to /home/gonvaled/projects/dgv_notes/generated//home/gonvaled/projects/dgv_not= es/generated/asymptote_.tex Code block evaluation complete. Regards, Daniel On Thu, Aug 11, 2011 at 4:54 PM, Nicolas Goaziou wrot= e: > Hello, > > Daniel Gonzalez writes: > >> I have this code to activate asymptote: > > [...] > > Asymptote is included in Babel. > > Be sure to load the language: > > #+begin_src org > (org-babel-do-load-languages > =A0'org-babel-load-languages > =A0'((asymptote . t) > =A0 (emacs-lisp . t))) > #+end_src > > Then it's just about doing (when ii/ is created): > > #+begin_src asymptote :file ii/asy-output.png > import graph; > size(0,4cm); > real f(real t) {return 1+cos(t);} > path g=3Dpolargraph(f,0,2pi,operator ..)--cycle; > filldraw(g,pink); > xaxis("$x$",above=3Dtrue); > yaxis("$y$",above=3Dtrue); > dot("$(a,0)$",(1,0),N); > dot("$(2a,0)$",(2,0),N+E); > #+end_src > > > Regards, > > -- > Nicolas Goaziou >