emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export attributes for babel blocks


From: Thomas S. Dye
Subject: Re: [O] Export attributes for babel blocks
Date: Sun, 01 Oct 2017 21:05:13 -1000
User-agent: mu4e 0.9.17; emacs 25.3.1

Aloha Juan Amiguet,

Juan Amiguet writes:

> 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?
>
> Thanking you all in advance.

Dot doesn't know anything about the linewidth you might be using in
LaTeX.  LaTeX will take any image and reproduce it at .5/linewidth,
regardless of dot settings.

The :cmdline header argument for dot is documented here:
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html

You can find links to the dot command line arguments.  Babel gives you
full access to the dot command line.

hth,
Tom

--
Thomas S. Dye
http://www.tsdye.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]