emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Positioning of images - export to LaTeX


From: John Hendy
Subject: Re: [O] Positioning of images - export to LaTeX
Date: Tue, 10 Mar 2015 09:29:58 -0500

On Tue, Mar 10, 2015 at 9:13 AM, Rainer M Krug <address@hidden> 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/address@hidden/msg82889.html


This pushes it to the bottom for me!



John

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



reply via email to

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