From: Daniel Gonzalez <gonvaled@gonvaled.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Problems with integration between asmyptote and org mode [7.7]
Date: Fri, 12 Aug 2011 09:16:27 +0200 [thread overview]
Message-ID: <CAAOi-OGfReK-gOE4owLHNZgWAhhvk=CdwhkzKaNYpJW-zgqcmw@mail.gmail.com> (raw)
In-Reply-To: <87sjp8j8x0.fsf@gmail.com>
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 <n.goaziou@gmail.com> wrote:
> Hello,
>
> Daniel Gonzalez <gonvaled@gonvaled.com> 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
>
prev parent reply other threads:[~2011-08-12 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 9:08 Bug: Problems with integration between asmyptote and org mode [7.7] Daniel Gonzalez
2011-08-11 14:54 ` Nicolas Goaziou
2011-08-12 7:16 ` Daniel Gonzalez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAOi-OGfReK-gOE4owLHNZgWAhhvk=CdwhkzKaNYpJW-zgqcmw@mail.gmail.com' \
--to=gonvaled@gonvaled.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.