From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Export attributes for babel blocks Date: Mon, 02 Oct 2017 11:26:20 +0100 Message-ID: <87bmlpvoab.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyxvf-0004yE-TV for emacs-orgmode@gnu.org; Mon, 02 Oct 2017 06:26:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyxvd-0007EJ-7R for emacs-orgmode@gnu.org; Mon, 02 Oct 2017 06:26:27 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:46204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyxvd-0007Cc-0d for emacs-orgmode@gnu.org; Mon, 02 Oct 2017 06:26:25 -0400 Received: by mail-wr0-x229.google.com with SMTP id t76so3317123wrc.3 for ; Mon, 02 Oct 2017 03:26:23 -0700 (PDT) In-Reply-To: (Juan Amiguet's message of "Mon, 2 Oct 2017 08:46:49 +0200") 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 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=3D.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.: =2D-8<---------------cut here---------------start------------->8--- #+begin_src dot :file test.png digraph test { A -> B } #+end_src #+attr_latex: width=3D.5/linewidth #+RESULT: [[file:./test.png]] =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 : Eric S Fraga via Emacs 27.0.50, Org release_9.1.1-78-gfbf47c --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWdIUTAAKCRDIkZPY//z2 ffx+AJ9Z1RJflHNSCmD38aCN4Df2uYXLfgCghYDfq0j1szDRgkXi/Wns55KXXEs= =gOsR -----END PGP SIGNATURE----- --=-=-=--