emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] #+CAPTION: Not being protected when they are used with #+begin_s


From: Eric Schulte
Subject: Re: [O] #+CAPTION: Not being protected when they are used with #+begin_src
Date: Sat, 07 Jul 2012 11:15:29 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Luis Anaya <address@hidden> writes:

> From the documentation, I know that captions work with inline images
> and tables, but for some reason when then inline images are generated
> through org-babel, #+CAPTION keys turns into regular text. What am I
> doing wrong now? :)
>

Instead of putting the #+Caption: line on the source block, place it on
the result.  This requires the use of named code blocks and results.
The following alternate version of your example should give the behavior
you're after.

--8<---------------cut here---------------start------------->8---
#+TITLE: Graphic Tests
#+AUTHOR: Luis R. Anaya
#+GROFF_ATTR: :alignment center
#+GROFF_CLASS: file

* PlantUML
#+name: plantuml-drawing
#+begin_src plantuml :cmdline -Teps :file x.eps
[A] --> [B]
#+end_src

#+CAPTION: plantuml drawing
#+RESULTS: plantuml-drawing
[[file:x.eps]]

* Gnuplot
#+name: gnuplot-drawing
#+begin_src gnuplot :file salida.pic
set term gpic
plot sin(x)
#+end_src

#+CAPTION: gnuplot drawing
#+RESULTS: gnuplot-drawing
[[file:salida.pic]]
--8<---------------cut here---------------end--------------->8---

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

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