emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: [babel] captions and figure size on export


From: Dan Davison
Subject: Re: [Orgmode] Re: [babel] captions and figure size on export
Date: Tue, 09 Mar 2010 09:32:19 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Graham Smith <address@hidden> writes:

> This is driving me mad here:  I have removed all the fig and size code
> and replaced it with onky one line that should be resizing the first
> graph(FloweringBoxplot.pdf).  However, its resizing the second graph
> (NonFloweringBoxplot/pdf) and not affecting the first graph. This
> works on other files, so I am really at a loss here.

Hi Graham,

We can see what's going on here by executing the block manually with C-c
C-c, which transforms your results block from this:

#+ATTR_LaTeX: width=10cm
#+results: BoxplotFlowering
[[file:FloweringBoxplot.pdf]]

into this:

#+results: BoxplotFlowering
[[file:FloweringBoxplot.pdf]]
#+ATTR_LaTeX: width=10cm

(The reason is that the results block corresponding to the code block is
first deleted and then re-inserted immediately below the code block).

You are using ':exports both' which means that the above transformation
actually occurs during export, but in a special pre-export org buffer
which the user never sees. The fact that the ATTR_LaTeX line ends up
last explains why it modifies the *second* block.

Thanks for pointing this out -- we will revisit this behaviour as it
does seem surprising and on the face of it undesirable.

As a workaround, is it necessary for you to execute the block on export?
Or could you instead use :exports code? I.e. before export, execute the
block manually and ensure that the #+ATTR_LaTeX and #+results lines are
arranged in the correct way.

Dan



>
>
> #+srcname:BoxplotFlowering
> #+begin_src R :session daf :file FloweringBoxplot.pdf :exports both
> boxplot(daf$Flower~daf
> $YEAR)
> #+end_src
>
> #+ATTR_LaTeX: width=10cm
> #+results: BoxplotFlowering
> [[file:FloweringBoxplot.pdf]]
>
>
> #+srcname:BoxplotNonFlowering
> #+begin_src R :session daf :file NonFloweringBoxplot.pdf :exports both
> boxplot(daf$No.Flower~daf$YEAR)
> #+end_src
>
> #+results: BoxplotNonFlowering
> [[file:NonFloweringBoxplot.pdf]]
>
> Graham
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode




reply via email to

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