[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] src blocks, listings package and captions
From: |
Bastien |
Subject: |
Re: [O] src blocks, listings package and captions |
Date: |
Thu, 25 Aug 2011 09:50:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Giles,
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?
Since captions make sense for figures, I think you have to wrap this
in \begin{figure}\caption{}. But maybe there is a way to automatically
wrap source blocks into a caption-aware LaTeX environment -- Eric might
give a more useful answer.
Thanks,
--
Bastien