From mboxrd@z Thu Jan 1 00:00:00 1970 From: jerome moliere Subject: Re: Org-mode Beamer graphviz & images Date: Tue, 10 Feb 2015 11:15:02 +0100 Message-ID: References: <54D91FAD.3000707@javaxpert.com> <87iofanlfu.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff1cf3cf55091050eb928d7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL7qV-0003lm-Df for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 05:15:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YL7qR-0005bX-9z for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 05:15:07 -0500 Received: from mail-oi0-f43.google.com ([209.85.218.43]:52943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL7qR-0005a0-5A for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 05:15:03 -0500 Received: by mail-oi0-f43.google.com with SMTP id z81so27564816oif.2 for ; Tue, 10 Feb 2015 02:15:02 -0800 (PST) In-Reply-To: <87iofanlfu.fsf@ucl.ac.uk> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --e89a8ff1cf3cf55091050eb928d7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks a lot Eric The small sise was just there for my experiments to ensure my attributes were processed Thanks again i will be able to finish my deck of slides. I did not know this syntax but I guessed that the workflow was the problem Kind regards Le 10 f=C3=A9vr. 2015 10:51, "Eric S Fraga" a =C3=A9cri= t : > On Monday, 9 Feb 2015 at 21:59, deadbrain wrote: > > Hi all org-mode gurus, > > I am trying to generate a deck of slides using Emacs/org-mode /beamer & > > some companion tools (graphviz & plantuml). > > I have a problem to set the dimensions for the graphviz (or plantuml) > > generated pictures. > > Whatever the version used (tested 8.2.10-30 or 8.3-beta from git) and > > whatever the option (ATTR_LATEX set) the TEX file generated does not > > contain the right scaling options. > > Two changes are required to get this to work. > > 1. you need to have the latex attribute just before the image. To do > this, execute the src block which will generate the results > line. Then move the attribute line to just before the RESULTS > directive. > > 2. you need to tell the exporter that the results to export are a file. > > In summary, I got your example to work with the following snippet: > > --8<---------------cut here---------------start------------->8--- > #+name: graph-info-figure > #+begin_src dot :file graph-intro.png :cmdline -Kdot -Tpng :results file > digraph G{ > node1 -> node2 > node1 -> node3 > node3 -> node4 > node3 -> node5 > } > #+end_src > > #+ATTR_LATEX: :height 3cm > #+results: graph-info-figure > [[file:graph-intro.png]] > --8<---------------cut here---------------end--------------->8--- > > I named the src block as I find that it is good practice in general to > do so... > > Note that I changed the size directive to 3cm to see the effect clearly! > > HTH, > eric > > > -- > : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org > release_8.3beta-798-g528b90 > --e89a8ff1cf3cf55091050eb928d7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Thanks a lot Eric
The small sise was just there for my experiments to ensure my attributes we= re processed
Thanks again i will be able to finish my deck of slides.
I did not know this syntax but I guessed that the workflow was the problem<= /p>

Kind regards

Le 10 f=C3=A9vr. 2015 10:51, "Eric S Fraga&= quot; <e.fraga@ucl.ac.uk> a = =C3=A9crit :
On Mond= ay,=C2=A0 9 Feb 2015 at 21:59, deadbrain wrote:
> Hi all org-mode gurus,
> I am trying to generate a deck of slides using Emacs/org-mode /beamer = &
> some companion tools (graphviz & plantuml).
> I have a problem to set the dimensions for the graphviz (or plantuml)<= br> > generated pictures.
> Whatever the version used (tested 8.2.10-30 or 8.3-beta from git) and<= br> > whatever the option (ATTR_LATEX set) the TEX file generated does not > contain the right scaling options.

Two changes are required to get this to work.

1. you need to have the latex attribute just before the image.=C2=A0 To do<= br> =C2=A0 =C2=A0this, execute the src block which will generate the results =C2=A0 =C2=A0line.=C2=A0 Then move the attribute line to just before the RE= SULTS
=C2=A0 =C2=A0directive.

2. you need to tell the exporter that the results to export are a file.

In summary, I got your example to work with the following snippet:

--8<---------------cut here---------------start------------->8---
#+name: graph-info-figure
#+begin_src dot :file graph-intro.png :cmdline -Kdot -Tpng :results file digraph G{
node1 -> node2
node1 -> node3
node3 -> node4
node3 -> node5
}
#+end_src

#+ATTR_LATEX: :height 3cm
#+results: graph-info-figure
[[file:graph-intro.png]]
--8<---------------cut here---------------end--------------->8---

I named the src block as I find that it is good practice in general to
do so...

Note that I changed the size directive to 3cm to see the effect clearly!
HTH,
eric


--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-798-g528b= 90
--e89a8ff1cf3cf55091050eb928d7--