From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Controlling image width and placement in Beamer export Date: Tue, 26 Nov 2013 10:19:35 -0500 Message-ID: <87iovf9omw.fsf@alphaville.bos.redhat.com> References: <87haazb79c.fsf@syk.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlKQc-00088K-D0 for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:20:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlKQV-0006aZ-GN for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:19:54 -0500 Received: from plane.gmane.org ([80.91.229.3]:54729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlKQV-0006aM-9X for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:19:47 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VlKQU-00047y-Aj for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 16:19:46 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 16:19:46 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 16:19:46 +0100 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 Jarmo Hurri writes: > Greetings. > > I needed to create an Asymptote-generated centered image with a smaller > width than the default .9\linewidth in a Beamer export. After trial and > error I ended with the method shown below. In particular, to my surprise > an > > #+ATTR_LATEX: :width 5cm > > _above_ the #+BEGIN_SRC did not work, so I had to place the line above > #+RESULTS: > > Is the following the best way to do this, or is there a more concise > method? > > # --------------------------------------------------------------- > #+BEGIN_SRC asymptote :file triangle.pdf > size (8cm, 0); > pair A = (0, 0), B = (4, 1), C = (3, 2); > draw (A -- B -- C -- cycle); > #+END_SRC > #+LATEX: \begin{center} > #+ATTR_LATEX: :width 5cm > #+RESULTS: > [[file:triangle.pdf]] > #+LATEX: \end{center} > # --------------------------------------------------------------- > My recommendation is to always name code blocks: then the corresponding results blocks are named as well, tying the two together; subsequent evaluations will just refresh the appropriate results block without introducincg new results blocks. This is not as much of a problem as it used to be, but naming code blocks is still a good guideline, imo. Other than that, I think that's the best that you can do. Nick