emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Problems with integration between asmyptote and org mode [7


From: Daniel Gonzalez
Subject: Re: [O] Bug: Problems with integration between asmyptote and org mode [7.7]
Date: Fri, 12 Aug 2011 09:16:27 +0200

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=polargraph(f,0,2pi,operator ..)--cycle;
filldraw(g,pink);

xaxis("$x$",above=true);
yaxis("$y$",above=true);

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_notes/generated/asymptote_.tex
Code block evaluation complete.

Regards,
Daniel

On Thu, Aug 11, 2011 at 4:54 PM, Nicolas Goaziou <address@hidden> wrote:
> Hello,
>
> Daniel Gonzalez <address@hidden> 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
>  'org-babel-load-languages
>  '((asymptote . t)
>   (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=polargraph(f,0,2pi,operator ..)--cycle;
> filldraw(g,pink);
> xaxis("$x$",above=true);
> yaxis("$y$",above=true);
> dot("$(a,0)$",(1,0),N);
> dot("$(2a,0)$",(2,0),N+E);
> #+end_src
>
>
> Regards,
>
> --
> Nicolas Goaziou
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]