From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torsten Wagner Subject: Re: [babel]org-babel: Meta-LaTeX-Python-Environment Date: Thu, 29 Oct 2009 13:52:21 +0900 Message-ID: <200910291352.21943.torsten.wagner@googlemail.com> References: <200910261327.09576.torsten.wagner@googlemail.com> <4edb2bbc0910270625ybce9255nf569b5e250d061e1@mail.gmail.com> <871vknlamf.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3N05-0004ys-5d for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 00:52:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3N00-0004wz-Ff for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 00:52:40 -0400 Received: from [199.232.76.173] (port=49810 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3N00-0004wu-CS for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 00:52:36 -0400 Received: from mail-yw0-f194.google.com ([209.85.211.194]:53157) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3Mzz-0005Fa-Pq for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 00:52:35 -0400 Received: by ywh32 with SMTP id 32so1377504ywh.14 for ; Wed, 28 Oct 2009 21:52:34 -0700 (PDT) In-Reply-To: <871vknlamf.fsf@stats.ox.ac.uk> 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: Dan Davison Cc: emacs org-mode mailing list Hi Dan, thanks for helping me to realize my idea. Actually, I do not know whether it is not working or it is not working as I expect: I used the following simple example: --8<--------------------------cut here--start--------------------------->8--- * Simple Test of org-babel #+srcname: test() #+begin_src python :results latex a = 1 b = 2 c = a+b "This is a Test: if a =" + str(a) + " and b = " + str(b) + " then a + b = " + str(c) + " right ?!" #+end_src #+resname: test #+BEGIN_LaTeX This is a Test: if a =1 and b = 2 then a + b = 3 right ?! #+END_LaTeX --8<--------------------------cut here--end--------------------------->8--- As you can see, the result is wrapped now in LaTeX source code blocks. However, if I export the file by M-x org-export l the resulting LaTeX file still contains the source code itself (the part in the verbatim environment. What I was looking for was something _without_ the source code just the result. Getting export-result (trimmed to relevant part): ... \section{Simple Test of org-babel} \label{sec-1} \begin{verbatim} a = 1 b = 2 c = a+b "This is a Test: if a =" + str(a) + " and b = " + str(b) + " then a + b = " + str(c) + " right ?!" \end{verbatim} This is a Test: if a =1 and b = 2 then a + b = 3 right ?! ... Wished export-result (trimmed to relevant part): ... \usepackage{color} \definecolor{gray}{gray}{0.95} ... \section{Simple Test of org-babel} \label{sec-1} \colorbox{gray}{ This is a Test: if a =1 and b = 2 then a + b = 3 right ?! } ... As you can see, I like to indicate the source block results resp. the LaTeX source code blocks in a way which indicate clearly that they belong to the "official" output. E.g. by adding a slight gray background. As mentioned before, I like to have mainly three ways of export 1. Export everything 2. Export everything except the source codes itself 3. Export a particular LaTeX source code session (e.g. by using the tangle function) Nevertheless, I will try the other very good ideas in this thread. Maybe this works for me already. Best regards and thanks again Torsten