From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kieran Healy Subject: Re: org-babel issue with source blocks and latex block Date: Tue, 15 Feb 2011 16:15:02 -0500 Message-ID: <522E178C-A1D8-4536-BF29-CF7BCF35AD7A@gmail.com> References: <877hd15dz7.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=41857 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpSEo-0006vB-3x for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 16:15:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpSEl-0000VX-Bf for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 16:15:08 -0500 Received: from mail-gx0-f169.google.com ([209.85.161.169]:58160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpSEl-0000VQ-5U for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 16:15:07 -0500 Received: by gxk5 with SMTP id 5so334522gxk.0 for ; Tue, 15 Feb 2011 13:15:06 -0800 (PST) In-Reply-To: <877hd15dz7.fsf@gmail.com> 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: Eric Schulte Cc: emacs-org list Hi Eric,=20 On Feb 15, 2011, at 1:49 PM, Eric Schulte wrote: > This may be possible through the use of the ":results src" header > argument e.g., the following minimal code block >=20 > #+begin_src R :results code > 8 > #+end_src >=20 > evaluates to the following >=20 > #+results: > #+BEGIN_SRC R > 8 > #+END_SRC That does work =97 thank you. But while experimenting with this I found = that while doing #+begin_src R :results value code :exports both x <- c(1:10) mean(x) #+end_src works as expected, with both code and result wrapped in a minted = environment, replacing mean(x) with summary(x) #+begin_src R :results value code :exports both x <- c(1:10) summary(x) #+end_src gives this garbled output: > \begin{minted}[]{R} > x <- c(1:10) > summary(x) > \end{minted} >=20 > \end{SRC} > \begin{SRC}R This also fails in HTML export, where the corresponding reversed/garbled = bit is=20 >

> >

>

Finally, it's still the case that if the code block is preceded by a = #+BEGIN_LaTeX block, e.g.,=20 > #+BEGIN_LaTeX > \thispagestyle{kjhgit} % but anything will do it > #+END_LaTeX Then R is not called at all and I just get the src block in the exported = .tex or .html file, and no results.=20 Kieran -- Kieran Healy :: http://www.kieranhealy.org