From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: Export attributes for babel blocks Date: Sun, 01 Oct 2017 21:05:13 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyunW-0002Z4-JD for emacs-orgmode@gnu.org; Mon, 02 Oct 2017 03:05:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyunQ-0007AH-Qt for emacs-orgmode@gnu.org; Mon, 02 Oct 2017 03:05:50 -0400 Received: from gproxy1-pub.mail.unifiedlayer.com ([69.89.25.95]:51527 helo=outbound-ss-1812.hostmonster.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dyunQ-000719-Kf for emacs-orgmode@gnu.org; Mon, 02 Oct 2017 03:05:44 -0400 Received: from cmgw4 (cmgw5 [10.0.90.85]) by gproxy1.mail.unifiedlayer.com (Postfix) with ESMTP id 574FB175D6F for ; Mon, 2 Oct 2017 01:05:24 -0600 (MDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Juan Amiguet Cc: emacs-orgmode@gnu.org 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