[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] ob-lilypond and LaTeX floats/captions
From: |
Nicolas Goaziou |
Subject: |
Re: [O] ob-lilypond and LaTeX floats/captions |
Date: |
Fri, 26 Feb 2016 22:58:57 +0100 |
Hello,
"James Harkins" <address@hidden> writes:
> I currently have a few LilyPond source code blocks that are working quite
> well as inline graphics (exported to LaTeX), e.g.:
>
> #+BEGIN_SRC lilypond :exports results :noweb yes :file ex1.eps
> ...
> #+END_SRC
>
> When I export, it (correctly) asks if I want to evaluate the source block,
> and the export (correctly) includes the line:
>
> \includegraphics[width=.9\linewidth]{ex1.eps}
>
> So far, so good.
>
> Now, I would like to make the results a floating figure, with a caption and a
> #+name reference. So I added the following to the above block:
>
> #+name: ex1
> #+caption: One possible form of "seed" material to start the performance.
> #+BEGIN_SRC lilypond :exports results :noweb yes :file ex1.eps
> ...
> #+END_SRC
>
> ... but the #+name is not converted into a label, and the #+caption is also
> ignored.
>
> My question, then, is: What is needed to get ob-lilypond to support
> LaTeX floats and captions? (I have a sneaky feeling it isn't trivial,
> but it's worth asking in any case.)
You are applying the name and caption to the source block, which is
removed (:exports results), not to the results of the source block. So,
you need to generate the results first, or at least put a RESULTS
keyword below, and apply the name and caption to it.
Regards,
--
Nicolas Goaziou