[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: |
Andreas Leha |
Subject: |
Re: [O] inline src_R also in latex src block |
Date: |
Tue, 10 Jan 2012 14:00:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Michael Bach <address@hidden> writes:
> Eric Schulte <address@hidden> writes:
>
>
>> I don't know of a way to evaluate inline code blocks which are already
>> inside of regular code blocks.
>
> Thanks for your thoughts on this, Eric. This would be *really*
> convenient for me. Too bad the christmas wishlist was processed
> already.
>
>> You could try direct begin_latex code blocks, but in-buffer font lock
>> support may simply not be possible in this situation.
>>
>
> Sadly, direct begin_latex code blocks get fontified with `org-block' and
> also export the inline `src_R' snippets literally.
>
> What I was looking for is latex code fontified as AUCTeX and inline
> `src_R' snippets evaluated prior to exporting. The only working
> combination I got right now is inline `src_R' evaluation and no AUCTeX
> font-lock. This is only a minor itch and not too bad considering what
> org-mode already does for me.
>
> Best Regards,
> Michael
Hi Michael,
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
Cheers,
Andreas