From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Re: [babel] captions and figure size on export Date: Tue, 09 Mar 2010 09:32:19 -0500 Message-ID: <87r5nth8gc.fsf@stats.ox.ac.uk> References: <2c75873c1003071453w78b2d8c9wd1e7fb97432e462e@mail.gmail.com> <2c75873c1003080110i3d15a148qa3c4b3f41d70ffb5@mail.gmail.com> <2c75873c1003080214l72c6781ck1d4213a07d494088@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Np0Ub-0006H3-AC for emacs-orgmode@gnu.org; Tue, 09 Mar 2010 09:33:05 -0500 Received: from [140.186.70.92] (port=44384 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Np0UR-0006EL-6w for emacs-orgmode@gnu.org; Tue, 09 Mar 2010 09:33:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Np0U0-0005qx-1b for emacs-orgmode@gnu.org; Tue, 09 Mar 2010 09:32:29 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:41898) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Np0Tz-0005qg-Qw for emacs-orgmode@gnu.org; Tue, 09 Mar 2010 09:32:28 -0500 In-Reply-To: <2c75873c1003080214l72c6781ck1d4213a07d494088@mail.gmail.com> (Graham Smith's message of "Mon, 8 Mar 2010 10:14:00 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Graham Smith Cc: emacs-orgmode@gnu.org Graham Smith 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