From: Dan Davison <davison@stats.ox.ac.uk>
To: Graham Smith <myotisone@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: [babel] captions and figure size on export
Date: Tue, 09 Mar 2010 09:32:19 -0500 [thread overview]
Message-ID: <87r5nth8gc.fsf@stats.ox.ac.uk> (raw)
In-Reply-To: <2c75873c1003080214l72c6781ck1d4213a07d494088@mail.gmail.com> (Graham Smith's message of "Mon, 8 Mar 2010 10:14:00 +0000")
Graham Smith <myotisone@gmail.com> 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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2010-03-09 14:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-07 22:53 [babel] captions and figure size on export Graham Smith
2010-03-08 7:28 ` Graham Smith
2010-03-08 9:10 ` Graham Smith
2010-03-08 10:14 ` Graham Smith
2010-03-09 14:32 ` Dan Davison [this message]
2010-03-09 19:29 ` Graham Smith
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r5nth8gc.fsf@stats.ox.ac.uk \
--to=davison@stats.ox.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=myotisone@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.