From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torsten Wagner Subject: Re: org-babel: Meta-LaTeX-Python-Environment Date: Tue, 27 Oct 2009 23:57:41 +0900 Message-ID: <4edb2bbc0910270757i3911f817jd99bc68eb4639e31@mail.gmail.com> References: <200910261327.09576.torsten.wagner@googlemail.com> <878wexheeq.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0305917737==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2nUa-0006OK-HN for emacs-orgmode@gnu.org; Tue, 27 Oct 2009 10:57:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2nUV-0006NW-8Q for Emacs-orgmode@gnu.org; Tue, 27 Oct 2009 10:57:47 -0400 Received: from [199.232.76.173] (port=38715 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2nUV-0006NT-5T for Emacs-orgmode@gnu.org; Tue, 27 Oct 2009 10:57:43 -0400 Received: from mail-pw0-f47.google.com ([209.85.160.47]:54253) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2nUU-0003DC-Et for Emacs-orgmode@gnu.org; Tue, 27 Oct 2009 10:57:42 -0400 Received: by pwj10 with SMTP id 10so134067pwj.26 for ; Tue, 27 Oct 2009 07:57:41 -0700 (PDT) In-Reply-To: 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: "Thomas S. Dye" Cc: Dan Davison , Emacs-orgmode@gnu.org --===============0305917737== Content-Type: multipart/alternative; boundary=000e0cd1ab44628b4f0476ebe653 --000e0cd1ab44628b4f0476ebe653 Content-Type: text/plain; charset=ISO-8859-1 > > > Perhaps this will do what you want? When I run org-babel-tangle on the > following org file, and then LaTeX the output, the resulting pdf file > says: A bit of LATEX code, with the result: 6 > > * Test org > #+begin_src python > x = 6 > f = open('python_results.tex', 'w') > f.write(str(x)) > f.close() > #+end_src > > #+resname: > : None > > #+begin_src latex :tangle test_arg_passing > \documentclass{article} > \begin{document} > A bit of \LaTeX code, with the result: \input{python_results} > \end{document} > #+end_src > > HTH, > Tom > > Hi Tom Thanks for sharing this idea. Actually my first (org-babel free) attempt was working like that. However, it becomes fast difficult and complex. On the other hand it solves nicely the problem with the code evaluation in another source block. I just wonder if there is a more comfortable method rather then creating a file. Thanks again for sharing Torsten --000e0cd1ab44628b4f0476ebe653 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


Perha= ps this will do what you want? =A0When I run org-babel-tangle on the follow= ing org file, and then LaTeX the output, the resulting pdf file says:=A0A b= it of LATEX code, with the result: 6

* Test org
#+begin_src python=A0
=A0=A0x =3D 6
=A0=A0f =3D open('python_results.tex', &= #39;w')
=A0=A0f.write(str(x))
=A0=A0f.close()
=
#+end_src

#+resname:
: None

#+= begin_src latex :tangle test_arg_passing
\documentclass{article}<= /div>
\begin{document}
=A0=A0A bit of \LaTeX code, with the r= esult: \input{python_results}
\end{document}
#+end_src

HTH,
=
Tom

Hi TomThanks for sharing this idea. Actually my first (org-babel free) attempt w= as working like that. However, it becomes fast difficult and complex. On th= e other hand it solves nicely the problem with the code evaluation in anoth= er source block. I just wonder if there is a more comfortable method rather= then creating a file.

Thanks again for sharing

Torsten

--000e0cd1ab44628b4f0476ebe653-- --===============0305917737== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0305917737==--