emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] org-babel: Meta-LaTeX-Python-Environment


From: Torsten Wagner
Subject: Re: [Orgmode] org-babel: Meta-LaTeX-Python-Environment
Date: Tue, 27 Oct 2009 23:57:41 +0900




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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]