[Top][All Lists]

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

Re: [O] inline src_R also in latex src block

From: Sebastien Vauban
Subject: Re: [O] inline src_R also in latex src block
Date: Wed, 11 Jan 2012 08:54:20 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (windows-nt)

Hi Michael,

Michael Bach wrote:
> Andreas Leha <address@hidden> writes:
>> would this noweb-based approach work for you:
>> #+name: inner_test
>> #+begin_src R
>>   4 + 4
>> #+end_src
>> #+name: test
>> #+begin_src latex :noweb yes
>>   \begin{equation}
>>     <<inner_test()>>
>>   \end{equation}
>> #+end_src
> Yes, that works.  Thanks for your thoughts on this, Andreas.
> I am just thinking of another benefit: Is it correct that I can use caching
> with this approach? So that the call to <<inner_test()>> does not evaluate
> the `inner_test' block but instead takes its results directly from the
> cached `#+results[6099...]: inner_test' block? This would be speedier than
> src_R usage...

That's perfectly correct: as long as your input code block does not change
(options on the "meta" line and/or contents), your results will be taken "as
is", instead of being recomputed every time.

Best regards,

Sebastien Vauban

reply via email to

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