|
| From: | Eric Schulte |
| Subject: | Re: [O] src blocks, listings package and captions |
| Date: | Thu, 25 Aug 2011 09:11:06 -0600 |
| User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Giles Chamberlin <address@hidden> writes:
> I'm using the listings package and org-version 7.4 to generate latex/pdf
> output including source snippets. I'd like to add captions: "Figure 1:
> My code" and tried with the following to no avail:
>
> #+caption: My code
> #+begin_src clojure
> ;; stuff
> #+end_src
>
> Do I have to wrap this in \begin{figure}\caption{} or is there a simpler
> way?
Currently code blocks are not wrapped in begin/end{figure} environments
as are links and tables. I do not know of an easy way to do this aside
from manually inserting the LaTeX using #+LaTeX: lines in the Org-mode
file. I personally would like to treat code blocks in the same way as
links and tables, but I'm not sure if there is a specific reason we do
not do this currently.
Thanks -- Eric
--
Eric Schulte
http://cs.unm.edu/~eschulte/
| [Prev in Thread] | Current Thread | [Next in Thread] |