From: John Hendy <jw.hendy@gmail.com>
To: Jarmo Hurri <jarmo.hurri@syk.fi>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Controlling image width and placement in Beamer export
Date: Tue, 26 Nov 2013 09:08:37 -0600 [thread overview]
Message-ID: <CA+M2ft9Jb6sqLeQArNsWs_ExLGUR7SKRya_PoOSciJBMQc2z=A@mail.gmail.com> (raw)
In-Reply-To: <87haazb79c.fsf@syk.fi>
On Tue, Nov 26, 2013 at 7:51 AM, Jarmo Hurri <jarmo.hurri@syk.fi> 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
> #+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}
> # ---------------------------------------------------------------
>
Oh, and not that it matters, but I typically do:
#+begin_center
#+ATTR_LATEX: :width 5cm
#+RESULTS:
[[file:triangle.pdf]]
#+end_center
Theoretically, more flexible for different types of exports. Even if
you're only doing LaTeX, it's still less characters to type :)
John
> All the best,
>
> Jarmo
>
>
next prev parent reply other threads:[~2013-11-26 15:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 13:51 Controlling image width and placement in Beamer export Jarmo Hurri
2013-11-26 15:06 ` John Hendy
2013-11-27 6:28 ` Jarmo Hurri
2013-11-27 13:51 ` Nick Dokos
2013-11-26 15:08 ` John Hendy [this message]
2013-11-26 15:19 ` Nick Dokos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+M2ft9Jb6sqLeQArNsWs_ExLGUR7SKRya_PoOSciJBMQc2z=A@mail.gmail.com' \
--to=jw.hendy@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jarmo.hurri@syk.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).