emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Nick Dokos
Subject: Re: [O] Controlling image width and placement in Beamer export
Date: Tue, 26 Nov 2013 10:19:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Jarmo Hurri <address@hidden> 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





reply via email to

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