From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: How to export both Asymptote code and its result Date: Wed, 30 May 2012 09:22:16 -0600 Message-ID: <878vg9snh3.fsf@gmx.com> References: <20120530071340.GB998@smoon> <8635.1338363062@alphaville> <20120530080132.GC998@smoon> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZkjJ-0006XJ-8Q for emacs-orgmode@gnu.org; Wed, 30 May 2012 11:22:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZkjH-0005w3-20 for emacs-orgmode@gnu.org; Wed, 30 May 2012 11:22:32 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:57419 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SZkjG-0005vO-Rc for emacs-orgmode@gnu.org; Wed, 30 May 2012 11:22:30 -0400 In-Reply-To: <20120530080132.GC998@smoon> (Vladimir Lomov's message of "Wed, 30 May 2012 17:01:32 +0900") 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: Nick Dokos , Emacs Org Mode Vladimir Lomov writes: > > So I don't get the idea of ``#+CALL''. It doesn't work in this case. I > thought I can show code and after small explanation the resulted > image. But seems I'm allowed to get PNG file only with BEGIN|END_SRC > block while image be placed right after the block. > The placement of header arguments in #+call lines can be tricky. What you want to do is possible, please review the syntax of call lines in the manual. http://orgmode.org/manual/Evaluating-code-blocks.html > > I came to this: > > #+NAME: fig1 > #+BEGIN_SRC asymptote :exports both :results silent :file "fig1.png" > <> > #+END_SRC > > Result:\\ > [[./fig1.png]] > > This is essential that I want. > If your main goal is simply to separate the code block and the result you do not need to use call lines. With a names code block the result may live *anywhere* in the Org-mode file and need not immediately follow the code block. Best, > > Thanks again. > >>> 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 -- Eric Schulte http://cs.unm.edu/~eschulte