emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Jakob Schöttl" <jschoett@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [latex export/babel] pass arguments to \includegraphics from code blocks
Date: Mon, 22 Apr 2019 19:46:28 +0200	[thread overview]
Message-ID: <7c368b05-1572-6e47-8557-2f096cc7b979@gmail.com> (raw)

Hi, I want to use code blocks to generate and include images of sheet music:

#+BEGIN_SRC lilypond :file test.png :exports results
\header{tagline=""}
{ a b c }
#+END_SRC

When doing a latex export the result is:

\begin{center}
\includegraphics[width=.9\linewidth]{test.png}
\end{center}

Is there a way to specify the arguments for \includegraphics? For 
example I want to change the display width.

Putting these lines above the code block have no effect:

#+ATTR_LATEX: :width 4cm
#+CAPTION: xxx

Maybe this requires a change in ob-lilypond.el to introduce new header 
arguments for the source block?

Regards, Jakob

             reply	other threads:[~2019-04-22 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 17:46 Jakob Schöttl [this message]
2019-04-22 19:13 ` [latex export/babel] pass arguments to \includegraphics from code blocks Nick Dokos
2019-04-22 20:33   ` Jakob Schöttl

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c368b05-1572-6e47-8557-2f096cc7b979@gmail.com \
    --to=jschoett@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).