From: Eric S Fraga <esflists@gmail.com>
To: Juan Amiguet <jamiguet@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Export attributes for babel blocks
Date: Mon, 02 Oct 2017 11:26:20 +0100 [thread overview]
Message-ID: <87bmlpvoab.fsf@gmail.com> (raw)
In-Reply-To: <CABmuXy9FTTeLvrNt+YM1K=-Qw+9o8R1yXKbYqLX9wsWqX=LdFg@mail.gmail.com> (Juan Amiguet's message of "Mon, 2 Oct 2017 08:46:49 +0200")
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
On Monday, 2 Oct 2017 at 08:46, Juan Amiguet wrote:
> Dear all,
>
> I have been having this issue for quite a while perhaps I am using the
> feature wrong and someone can enlighten me or perhaps someone can point me
> at the bit of code I can patch it myself.
> Here is the issue:
>
> I have a babel block such as
>
> #+begin_src dot :file test.png
> digraph test {
> A -> B
> }
> #+end_src
>
>
> This will create after execution a
>
> #+RESULT:
> [[file:./test.png]]
>
> Now if I would like have something like :width .5/.linewith as a attribute
> to the image the only I have found is to do the following
>
> #+begin_src dot :file test.png :exports none
> digraph test {
> A -> B
> }
> #+end_src
>
> #+attr_latex: width=.5/linewidth
> [[file:./test.png]]
>
> Is there a way of passing the export attributes to babel blocks in a way in
> which from direct rendering of the document things work and I can adjust?
> If now which part of the org mode codebase controls all of this?
Simply add the attr_latex line to just before the #+result line and any
re-evaluation of the src block will work just fine. I.e.:
--8<---------------cut here---------------start------------->8---
#+begin_src dot :file test.png
digraph test {
A -> B
}
#+end_src
#+attr_latex: width=.5/linewidth
#+RESULT:
[[file:./test.png]]
--8<---------------cut here---------------end--------------->8---
--
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.1-78-gfbf47c
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
next prev parent reply other threads:[~2017-10-02 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 6:46 Export attributes for babel blocks Juan Amiguet
2017-10-02 7:05 ` Thomas S. Dye
2017-10-02 7:10 ` Juan Amiguet
2017-10-02 10:26 ` Eric S Fraga [this message]
2017-10-02 12:23 ` Juan Amiguet
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=87bmlpvoab.fsf@gmail.com \
--to=esflists@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jamiguet@gmail.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.