From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: How to export both Asymptote code and its result Date: Wed, 30 May 2012 03:31:02 -0400 Message-ID: <8635.1338363062@alphaville> References: <20120530071340.GB998@smoon> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZdNE-000132-1Q for emacs-orgmode@gnu.org; Wed, 30 May 2012 03:31:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZdN7-0005wO-Mw for emacs-orgmode@gnu.org; Wed, 30 May 2012 03:31:15 -0400 Received: from g1t0029.austin.hp.com ([15.216.28.36]:10501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZdN7-0005vA-Fd for emacs-orgmode@gnu.org; Wed, 30 May 2012 03:31:09 -0400 In-Reply-To: Message from Vladimir Lomov of "Wed, 30 May 2012 16:13:40 +0900." <20120530071340.GB998@smoon> 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: Vladimir Lomov Cc: Emacs Org Mode Vladimir Lomov wrote: > * Asymptote example > > Hello, can someone enlighten me what's the problem with the following > example: > > I want to export both the Asymptote code and its (PNG) result: > #+NAME: fig1 > #+BEGIN_SRC asymptote :export code This should be ``:exports both'' See (info "(org) exports") Nick > size(100); > > draw((0,0)--(1,0)--(1,1)--cycle); > #+END_SRC > > This must be the result: > #+CALL: fig1 :file "fig1.png" > > What I expect: the (highlighted) code and below it the resulted image. > > I added Asymptote to the list of Babel "active" languages > #+BEGIN_SRC emacs-lisp > ;;; Before lines are skipped > (org-babel-do-load-languages > 'org-babel-load-languages > '((emacs-lisp . t) > (gnuplot . t) > (asymptote . t) > (latex . t) > (perl . t) > (sh . t)) > ) > ;;; Rest lines are too. > #+END_SRC > > When I export to HTML I confirm the code evaluation, > but instead of the code and result I get nothing. > > If I comment the =asymptote= setting in above code then I get the code > but not the image. > > Is it limitation of Asymptote support or I do something wrong? > > Also, I don't understand why viewer is run to show me the result of > code evaluation (actually I know, because of ~-V~ option passed to > ~asy~, but why it is passed to it?). > > My env: > Emacs 24.1.50.1 (compiled from BZR trunk) > Org-mode version 7.8.11 (=release_7.8.11-18-g244331 @ /usr/share/emacs/site-lisp/org/=) > > --- > WBR, Vladimir Lomov > > > -- > You got to pay your dues if you want to sing the blues, > And you know it don't come easy ... > I don't ask for much, I only want trust, > And you know it don't come easy ... >