From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: James Harkins <jamshark70@qq.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: ob-lilypond and LaTeX floats/captions
Date: Fri, 26 Feb 2016 22:58:57 +0100 [thread overview]
Message-ID: <87r3fzdtge.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <tencent_4D1600B56FA07B46404E41D4@qq.com> (James Harkins's message of "Fri, 26 Feb 2016 23:20:52 +0800")
Hello,
"James Harkins" <jamshark70@qq.com> 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
next prev parent reply other threads:[~2016-02-26 21:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 15:20 ob-lilypond and LaTeX floats/captions James Harkins
2016-02-26 21:58 ` Nicolas Goaziou [this message]
2016-02-27 0:42 ` James Harkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r3fzdtge.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=jamshark70@qq.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.