emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Rainer M Krug <Rainer@krugs.de>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Positioning of images - export to LaTeX
Date: Tue, 10 Mar 2015 09:29:58 -0500	[thread overview]
Message-ID: <CA+M2ft-9JqyJr3-=13sQUkrd-6xvfGdfo9ZhB=aiGA2BKwmA0g@mail.gmail.com> (raw)
In-Reply-To: <m2d24hym81.fsf@krugs.de>

On Tue, Mar 10, 2015 at 9:13 AM, Rainer M Krug <Rainer@krugs.de> wrote:
> Hi
>
> I am struggling with float positioning. I would like to have a float at
> the bottom of a page. Consider the following code:
>
> --8<---------------cut here---------------start------------->8---
> * Some text
> #+NAME: test
> #+begin_src R :exports results :file-ext pdf :results graphics :width 8 :height 3
> plot(runif(100))
> #+end_src
>
> #+RESULTS: test
> [[file:test.pdf]]
> --8<---------------cut here---------------end--------------->8---
>
> which produces a pdf with the float directly after the heading. Now I
> would like to have the float at the bottom of the page.
>
> I know about the float placement option, but how can I use them from
> org? I have seem
> http://orgmode.org/manual/LaTeX-specific-attributes.html but where do I
> c=have to put the
>
> ,----
> | #+ATTR_LATEX: :placement {b}
> `----
>
> so that the float is at the bottom of the page?

Latex attributes have to go above the =#+results: name= line so that
babel doesn't get confused. If you put it in between the name and file
link, re-running the block will generate a new one, as babel won't
recognize it. This seems to work for me, though from a previous email
I took a cue that I believe you need to also specify it as a float.[1]
Someone else can correct if that's wrong!

#+begin_src org

#+attr_latex: :float t :placement [b]
#+RESULTS: test
[[file:test.pdf]]

#+end_src

I get this as a result:

#+begin_src latex

\section{Some text}
\label{sec-1}
\begin{figure}[b]
\centering
\includegraphics[width=.9\linewidth]{test2.pdf}
\end{figure}

#+end_src

[1] https://www.mail-archive.com/emacs-orgmode@gnu.org/msg82889.html


This pushes it to the bottom for me!



John

>
> Rainer
>
> --
> Rainer M. Krug
> email: Rainer<at>krugs<dot>de
> PGP: 0x0F52F982

  reply	other threads:[~2015-03-10 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 14:13 Positioning of images - export to LaTeX Rainer M Krug
2015-03-10 14:29 ` John Hendy [this message]
2015-03-10 14:49   ` Rainer M Krug
2015-03-10 14:35 ` Rasmus

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+M2ft-9JqyJr3-=13sQUkrd-6xvfGdfo9ZhB=aiGA2BKwmA0g@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=Rainer@krugs.de \
    --cc=emacs-orgmode@gnu.org \
    /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).