From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kieran Healy Subject: org-babel issue with source blocks and latex block Date: Tue, 15 Feb 2011 12:56:24 -0500 Message-ID: Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=54052 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpP8Y-00069y-AA for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 12:56:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpP8W-0002YS-Sj for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 12:56:30 -0500 Received: from mail-yw0-f41.google.com ([209.85.213.41]:59501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpP8W-0002YI-Mv for emacs-orgmode@gnu.org; Tue, 15 Feb 2011 12:56:28 -0500 Received: by ywj3 with SMTP id 3so231376ywj.0 for ; Tue, 15 Feb 2011 09:56:27 -0800 (PST) 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: emacs-org list Hi,=20 I have org-babel set up to use minted to format code blocks and it's = terrific. I was wondering whether I could also get it to wrap the = results it outputs using minted instead of verbatim environments (it = seems not right now) when I noticed the following strange behavior. = Here's a minimal example. This org file exports to latex as expected, = with the src block in a minted environment and the results block as a = verbatim environment: (As I say, wanting the results block wrapped by = minted was what prompted this issue ...) Org-mode file: = --------------------------------------------------------------------------= ------------------------ #+TITLE: Working with Org-Babel #+AUTHOR: Kieran Healy #+OPTIONS: toc:nil num:nil ** An Example #+source: r-example-1 #+begin_src R :exports both 2 + 1 + (5-2) * 5 #+end_src The end. = --------------------------------------------------------------------------= ------------------------ Relevant bit of Latex file output: = --------------------------------------------------------------------------= ------------------------ \begin{document} \title{Working with Org-Babel} \author{Kieran Healy} \date{15 February 2011} \maketitle \section*{An Example} \label{sec-1} \begin{minted}[]{R} 2 + 1 + (5-2) * 5 \end{minted} \begin{verbatim} 18 \end{verbatim} The end. \end{document} = --------------------------------------------------------------------------= ------------------------ But now if I insert a latex-specific section, which causes org-mode no = trouble in the normal course of things, R is not called and the export = only includes the source block and not the results: Org-mode file: = --------------------------------------------------------------------------= ------------------------ #+TITLE: Working with Org-Babel #+AUTHOR: Kieran Healy #+OPTIONS: toc:nil num:nil #+BEGIN_LaTeX Anything can go here.=20 #+END_LaTeX ** An Example #+source: r-example-1 #+begin_src R :exports both 2 + 1 + (5-2) * 5 #+end_src The end. = --------------------------------------------------------------------------= ------------------------ Latex output: = --------------------------------------------------------------------------= ------------------------ \begin{document} \title{Working with Org-Babel} \author{Kieran Healy} \date{15 February 2011} \maketitle Anything can go here.=20 \section*{An Example} \label{sec-1} \begin{minted}[]{R} 2 + 1 + (5-2) * 5 \end{minted} The end. \end{document} = --------------------------------------------------------------------------= ------------------------ Is this behavior expected?=20 Kieran -- Kieran Healy :: http://www.kieranhealy.org