[Top][All Lists]

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

Re: [O] Controlling image width and placement in Beamer export

From: John Hendy
Subject: Re: [O] Controlling image width and placement in Beamer export
Date: Tue, 26 Nov 2013 09:06:58 -0600

On Tue, Nov 26, 2013 at 7:51 AM, Jarmo Hurri <address@hidden> wrote:
> 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
> 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);
> #+LATEX: \begin{center}
> #+ATTR_LATEX: :width 5cm
> [[file:triangle.pdf]]
> #+LATEX: \end{center}
> # ---------------------------------------------------------------

This comes up all the time. See this thread:
- http://lists.gnu.org/archive/html/emacs-orgmode/2012-07/msg00323.html

The key is to put it 1) before results (as you've done) and 2) to use
a named source block (with #+name: foo above your babel code) so that
Org knows what the results block actually is. Otherwise, as you
currently have it, if you re-run the babel block, you'll keep the
results section you already have and it will spit out another one
below it since it no longer recognizes that the babel block and
current, modified results block go together.

Good luck,

> All the best,
> Jarmo

reply via email to

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