emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org-babel, position and indentation of resname


From: Eric Schulte
Subject: Re: [Orgmode] org-babel, position and indentation of resname
Date: Tue, 22 Sep 2009 19:57:59 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (darwin)

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> I would like to put all my asymptote code in the header of the org file,
> and then, display the result later. I tried to move #+resname: but it is
> recreated just beneath the corresponding code at each export. I tried to
> use #+srcname: without success either. 
>

Ah!

You have found a bug in the existing code.  The mechanism for replacing
results was overly complex and I have now cleaned it up somewhat.  After
grabbing the latest version of Org-mode the attached file insert the
asymptote results in the appropriate place.

* demonstrating use of =#+srcname:= with =#+resname:=

#+srcname: circles
#+begin_src asymptote :file circles.png
  import graph;
  
  size(0,4cm);
  
  real f(real t) {return cos(t);}
  
  path g=polargraph(f,0,2pi,operator ..)--cycle;
  filldraw(g,pink);
  
  for(int i=0; i < 8; ++i) {
    real j = 0.125 + 0.125*i;
    real h(real t) {return j;};
    path k=polargraph(h, -(acos(j)), acos(j), operator ..);
    draw(k,blue);
  }
  
  xaxis("$x$",above=true);
  yaxis("$y$",above=true);
  
  dot("$(pi,0)$",(1,0),N);
#+end_src

** a sub-header
sub-stuff

** another sub-header

and finally the results

#+resname: circles

>
> Is it possible to achieve this ? If I can't put #+resname: anywhere but
> beneath the block, is it possible to get the #+resname: and the name of
> the file indented like the corresponding block ?
>

I believe that in the current setup the block can be indented
but #+resname: lines can _not_ be indented.

Best -- Eric

>
> Regards,
>
> --
> Nicolas Goaziou
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

reply via email to

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