emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kieran Healy <kjhealy@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: org-babel issue with source blocks and latex block
Date: Tue, 15 Feb 2011 16:15:02 -0500	[thread overview]
Message-ID: <522E178C-A1D8-4536-BF29-CF7BCF35AD7A@gmail.com> (raw)
In-Reply-To: <877hd15dz7.fsf@gmail.com>

Hi Eric, 

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
> 
> #+begin_src R :results code
>  8
> #+end_src
> 
> evaluates to the following
> 
> #+results:
> #+BEGIN_SRC R
> 8
> #+END_SRC

That does work — 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}
> 
> \end{SRC}
> \begin{SRC}R

This also fails in HTML export, where the corresponding reversed/garbled bit is 

> <p>
> </div>
> <div class="SRC R">
> </p>


Finally, it's still the case that if the code block is preceded by a #+BEGIN_LaTeX block, e.g., 

> #+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. 

Kieran


--
Kieran Healy :: http://www.kieranhealy.org

      reply	other threads:[~2011-02-15 21:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15 17:56 org-babel issue with source blocks and latex block Kieran Healy
2011-02-15 18:49 ` Eric Schulte
2011-02-15 21:15   ` Kieran Healy [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=522E178C-A1D8-4536-BF29-CF7BCF35AD7A@gmail.com \
    --to=kjhealy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).